php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54959 Report One Bug For 08 And 09 Numbers In functions
Submitted: 2011-05-31 07:32 UTC Modified: 2011-05-31 07:48 UTC
From: farszabanan at yahoo dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.6 OS: All
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: farszabanan at yahoo dot com
New email:
PHP Version: OS:

 

 [2011-05-31 07:32 UTC] farszabanan at yahoo dot com
Description:
------------
<?php

/*
Report One Bug For 08 And 09 Numbers In functions
*/

function test_1($number){echo $number;}

echo test_1(08); // out: 0
echo test_1(8); // out: 8

echo test_1(09); // out: 0
echo test_1(9); // out: 9

/* Only for 08 and 09 _ Example: */

echo test_1(07); // out: 7
echo test_1(7); // out: 7

?>

Test script:
---------------
<?php

/*
Report One Bug For 08 And 09 Numbers In functions
*/

function test_1($number){echo $number;}

echo test_1(08); // out: 0
echo test_1(8); // out: 8

echo test_1(09); // out: 0
echo test_1(9); // out: 9

/* Only for 08 and 09 _ Example: */

echo test_1(07); // out: 7
echo test_1(7); // out: 7

?>

Expected result:
----------------
<?php

/*
Report One Bug For 08 And 09 Numbers In functions
*/

function test_1($number){echo $number;}

echo test_1(08); // out: 0
echo test_1(8); // out: 8

echo test_1(09); // out: 0
echo test_1(9); // out: 9

/* Only for 08 and 09 _ Example: */

echo test_1(07); // out: 7
echo test_1(7); // out: 7

?>

Actual result:
--------------
<?php

/*
Report One Bug For 08 And 09 Numbers In functions
*/

function test_1($number){echo $number;}

echo test_1(08); // out: 0
echo test_1(8); // out: 8

echo test_1(09); // out: 0
echo test_1(9); // out: 9

/* Only for 08 and 09 _ Example: */

echo test_1(07); // out: 7
echo test_1(7); // out: 7

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-31 07:48 UTC] scottmac@php.net
-Status: Open +Status: Bogus
 [2011-05-31 07:48 UTC] scottmac@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Numbers beginning with a 0 are octal numbers.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 04:01:35 2025 UTC