2015-02-17 15:48 GMT+03:00 Leigh <lei...@gmail.com>: > So: Internal Parse AST -> Extension Parse AST -> Generate OpCodes -> > OpCache? >
Yes, it's correct flow. 2015-02-17 15:48 GMT+03:00 Leigh <lei...@gmail.com>: > So if the parser extension does anything dynamic, then OpCache will > have the wrong version cached. > This restriction is intended by design, no dynamic changes are allowed. However, if you need, then you can disable an opcode cacher and do anything you want. Your example is actual for production mode of PHP too, when opcache.validate_timestamps=0 or apc.stat=off. Parsing will be performed only once, then you need to clear cache manually to reload changes from the file system. So, parser extension works transparently and used only when needed to process an AST.