Is it possible to call a function as a function argument? I'm trying to get the value of the bar function and pass it to the foo function.
If I try to set the function to a variable
e.g.
$foobar = bar($x)
it will execute the function where ever the variable is found.
e.g.
function bar($x) {
$x = 1;
return 1;
}
function foo(x) {
$x += $x;
echo $x;
}
foo(bar($x));