Re:Upcoming changes in PHP 7.1
by TazeTSchnitzel on Monday May 23, 2016 @08:55AM
(#11753523)
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.
PHP's built-in functions documented as "void" also return NULL, so I suppose there's an argument from consistency.