public static function export(array $arr): string
    {
        $str = var_export($arr, true);
        $str = str_replace("array (", "array(", $str);
        $str = preg_replace("/=>(\s+)array\(/s", "=> array(", $str);
        $str = preg_replace("/array\(\s+\)/", "array()", $str);
        return $str;
    }
public static function export(array $arr): string
    {
        $str = var_export($arr, true);
        $str = str_replace("array (", "array(", $str);
        $str = preg_replace("/=>(\s+)array\(/s", "=> array(", $str);
        $str = preg_replace("/array\(\s+\)/", "array()", $str);
        return $str;
    }
public static function export ( array $ arr ) : string { $ str = var_export ( $ arr , true ) ; $ str = str_replace ( "array (" , "array(" , $ str ) ; $ str = preg_replace ( "/=>(\s+)array\(/s" , "=> array(" , $ str ) ; $ str = preg_replace ( "/array\(\s+\)/" , "array()" , $ str ) ; return $ str ; }
Export an array as a string with better than default formatting

@param array $arr The array to export
@return string
Export an array as a string with better than default formatting