private function normalize(string $param, string $space = '-'): string
    {
        $param = trim($param);
        if (function_exists('iconv')) {
            $param = @iconv('utf-8', 'us-ascii//TRANSLIT', $param);
        }
        $param = preg_replace('/[^a-zA-Z0-9 -]/', '', $param);
        $param = strtolower($param);
        $param = preg_replace('/[\s-]+/', $space, $param);

        return $param;
    }
private function normalize(string $param, string $space = '-'): string
    {
        $param = trim($param);
        if (function_exists('iconv')) {
            $param = @iconv('utf-8', 'us-ascii//TRANSLIT', $param);
        }
        $param = preg_replace('/[^a-zA-Z0-9 -]/', '', $param);
        $param = strtolower($param);
        $param = preg_replace('/[\s-]+/', $space, $param);

        return $param;
    }
private function normalize ( string $ param , string $ space = '-' ) : string { $ param = trim ( $ param ) ; if ( function_exists ( 'iconv' ) ) { $ param = @ iconv ( 'utf-8' , 'us-ascii//TRANSLIT' , $ param ) ; } $ param = preg_replace ( '/[^a-zA-Z0-9 -]/' , '' , $ param ) ; $ param = strtolower ( $ param ) ; $ param = preg_replace ( '/[\s-]+/' , $ space , $ param ) ; return $ param ; }
Normalize parameter to be used in human readable URL

"Inspired" by Phrozn's normalize implementation.

@param string $param Parameter to normalize
@param string $space What to use as space separator

@return string
Normalize parameter to be used in human readable URL