php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60037 The octal interpreter wrongs...
Submitted: 2011-10-11 07:59 UTC Modified: 2011-10-11 22:16 UTC
From: seinghhaccoski at rocketmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.8 OS: Linux Ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: seinghhaccoski at rocketmail dot com
New email:
PHP Version: OS:

 

 [2011-10-11 07:59 UTC] seinghhaccoski at rocketmail dot com
Description:
------------
The octal interpreter wrongs...

Test script:
---------------
echo 010 + 090;

Expected result:
----------------
an error.....

Actual result:
--------------
8

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-11 22:16 UTC] felipe@php.net
-Status: Open +Status: Bogus
 [2011-10-11 22:16 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See the documentation about the behavior with invalid octal numbers:
http://docs.php.net/integer

Thanks.
 [2011-10-12 23:02 UTC] anon at anon dot anon
You've gotta admit though, even by PHP standards, this is an appalling quirk.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 00:01:31 2025 UTC