src/Functions/ExtendedOperations/ValidityFunctions.php
public function seoFriendlyUrl(string $str): string
    {
        /* Make alphanumeric and lowercase (removes all other characters) */
        $str = preg_replace('/[^a-z0-9_\s-]/', '', strtolower($str));

        /* Clean up multiple dashes or whitespaces */
        $str = preg_replace('/[\s-]+/', ' ', $str);

        /* Convert whitespaces and underscore to dash */
        $str = preg_replace('/[\s_]/', '-', $str);

        return $str;
    }
public function seoFriendlyUrl(string $str): string
    {
        /* Make alphanumeric and lowercase (removes all other characters) */
        $str = preg_replace('/[^a-z0-9_\s-]/', '', strtolower($str));

        /* Clean up multiple dashes or whitespaces */
        $str = preg_replace('/[\s-]+/', ' ', $str);

        /* Convert whitespaces and underscore to dash */
        $str = preg_replace('/[\s_]/', '-', $str);

        return $str;
    }
public function seoFriendlyUrl ( string $ str ) : string { /* Make alphanumeric and lowercase (removes all other characters) */ $ str = preg_replace ( '/[^a-z0-9_\s-]/' , '' , strtolower ( $ str ) ) ; /* Clean up multiple dashes or whitespaces */ $ str = preg_replace ( '/[\s-]+/' , ' ' , $ str ) ; /* Convert whitespaces and underscore to dash */ $ str = preg_replace ( '/[\s_]/' , '-' , $ str ) ; return $ str ; }
Check for SEO Friendly Url.

@param string $str The string as SEO URL

@return string
Check for SEO Friendly Url .