Returning Void

By Frederic Bouchery

../_images/returningVoid.png

A very large majority think that it doesn’t cause an error and yet, it does. PHP raises a fatal error during the compilation phase when the return type is “void” but the function contains return statements with values.

See Also

PHP Error Messages

PHP Features