Hey: On Sun, Jan 11, 2015 at 6:37 AM, Andrea Faulds <a...@ajf.me> wrote: > Hey internals, > > A longstanding PHP bug is that invalid octal digits simply terminate the > literal and are ignored, rather than generating a compile error. Thus, this > is valid: > > $x = 0109; // same as 010, or 8 > > I see no particular reason why this behaviour should be preserved. I’ve > written a patch that would finally fix it, and avoid similar parsing issues > in future (e.g. the resurgence of the hex addition bug), by erroring when > strtol doesn’t reach the end of the literal. > > The pull request is here: https://github.com/php/php-src/pull/987 > > I think this would be an acceptable BC break for PHP 7. Agree, IMO previously behavior actually is a bug...
thanks > > Thoughts? > -- > Andrea Faulds > http://ajf.me/ > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Xinchen Hui @Laruence http://www.laruence.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php