3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _convertToCamelCase(array $matches) { return ucfirst($matches[1]); } $key = 'valami_underscored_cucc'; echo preg_replace_callback( '/_(\w)/', array($this, '_convertToCamelCase'), $key);

preferences:
44.83 ms | 405 KiB | 6 Q