3v4l.org

run code in 300+ PHP versions simultaneously
<?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); } doSomething('davoid')
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
Parse error: syntax error, unexpected end of file in /in/QLqpp on line 8
Process exited with code 255.

preferences:
191.17 ms | 940 KiB | 65 Q