Re: [RFC][Discussion] Parser extension API

From: Date: Tue, 17 Feb 2015 12:55:46 +0000
Subject: Re: [RFC][Discussion] Parser extension API
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-82954@lists.php.net to get a copy of this message
2015-02-17 15:48 GMT+03:00 Leigh <leight@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 <leight@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.

« previous php.internals (#82954) next »