Variable Function Call

Variable Function Call in PHP

<?php
function myfun()
{
echo “hello PHP world”;
}

myfun();

echo “<br><hr>”;
echo “Now it is really a miracle”;

$funcall = ‘myfun’;
echo “<br/>”;
$funcall();
echo “<br/>”;
var_dump(is_callable($funcall));
?>

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.