<?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();
You have javascript disabled. You will not be able to edit any code.