private function underlineToUppercase($str)
    {
        $fnc = function ($matches) {
            return strtoupper($matches[1]);
        };
        $str = preg_replace_callback('/_+([a-z])/', $fnc, $str);
        return $str;
    }
private function underlineToUppercase($str)
    {
        $fnc = function ($matches) {
            return strtoupper($matches[1]);
        };
        $str = preg_replace_callback('/_+([a-z])/', $fnc, $str);
        return $str;
    }
private function underlineToUppercase ( $ str ) { $ fnc = function ( $ matches ) { return strtoupper ( $ matches [ 1 ] ) ; } ; $ str = preg_replace_callback ( '/_+([a-z])/' , $ fnc , $ str ) ; return $ str ; }
Underline to uppercase

@param string $str string

@return string
Underline to uppercase