php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68633 when we apply "08+05=5" then result 5
Submitted: 2014-12-20 06:57 UTC Modified: 2014-12-20 06:59 UTC
From: ajay at idealtechnologys dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.4.36 OS: ubuntu
Private report: No CVE-ID: None
 [2014-12-20 06:57 UTC] ajay at idealtechnologys dot com
Description:
------------
when we add 08+05 result showed 5 and we 
apply 07+5 then  showed 12.

Test script:
---------------
echo $order=08+05; 

Actual result:
--------------
13

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-20 06:59 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2014-12-20 06:59 UTC] requinix@php.net
A leading zero means octal, but 08 is invalid so it becomes just 0.
http://php.net/manual/en/language.types.integer.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC