On Tuesday, 14 May 2024 at 17:24, Juliette Reinders Folmer 
<php-internals_nos...@adviesenzo.nl> wrote:

> On 11-5-2024 16:43, Gina P. Banyard wrote:
>
>> On Thursday, 9 May 2024 at 15:17, Jorg Sowa 
>> [<jorg.s...@gmail.com>](mailto:jorg.s...@gmail.com) wrote:
>>
>>>> I don't think there are any other "functions" like this.
>>> What about list(), isset(), print(), echo(), require(), include(), unset(), 
>>> empty()? We use them the same way as functions, but those are not real 
>>> functions.
>>
>> list() (and array()) may look like functions but do not behave like one as 
>> they affect the current scope by setting various variables.
>>
>> isset()/empty()/unset() require to work with undefined variables and have 
>> deeply ingrained behaviour within the engine, so making them simple 
>> functions is not as much of a "trivial" change.
>>
>> print, echo, include(_once) and require(_once) do not mandate their 
>> "argument" to be passed within parenthethis, so making them functions does 
>> not simplify the lexer/parser nor removes them as keywords.
>> Also I don't know the last time I've used those language constructs "like a 
>> function".
>
> Seeing this list, makes me wonder: what about eval() ?

eval() might make sense to try and convert to a function, this would probably 
also cleany solve the complaint about not being able to disable eval() [1][2]

Best regards,
Gina P. Banyard

[1] https://bugs.php.net/bug.php?id=62397

[2] https://github.com/php/php-src/pull/4084

Reply via email to