3 ms·
Functions with a `: void` return type will still give you a NULL if you use them in an expression. I didn't want to break the property of existing PHP functions
by TazeTSchnitzel 10y ago
Functions with a `: void` return type will still give you a NULL if you use them in an expression. I didn't want to break the property of existing PHP functions that they can always be used as expressions. I reasoned that your IDE or whatever can always warn you if you mistakenly try to use the result of such a function.
PHP's built-in functions documented as "void" also return NULL, so I suppose there's an argument from consistency.