note 129702 added to functions.variable-functions
| From: | justusofnigeria@gmail.com | Date: | Sun, 11 Aug 2024 10:55:26 +0000 |
| Subject: | note 129702 added to functions.variable-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221475@lists.php.net to get a copy of this message | ||
For anyone who needs to know this, you can directly call a variable as a function call
$variable_holding_a_function = function () {
return "This is a return statement";
};
$result = $variable_holding_a_function();
echo $result;
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 105.113.70.188)
----
Manual Page -- https://php.net/manual/en/functions.variable-functions.php
Edit -- https://main.php.net/note/edit/129702
Del: integrated -- https://main.php.net/note/delete/129702/integrated
Del: useless -- https://main.php.net/note/delete/129702/useless
Del: bad code -- https://main.php.net/note/delete/129702/bad+code
Del: spam -- https://main.php.net/note/delete/129702/spam
Del: non-english -- https://main.php.net/note/delete/129702/non-english
Del: in docs -- https://main.php.net/note/delete/129702/in+docs
Del: other reasons-- https://main.php.net/note/delete/129702
Reject -- https://main.php.net/note/reject/129702
Search -- https://main.php.net/manage/user-notes.php