Re: [mini-RFC] Disable opcache per script using "declare(cache=0)"

From: Date: Sun, 25 Nov 2018 18:06:43 +0000
Subject: Re: [mini-RFC] Disable opcache per script using "declare(cache=0)"
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-103496@lists.php.net to get a copy of this message
Even if there were definitions in said script, the same issue would arise with a directive. On Sun, 25 Nov 2018, 18:35 Larry Garfield <larry@garfieldtech.com wrote: > On Saturday, November 24, 2018 11:03:01 PM CST Marco Pivetta wrote: > > Adding to the pile of "it's an edge case", since the preload scripts will > > be procedural, wouldn't it be sufficient to call > > opcache_invalidate(__FILE__) at the end of them? > > Are we certain that it will always be procedural? Is there a part of the > preload script design that prevents it from defining a function? > > I'd be very surprised if someone defined a class in a preload script, but > I > can definitely see a function getting defined somewhere. And if it > includes > some other file (eg, Composer may be generating one, frameworks may build > one, > etc.) then who knows what that file will have defined. > > Would that cause issues in this case? > > --Larry Garfield

« previous php.internals (#103496) next »