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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Sat Jul 12 21:01:31 2025 UTC