So... This is more of a curiosity, not a real problem. I don\'t get this:
Results in: Pars
empty
is not a function but a language construct (more like an operator than a function), which means it's resolved by the parser at parse time and not by the runtime. It's a reserved keyword and you cannot use it for anything yourself like function names, or constants.
The reason empty
cannot be a regular function is because it behaves differently. empty($undefined)
would first resolve $undefined
, throw an error, then pass null
to empty
; which is exactly the case empty
is supposed to prevent, so it cannot play by the normal function invocation rules.