[php-src] Issue #22361: Unicode issue
| From: | tvdijen | Date: | Thu, 18 Jun 2026 20:23:50 +0000 |
| Subject: | [php-src] Issue #22361: Unicode issue | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252216@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22361
Author: tvdijen
### Description
The following code:
```php
<?php
$string_regex = '/^
[
\x09
\x0A
\x0D
\x{20}-\x{7E}
\x{85}
\x{A0}-\x{D7FF}
\x{E000}-\x{FDCF}
\x{FDF0}-\x{FFFD}
\x{10000}-\x{1FFFD}
\x{20000}-\x{2FFFD}
\x{30000}-\x{3FFFD}
\x{40000}-\x{4FFFD}
\x{50000}-\x{5FFFD}
\x{60000}-\x{6FFFD}
\x{70000}-\x{7FFFD}
\x{80000}-\x{8FFFD}
\x{90000}-\x{9FFFD}
\x{A0000}-\x{AFFFD}
\x{B0000}-\x{BFFFD}
\x{C0000}-\x{CFFFD}
\x{D0000}-\x{DFFFD}
\x{E0000}-\x{EFFFD}
\x{F0000}-\x{FFFFD}
\x{100000}-\x{10FFFD}
]*$/Dxu';
$str = 'ünïcöde €Φ汉';
preg_match($string_regex, $str);
```
Resulted in this output:
```
Used to pass, do not know the except version where it failed (last weeks though)
```
But I expected this output instead:
```
No longer passes in 8.5.7
```
### PHP Version
```plain
==> Setup PHP
✓ PHP Installed PHP 8.5.7
```
### Operating System
_No response_