Created
June 22, 2013 10:50
-
-
Save stormwild/5840423 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // http://net.tutsplus.com/tutorials/php/from-procedural-to-object-oriented-php/ | |
| // http://us3.php.net/manual/en/functions.variable-functions.php | |
| function foo() { | |
| echo "This is foo"; | |
| } | |
| function bar($param) { | |
| echo "This is bar saying: $param"; | |
| } | |
| $function = 'foo'; | |
| $function(); // Goes into foo() | |
| $function = 'bar'; | |
| $function('test'); // Goes into bar() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment