Created
January 27, 2012 19:03
-
-
Save dshafik/1690359 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
| <?php | |
| class ClassName { | |
| function foo() | |
| { | |
| echo __METHOD__, PHP_EOL; | |
| } | |
| function bar() | |
| { | |
| echo __METHOD__, PHP_EOL; | |
| } | |
| } | |
| (new ClassName)->{(time() % 2) ? "foo" : "bar"}(); | |
| // For php -r: | |
| 'class ClassName { function foo() { echo __METHOD__, PHP_EOL; } function bar() { echo __METHOD__, PHP_EOL; } } (new ClassName)->{(time() % 2) ? "foo" : "bar"}();' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment