On Thursday, 9 May 2024 at 15:17, Jorg Sowa <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.
> Kind regards,
> Jorg

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".

Hope this clarifies things.

Best regards,
Gina P. Banyard

Reply via email to