1class Player {
2 public function SayHi() { print("Hi"); }
3}
4$player = new Player();
5
6call_user_func(array($player, 'SayHi'));
7// or
8$player->{'SayHi'}();
9// or
10$method = 'SayHi';
11$player->$method();
1// Non static call
2call_user_func( array( $obj, 'method' ) );
3
4// Static calls
5call_user_func( array( 'ClassName', 'method' ) );
6call_user_func( 'ClassName::method' ); // (As of PHP 5.2.3)
7