Running PHP with... JavaScript?!

  Рет қаралды 5,672

Andrew Schmelyun

Andrew Schmelyun

Күн бұрын

Yep, you heard that right. Using the power of WebAssembly we can run PHP code with just JavaScript, either directly in the browser or in a terminal window with Node.
In this video I'll show you a couple ways this might be useful, and explain how to build a light-weight local dev environment using Express and PHP-WASM.
- 0:00 About WebAssembly
- 2:10 Running PHP with Node
- 5:08 Express as a Proxy
- 8:34 What Next?
Send me new video ideas and vote on what's coming next: suggest.gg/aschmelyun
Follow me on Twitter! / aschmelyun
Join my newsletter, where I send out new information about twice each month in the PHP, JavaScript, and Docker realms: aschmelyun.substack.com

Пікірлер: 16
@rcnhsuailsnyfiue2
@rcnhsuailsnyfiue2 Жыл бұрын
I’m so excited for this, I’ve been exploring PHP WASM a lot lately and I’m pretty sure it’s gonna go mainstream over the next year or two. Imagine being able to use something like Laravel Collections in the frontend, entirely client-side… It’d be a godsend!
@basilistigris640
@basilistigris640 Жыл бұрын
thank you Andrew Schmelyun for one more well pro explained video in technologies i try to learn php and javascript, can wait for videos with raw php and vanilla js
@RRRRRRP
@RRRRRRP Жыл бұрын
Really interesting stuff! Another great video 👌
@tannercampbell
@tannercampbell Жыл бұрын
cool stuff!
@ToyohisaTV
@ToyohisaTV 5 ай бұрын
so if I get this right, let's say I want to write an app and for the app I would use vanilla JS. Using vanilla js means my code is easily acessible and ppl can copy it. But if i run it through PHP WASM would that not be the case anymore? trying to figure out some more use cases
@nifoxa1183
@nifoxa1183 Жыл бұрын
is it possible to use javascript library in PHP ?
@nicolascanala9940
@nicolascanala9940 Жыл бұрын
Do you plan on taking this to the next level? For example, extending Diode so that you are able to use packages, etc. Or was it meant more as an exploratory project? Loving this btw!
@aschmelyun
@aschmelyun Жыл бұрын
It was meant as just an exploratory package, but I'm following the WP team's development of PHP-WASM closely. If they add more extensions and libraries to it, I'll include them and their functionality in diode!
@IamConstM
@IamConstM Жыл бұрын
please how long did it take you to learn how to use this package and also please what was your approach... can tweet it to would be really helpful🙏🙏
@user-ch5kn3gl5d
@user-ch5kn3gl5d Жыл бұрын
Great video. But what about PHP extensions? Are they taken care of by PHP-WASM? @Andrew Schmelyun
@aschmelyun
@aschmelyun Жыл бұрын
Some (very few) are included built-in to the PHP-WASM package. It's unfortunately missing some often-used ones like curl, but sqlite/mysql, openssl, and libzip are present. More are also in progress of being added as well!
@sanjayojha1
@sanjayojha1 Жыл бұрын
Really cool. What are the other use case?
@aschmelyun
@aschmelyun Жыл бұрын
Portability, easily package up PHP with something like Electron for a desktop application.
@codernerd7076
@codernerd7076 Жыл бұрын
But I want get away from Javascript! 😢
@aschmelyun
@aschmelyun Жыл бұрын
Sorry, it's everywhere 🥲
@UwU-uq9pq
@UwU-uq9pq Жыл бұрын
nasty
Saloon - A PHP package to simplify API integrations
28:09
Andrew Schmelyun
Рет қаралды 9 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 636 М.
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 12 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 133 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 7 МЛН
A few different ways to seed databases in Laravel
13:02
Andrew Schmelyun
Рет қаралды 3,6 М.
The Truth about Rust/WebAssembly Performance
29:47
Greg Johnston
Рет қаралды 176 М.
Let's end the FRAMEWORK war! Next js vs Laravel!?
2:02
PEXT
Рет қаралды 2,9 М.
Interview with Senior PHP Developer
6:12
Programmers are also human
Рет қаралды 356 М.
Why do big Companies use Java, and NOT PHP?
12:34
Stefan Mischook
Рет қаралды 222 М.
Modern monoliths: SPA and API in a single codebase
11:55
Andrew Schmelyun
Рет қаралды 4,5 М.
5 tips for supercharged Laravel Eloquent queries
16:29
Andrew Schmelyun
Рет қаралды 67 М.
PHP on the frontend! No more Javascript!
14:47
Aaron Francis
Рет қаралды 120 М.
Is PHP the Secret King of Code?
6:42
Stefan Mischook
Рет қаралды 54 М.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58
Maximilian Schwarzmüller
Рет қаралды 43 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН
Лучший браузер!
0:27
Honey Montana
Рет қаралды 363 М.
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 10 МЛН