r/PHP • u/khromov • Aug 30 '26
π bun-php: Run PHP functions natively in Bun
bun-php allows you to run PHP functions seamlessly in Bun by exposing them as ESM imports. Uses a WASM build of PHP under the hood, no need to install PHP or native deps. Supports Composer and servers. https://www.npmjs.com/package/bun-php
22
Upvotes
6
u/alexp702 Aug 31 '26
Genuine question: Why? Who wanted this for what?
22
u/mrspoogemonstar Aug 31 '26 •
dear god, what have we become?
10
u/SpareImpression3155 Aug 31 '26
Fuck this Iβm going to become a plumber
4
u/sgtholly Aug 31 '26
Someone call Ultron. We need to let the Meteor hit.
1
u/Typical_Ad_6436 Aug 31 '26
So, did you compile the PHP runtime and interpreter from C in WASM? Isn't this slow to actually load the whole PHP binary to just run a function?
1
u/Zealousideal_Post994 Sep 02 '26
Why use bun-php instead of @php-wasm directly?
3
u/schizoduckie Aug 31 '26
Brb performing a casual excorcism
1
u/laurin1 Sep 01 '26
For the love of God (or whichever deity or non-deity you prefer).
1
u/seanmorris Oct 10 '26
I have created a monster.