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
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: ajay at idealtechnologys dot com
New email:
PHP Version: OS:

 

 [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: Sun Dec 22 01:01:30 2024 UTC