3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Route { function get() {} function do_POST() {} function do_Put() {} function DeLeTe() {} } print_r(get_class_methods('Route')); print_r(preg_grep('^do_?(\\w)+$', get_class_methods('Route')));
based on 2Fdqp
Output for 5.0.0 - 7.2.0
Array ( [0] => get [1] => do_POST [2] => do_Put [3] => DeLeTe ) Warning: preg_grep(): No ending delimiter '^' found in /in/6p9RN on line 11
Output for 4.3.11 - 4.4.9
Array ( [0] => get [1] => do_post [2] => do_put [3] => delete ) Warning: preg_grep(): No ending delimiter '^' found in /in/6p9RN on line 11
Output for 4.3.0 - 4.3.10
Array ( [0] => get [1] => do_post [2] => do_put [3] => delete ) Warning: No ending delimiter '^' found in /in/6p9RN on line 11