2015-02-17 15:29 GMT+03:00 Benjamin Eberlei <kont...@beberlei.de>:

> Well not really, depending on the path towards a require a parser
> extension is already registered or not. Or you have conditional
> registration of extensions. So you could load a file with an extension
> registered, but it still serves the old opcodes for that file.



Technically, this will be possible, however, Parser Extensions should be
registered ASAP during bootstrap process, near spl_autoload_register(),
stream_wrapper_register(), stream_filter_register(), etc..
So, no conditional code hooks should be used for that. But this can be the
consistent with stream wrappers, filters and autoloaders. Developer can
decide what he need to enable some features.

One more possible way for this RFC is to remove these register/unregister
methods from the `Php\Parser\Engine` class and add an option to the php.ini
with list of classes to load. This option can be adjusted then per
project/directory. Is this more suitable?

Thanks!

Reply via email to