note 125673 added to functions.arrow
| From: | InvisibleSmiley@php.net | Date: | Tue, 12 Jan 2021 08:07:27 +0000 |
| Subject: | note 125673 added to functions.arrow | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216148@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.165 (proxied: 213.155.83.52)
----
Manual Page -- http://php.net/manual/en/functions.arrow.php
Edit -- https://master.php.net/note/edit/125673
Del: integrated -- https://master.php.net/note/delete/125673/integrated
Del: useless -- https://master.php.net/note/delete/125673/useless
Del: bad code -- https://master.php.net/note/delete/125673/bad+code
Del: spam -- https://master.php.net/note/delete/125673/spam
Del: non-english -- https://master.php.net/note/delete/125673/non-english
Del: in docs -- https://master.php.net/note/delete/125673/in+docs
Del: other reasons-- https://master.php.net/note/delete/125673
Reject -- https://master.php.net/note/reject/125673
Search -- https://master.php.net/manage/user-notes.php