php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25626 Variables containing number starting with 0 (Zero) become 0 (Zero)
Submitted: 2003-09-22 06:23 UTC Modified: 2003-09-22 06:53 UTC
From: sameh dot attia at tedata dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.3 OS: RHL 9
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: sameh dot attia at tedata dot net
New email:
PHP Version: OS:

 

 [2003-09-22 06:23 UTC] sameh dot attia at tedata dot net
Description:
------------
If u assigned a variable x any value that starts with 0; like 09; then the value inside the varaible becomes 0.

This also happens when calling functions; paramters passed to the function suffer the same bug.


Reproduce code:
---------------
<?php

$VarX = 09;

echo "VarX = $VarX\n";
FunY(09);

function FunY($VarY)
{
        echo "VarY = $VarY\n";
}
?>

Expected result:
----------------
VarX = 09
VarY = 09

Actual result:
--------------
VarX = 0
VarY = 0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-22 06:53 UTC] sniper@php.net
RTFM: http://www.php.net/manual/en/language.types.integer.php
About what is octal number..

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 09:01:32 2025 UTC