Created
June 11, 2010 10:25
-
-
Save kanonji/434334 to your computer and use it in GitHub Desktop.
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 call($call){ | |
call_user_func(array($this, $call)); | |
} | |
static public function publicmethod(){ | |
echo __METHOD__; | |
} | |
static protected function protectedmethod(){ | |
echo __METHOD__; | |
} | |
static private function privatemethod(){ | |
echo __METHOD__; | |
} | |
} | |
$foo = new Foo(); | |
$foo->call('publicmethod'); | |
$foo->call('protectedmethod'); | |
$foo->call('privatemethod'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment