Bug #71994 [Opn]: Octal escape sequences are not checked for overflow
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: Open
Type: Bug
Package: Scripting Engine problem
Operating System: Any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Under discussion: https://wiki.php.net/rfc/octal.overload-checking
Previous Comments:
------------------------------------------------------------------------
[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
Thread (4 messages)