Bug #71994 [Asn->Csd]: Octal escape sequences are not checked for overflow
| From: | pollita@php.net | Date: | Sat, 14 May 2016 00:28:39 +0000 |
| Subject: | Bug #71994 [Asn->Csd]: Octal escape sequences are not checked for overflow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201083@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71994&edit=1
ID: 71994
Updated by: pollita@php.net
Reported by: temp at temp dot ru
Summary: Octal escape sequences are not checked for overflow
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Any
PHP Version: Irrelevant
Assigned To: pollita
Block user comment: N
Private report: N
New Comment:
Agreed course of action is that as of PHP 7.1 we'll raise a compile time warning, but continue
to allow the value to overflow. At a later time, this may be promoted to a full error, but for now
we're keeping BC.
Previous Comments:
------------------------------------------------------------------------
[2016-04-13 02:38:49] pollita@php.net
Under discussion: https://wiki.php.net/rfc/octal.overload-checking
------------------------------------------------------------------------
[2016-04-08 19:58:09] temp at temp dot ru
Description:
------------
Octal escape sequences in double quotes or backticks are not checked for overflow.
Test script:
---------------
<?php
echo ord("\777"[0]) . PHP_EOL;
echo ord("\666"[0]) . PHP_EOL;
echo ord("\555"[0]) . PHP_EOL;
Expected result:
----------------
Some kind of error, because all of \777, \666, \555 sequences are invalid, their value is greater
than 255.
Actual result:
--------------
255
182
109
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71994&edit=1