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