3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $callBack = function($matches){ str_replace('_', '', $matches[0]); return ucwords($matches[0]); }; $stupidName = 'stupid_function_name'; $newName = preg_replace_callback('(_[a-z])', $callBack, $stupidName);
Output for 5.6.0 - 7.3.0beta1