- explode: documentation ( source)
- array_walk: documentation ( source)
- ucfirst: documentation ( source)
<?php
function mediaapi_filter_underscoretocamelcase($string)
{
$string = explode('_', $string);
return array_walk($string, function ($item) {
$item = ucfirst($item);
});
}
echo mediaapi_filter_underscoretocamelcase('franz_deleon');