PHP 8.5.0 Alpha 4 available for testing

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

InvisibleSmiley
4 years ago
Unlike anonymous functions, arrow functions cannot have a void return type declaration.

May seem obvious, but if you thought you could make use of the benefits of arrow functions (using variables from the parent scope) to simplify a function or method call, keep in mind that this is only possible if you do NOT tell PHP that the arrow function does indeed return void.

<< Back to user notes page

To Top