Created
May 2, 2017 08:46
-
-
Save phpfiddle/c317dfe60b04bf2f7a4aca76e9d9be60 to your computer and use it in GitHub Desktop.
[ Posted by Trungkienpvt ] Example for magic method
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 | |
//magic method | |
class Foo | |
{ | |
public function __call($method, $arguments) | |
{ | |
echo "Called $method","\n"; | |
} | |
static public function __callStatic($method, $arguments) | |
{ | |
echo "Called $method","\n"; | |
} | |
} | |
Foo::someStaticMethod(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment