Bug #71746 [Opn]: UTF-8 codepoint escape sequences allow arbitrary number of leading zeros
Edit report at https://bugs.php.net/bug.php?id=71746&edit=1
ID: 71746
Updated by: yohgaki@php.net
Reported by: temp at temp dot ru
Summary: UTF-8 codepoint escape sequences allow arbitrary
number of leading zeros
Status: Open
Type: Bug
Package: *Compile Issues
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
This must be fixed. Recent Unicode does not allow this kind of redundant expressions.
Previous Comments:
------------------------------------------------------------------------
[2016-03-08 15:43:37] temp at temp dot ru
Description:
------------
PHP documentation specifies the following format of UTF-8 codepoint escape sequences:
\u{[0-9a-f]{1,6}}
However, it's currently possible to use them like this:
<?php
echo "\u{0000000000000000000000000000000000000000000000000041}"; //Works
Moreover, it's currently possible to use capital hexadecimal letters despite documentation
says, that only lower-case letters are allowed:
<?php
echo "\u{AA}"; //Works
I'm not sure if these are documentation or compiler bugs.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71746&edit=1
Thread (3 messages)