In php.net the following is written:
Variable functions won't work with language constructs such as echo, print, unset(), isset(), empty(), include, require and the like. Utilize wrapper functions to make use of any of these constructs as variable functions.
What does that mean?
Could anyone give examples because I’ve tried using the variable function in an echo and it worked perfectly:
function city()
{
return "new york";
}
$var = "city";
echo "city: " . $var();