3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function _convertToCamelCase(array $matches) { return ucfirst($matches[1]); } $key = 'valami_underscored_cucc'; $keys = array( 'id' ); foreach ($keys as $key) { echo preg_replace_callback( '/_(\w)/', '_convertToCamelCase', $key); }
based on matgd