3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = '123_abc____def'; var_dump( preg_replace( '/\_+[a-zA-Z]{1}/e', '_' . strtoupper('\\1'), $s) );
based on 3iUIQ