Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long-living PHP process and comunication with it #43

Open
szado opened this issue Jun 13, 2020 · 3 comments
Open

Long-living PHP process and comunication with it #43

szado opened this issue Jun 13, 2020 · 3 comments

Comments

@szado
Copy link

szado commented Jun 13, 2020

I built a wasm with option allowing run it in web worker and it works fine. But when i run script like this:
echo 1; sleep(5); echo 2;
i getting "12" output only after 5 seconds. I considering is there any way (any possibly build config) to make php interactive? I've tried to build it with CLI enabled (#8 (comment)), but i don't know how to use it properly in browser.

@seanmorris
Copy link
Contributor

I think the UI is locking while PHP executes. If I can get this into a web worker I think we should be able to get it running async.

@Tofandel
Copy link

@szado Did you try with a PHP_EOL after each echo

There is this comment
// Output is line-buffered, so EOL is needed

So maybe it's the same in a web worker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants