Why does this PHP program not work?
- by oncode
I'm new to PHP and was learning about PHP functions from w3schools. It said PHP allows a function call to be made when the function name is in a variable:
This program worked
<?php
$v = "var_dump";
$v('foo');
?>
But this program did not work:
<?php
$v = "echo";
$v('foo');
?>
But if I do echo('foo'); it works. What am I doing wrong?