I am trying to use variable in variable function, then to do some calculations and later use that variable and print out answer:
<?php
$a($b)=function() {
if ($b == 10 ) {
return 10 ;
}else{
return 20 ;
}
}
$a(10);
echo $a(10);
?>
I am getting error:
Fatal error: Can't use function return value in write context