public static function snakeCase($string) { return ltrim(strtolower(preg_replace('/[A-Z]/', '_$0', $string)), '_'); }