-
Notifications
You must be signed in to change notification settings - Fork 27
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
Is there any other function that can replace 'runkit_import' in php7 #72
Comments
No, and there are no built in php functions. runkit_import was temporarily disabled/removed while working on bug fixes for other, more commonly used features.
One might be able to hack something together in pure php without runkit, using https://github.com/nikic/PHP-Parser , filtering the AST to only include top-level class/function declarations (and namespace choices), converting the AST back to php code, and eval()ing the php code |
But how can I replace "runkit_import($controller_file, RUNKIT_IMPORT_CLASS_METHODS|RUNKIT_IMPORT_OVERRIDE);" ? |
There's no replacement for That may be implemented in a future release of runkit7. |
#107 is a work in progress, may help for that use case ( It adds classes and methods and functions, but does not support properties, even if the class is new (Will need to investigate further how that would be done properly). |
There are various known crashes in runkit7_import due to overrides, extending classes that were already loaded, late static binding, etc. Fixing this would probably require copying large amounts of php's functionality for php 7.3, 7.4, 8.0, etc., and would likely be a massive undertaking. Crashes and test failures often occur far away from the buggy code causing the crash. Related to #234, #211, #185, #150, #135, #112 Closes #72
Is there any other function that can replace 'runkit_import' in php7?Please tell us,thank you!
The text was updated successfully, but these errors were encountered: