public static function camelCase(string $text, bool $lowercaseFirstChar = false): string
    {
        $text = strtr(ucwords(strtr($text, [
            '_' => ' ',
            '.' => '_ ',
            '\\' => '_ ',
        ])), [' ' => '']);
        if ($lowercaseFirstChar) {
            $text = lcfirst($text);
        }

        return $text;
    }
public static function camelCase(string $text, bool $lowercaseFirstChar = false): string
    {
        $text = strtr(ucwords(strtr($text, [
            '_' => ' ',
            '.' => '_ ',
            '\\' => '_ ',
        ])), [' ' => '']);
        if ($lowercaseFirstChar) {
            $text = lcfirst($text);
        }

        return $text;
    }
public static function camelCase ( string $ text , bool $ lowercaseFirstChar = false ) : string { $ text = strtr ( ucwords ( strtr ( $ text , [ '_' => ' ' , '.' => '_ ' , '\\' => '_ ' , ] ) ) , [ ' ' => '' ] ) ; if ( $ lowercaseFirstChar ) { $ text = lcfirst ( $ text ) ; } return $ text ; }
Converts a string from snake case to camel case.

@param string $text               The text to camel case
@param bool   $lowercaseFirstChar Whether to lowercase the first character. 'fooBar' vs 'FooBar'.

@return string The camel cased text
Converts a string from snake case to camel case .