No Such Function As Empty

../_images/no_empty_function.png

There is no function called empty(), which could be accessed using a fully qualified name, such as \empty. There is also no function that can be defined as such, since empty() is already taken.

When the code needs to pass around a empty function, the best approach is to wrap a call to the empty() language construct, in a closure.

See Also

PHP Features