Created
April 29, 2013 15:58
-
-
Save anonymous/5482562 to your computer and use it in GitHub Desktop.
fun
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 | |
class Foo { | |
public function bar() { | |
return "bar"; | |
} | |
public static function baz() { | |
return "baz"; | |
} | |
} | |
$foo = new Foo(); | |
$code = ' | |
echo $foo.bar(); | |
echo Foo::baz(); | |
'; | |
$newcode = str_replace(".", "->", $code); | |
eval($newcode); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment