calling a method inside string in php code example
Example: php call method from string
class Player {
public function SayHi() { print("Hi"); }
}
$player = new Player();
call_user_func(array($player, 'SayHi'));
// or
$player->{'SayHi'}();
// or
$method = 'SayHi';
$player->$method();