public static function camelCase($str)
    {
        $str = self::convertToLowercase($str);
        return preg_replace_callback(
            '/_([a-z])/',
            function ($match) {
                return strtoupper($match[1]);
            },
            $str
        );
    }
public static function camelCase($str)
    {
        $str = self::convertToLowercase($str);
        return preg_replace_callback(
            '/_([a-z])/',
            function ($match) {
                return strtoupper($match[1]);
            },
            $str
        );
    }
public static function camelCase ( $ str ) { $ str = self :: convertToLowercase ( $ str ) ; return preg_replace_callback ( '/_([a-z])/' , function ( $ match ) { return strtoupper ( $ match [ 1 ] ) ; } , $ str ) ; }
Convert a string to camelCase. Strings already in camelCase will not be harmed.

@param  string  $str The input string
@return string camelCased output string
Convert a string to camelCase . Strings already in camelCase will not be harmed .