pib icon indicating copy to clipboard operation
pib copied to clipboard

Providing stub STDOUT/STDERR resources

Open TysonAndre opened this issue 5 years ago • 1 comments

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.

TysonAndre avatar Jul 23 '19 21:07 TysonAndre

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.

seanmorris avatar Aug 22 '20 10:08 seanmorris