In the example I have a function with name of funcao
, which is intended only to display the value of the parameter on the screen.
When you create a string
with the function name and call it as a function, it will be executed:
<?php
function funcao($parametro = "default") {
echo $parametro . "<br/>\n" ;
}
$func = "funcao";
$func("kirotawa");
$func = "FUNCAO";
$func();
?>
Why can I call the function as follows?