Skip to content

FILTER_VALIDATE_URL returns false when latin chars (šđčćž) present in URL #17925

Open

Description

@pinta83

It's been a few years since latin chars are supported in domain names, and urls.

Description

The following code:

<?php var_dump(filter_var('info@ćufta.com', FILTER_VALIDATE_EMAIL));?>

Resulted in this output:

FALSE

But I expected this output instead:

TRUE

PHP Version

PHP 8.3.17

Operating System

Ubuntu Mint - Linux 5.4.0-208-generic #228-Ubuntu SMP Fri Feb 7 19:41:33 UTC 2025 x86_64

Activity

  1. changed the title [-]FILTER_VALIDATE_URL returns false when latin chars present in URL[/-] [+]FILTER_VALIDATE_URL returns false when latin chars (šđčćž) present in URL[/+] on Feb 25, 2025
  2. Girgias commented on Feb 25, 2025

    @Girgias
    Member

    This would be solved by the new URI RFC: https://wiki.php.net/rfc/url_parsing_api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions