3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelize($string) { return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $string); } var_dump(camelize('_code'));

preferences:
54.88 ms | 402 KiB | 5 Q