3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a { function run() { // Call each test to fill warnings array foreach(get_class_methods($this) as $method) { if(strpos($method, 'test_') === 0) $this->{$method}(); } } function test_a() { echo 'called'; } } $a = new a(); $a->run();
Output for 4.3.0 - 7.1.0
called