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

Sandbox: how to run _precompiled_ arbitrary code in child? #3

Closed
kakserpom opened this issue Sep 9, 2010 · 2 comments
Closed

Sandbox: how to run _precompiled_ arbitrary code in child? #3

kakserpom opened this issue Sep 9, 2010 · 2 comments

Comments

@kakserpom
Copy link

I want to run precompiled code in child like this: $sandbox->call_user_func(function() {foo();});
$sandbox->eval() causes compilation of source-code to bytecode. How to bypass it?
I have just one idea... $sandbox->include() + eAccelerator. Is there another way?

@zenovich
Copy link
Owner

I have just added an ability to apply a closure to a sandbox in PHP 5.3+ by calling the call_user_func method. It was done with a dirty hack. Please, use it cautiously.

The commit is here: http://github.com/zenovich/runkit/commit/68047783072af5569a38717af6cc670d935c73d2

@kakserpom
Copy link
Author

Thanko you. It works fine now.

This issue was closed.
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

2 participants