php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44549 Serious Problem with integer literals 08 and 09
Submitted: 2008-03-27 12:29 UTC Modified: 2008-03-27 12:33 UTC
From: zootsuitbrian at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.5 OS: Linux version 2.6.16.33
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: zootsuitbrian at gmail dot com
New email:
PHP Version: OS:

 

 [2008-03-27 12:29 UTC] zootsuitbrian at gmail dot com
Description:
------------
if you use the integer literals of 08 or 09, the php parser 
interprets them as an integer of value 0.

Reproduce code:
---------------
<?php
var_dump(07, 08, 09, 10);
?>


Expected result:
----------------
int(7)
int(8)
int(9)
int(10)

Actual result:
--------------
int(7)
int(0)
int(0)
int(10)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-27 12:33 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 about octal numbers.
http://docs.php.net/integer
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Dec 04 05:00:01 2025 UTC