src/Genesis/Utils/Common.php
public static function pascalToSnakeCase($input)
    {
        preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);

        foreach ($matches[0] as &$match) {
            $match = ($match == strtoupper($match)) ? strtolower($match) : lcfirst($match);
        }

        return implode('_', $matches[0]);
    }
public static function pascalToSnakeCase($input)
    {
        preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);

        foreach ($matches[0] as &$match) {
            $match = ($match == strtoupper($match)) ? strtolower($match) : lcfirst($match);
        }

        return implode('_', $matches[0]);
    }
public static function pascalToSnakeCase ( $ input ) { preg_match_all ( '!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!' , $ input , $ matches ) ; foreach ( $ matches [ 0 ] as & $ match ) { $ match = ( $ match == strtoupper ( $ match ) ) ? strtolower ( $ match ) : lcfirst ( $ match ) ; } return implode ( '_' , $ matches [ 0 ] ) ; }
Convert PascalCase string to a SnakeCase
useful for argument parsing

@param  string $input

@return string
Convert PascalCase string to a SnakeCase useful for argument parsing