Amanite Laurine Amanite Laurine - 1 year ago 68
PHP Question

can't execute function returned in variable php

I have a function with this syntaxe :

$variable = function() {
return function(){

I can't execute that function with


Is there a way to execute this function ?

Answer Source

I don't know for what is it... But here example:

$a = function () {
   return function () { 
       return 1; 
$b = $a();
echo $b();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download