3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oldValue = 'new_name_spacing'; $newValue = preg_replace_callback( '/(_[a-z])/', function ($match) { return substr($match, 1, strlen($match)); }, $oldValue ); echo $newValue;

preferences:
56.37 ms | 402 KiB | 5 Q