Bug->Doc #71746 [Opn]: UTF-8 codepoint escape sequences allow arbitrary number of leading zeros

From: Date: Tue, 08 Mar 2016 21:25:30 +0000
Subject: Bug->Doc #71746 [Opn]: UTF-8 codepoint escape sequences allow arbitrary number of leading zeros
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13245@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71746&edit=1 ID: 71746 Updated by: ajf@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 +Type: Documentation Problem Package: *Compile Issues PHP Version: 7.0.4 Block user comment: N Private report: N New Comment: This is a documentation bug. It was fully my intention to allow however many leading zeros you like, and whatever capitalisation you like. Previous Comments: ------------------------------------------------------------------------ [2016-03-08 21:19:17] yohgaki@php.net However, ES6 seems to have the same spec. https://mathiasbynens.be/notes/javascript-escapes#unicode-code-point IMO, this should be fixed as it only introduces complexity for validations. ------------------------------------------------------------------------ [2016-03-08 21:12:04] yohgaki@php.net This must be fixed. Recent Unicode does not allow this kind of redundant expressions. ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#13245) next »