- preg_replace_callback: documentation ( source)
- strtoupper: documentation ( source)
<?php
$a = function($string)
{
return preg_replace_callback(
'/_([a-z])/',
function ($string) {
return strtoupper($string[1]);
},
$string
);
};
echo $a('IT_Solutions_Urgency_to_Change');