3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function doSomething($string) { $string[0] = strtolower($string[0]); $func = create_function('$c', 'return "_" . strtolower($c[1]);'); return preg_replace_callback('/([A-Z])/', $func, $string); } echo doSomething('camelCase');
based on jVH4c
Output for 7.2.0
Deprecated: Function create_function() is deprecated in /in/sf67p on line 4 camel_case
Output for 5.3.18 - 7.1.10
camel_case