Hacker News new | ask | show | jobs
by pornel 3269 days ago
Indeed. For this I prioritized readable and JS-like output (and no runtime) over handling things exactly. There's a different project doing it via a VM in JS: https://phpjs.hertzen.com/ and it handles most of the PHP test suite.

On the language level most stuff works well enough. However, the biggest blocker is impedance mismatch between PHP and JS environments, e.g. request-per-process vs shared server, `echo`, modules vs autoload & namespaces, etc. so even 100% accurate PHP execution is going to be doing odd things in the JS world.