Can I do something like this?
$arrayFn[1] = function fnName(){
echo "test";
}
$arrayFn[1];
Anonymous functions cannot have a name:
$arrayFn[1] = function (){
echo "test";
};
$arrayFn[1](); // run it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With