So, Throughout my script it seemed logically correct to call a function via a variable value.
Example I have
function computer() { return 'pcs are good'; } function laptop() { return 'laptops are ok'; } $value = 'computer'; echo $value(); $value = 'laptop'; echo $value();
However, After just googling this, I saw alot of criticism towards this technique, Whats the problem with this?
Thanks in advance.