Last active
November 27, 2018 11:03
-
-
Save thedineshj/fd9bde7c4d0e2c25c2c95c4c624b0776 to your computer and use it in GitHub Desktop.
Calling a PHP function, which has the same name as whatever the variable evaluates to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function doubleIt($num){ | |
echo 2*$num; | |
} | |
$functionName="doubleIt"; | |
$functionName(7); // 14 | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment