3v4l.org

run code in 300+ PHP versions simultaneously
<?php class USER // should be a StudlyCased class name { static function find_by_username($name) { printf('You tried to find a user by username "%s"', $name); } } $array = array('USER', 'username', 'other', 'test'); $array[0]::{'find_by_' . $array[1]}($array[3]);

preferences:
30.32 ms | 404 KiB | 5 Q