Re: opcache_compile_file() declares top-level functions

From: Date: Thu, 21 Nov 2024 10:27:04 +0000
Subject: Re: opcache_compile_file() declares top-level functions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-126020@lists.php.net to get a copy of this message
On 21 November 2024 08:15:12 GMT, Daniil Gentili <daniil.gentili@gmail.com> wrote: >Hi Ilija, >I believe the removal of function caching is a bit of an overreaction: it was always known, to >those who used it, that preloading will cache functions, and requires an include guard to avoid >function redeclaration errors, and in fact it is a very useful feature. > >There is nothing wrong with this behaviour, and it does what you expect it to do. This reads rather awkwardly, because you're claiming to speak for some unknown users ("those who used it") and even for the reader of the message ("it does what you expect it to do"). More helpful would be to say how *you* use it, or where you have seen it used. Evidently it wasn't obvious to Ilija, and wasn't what they expected. Since it's not mentioned in the manual, it's not what I would have expected either. Ilija also went to some length to describe real practical problems, so just saying there's "nothing wrong with this behaviour" also seems unhelpful. Perhaps you could expand on why you think the problems illustrated aren't significant in practice? I would also be interested to know if you think the difference in behaviour between classes and functions is explicitly useful, or just neutral to your use case. Regards, Rowan Tommins [IMSoP]

« previous php.internals (#126020) next »