pib
pib copied to clipboard
Providing stub STDOUT/STDERR resources
Is that something you'd be interested in a PR for? php embed differs from a regular CLI in that it doesn't provide these (but echo
works)
I have this working in a fork - https://github.com/TysonAndre/phan-demo/blob/79d6df9950789ebf54cf3c798f772df8a76e887e/pib_eval.c#L16-L54
- The fork runs a static analyzer (using STDERR) in a browser, by using a preloaded
phar
file on disk. https://tysonandre.github.io/phan-demo/
Alternately, a regular define+fopen in pure php before the script in question may work more reliably.
This looks pretty goddamn useful, I've got another branch in the works at https://github.com/seanmorris/php-wasm, its got persistent memory and a way to call out to JS!
How did you get STDERR working? Thats been driving me insane.