ID: 47259
User updated by: jesusgonzalez at hotmail dot com
-Summary: Error on eval with left ceroes (example : eval('08');
Reported By: jesusgonzalez at hotmail dot com
Status: Bogus
Bug Type: *General Issues
Operating System: FEDORA CORE 9
PHP Version: 5.2CVS-2009-01-31 (snap)
New Comment:
Why the offensive answer?
Previous Comments:
------------------------------------------------------------------------
[2009-01-31 23:42:21] [email protected]
Welcome new user to wonderful world of programming. Next lesson:
Figure out how to use a search engines in general. You wasted my time
and caused significant amount of carbon dioxide emissions by
submitting this report.
Hint: OCTAL..
------------------------------------------------------------------------
[2009-01-31 23:39:42] jesusgonzalez at hotmail dot com
Description:
------------
There's something wrong when evaluating '08' and '09' as number.
Reproduce code:
---------------
<?php
echo 'Version: ' . phpversion() . "<br>";
eval('$one = (01);'); echo $one . "<br>";
eval('$two = (02);'); echo $two . "<br>";
eval('$three = (03);'); echo $three . "<br>";
eval('$four = (04);'); echo $four . "<br>";
eval('$five = (05);'); echo $five . "<br>";
eval('$six = (06);'); echo $six . "<br>";
eval('$seven = (07);'); echo $seven . "<br>";
eval('$eight = (08);'); echo $eight . "<br>";
eval('$nine = (09);'); echo $nine . "<br>";
eval('$ten = (10);'); echo $ten . "<br>";
echo "<br>";
?>
Expected result:
----------------
Version: 5.2.6
1
2
3
4
5
6
7
8
9
10
Actual result:
--------------
Version: 5.2.6
1
2
3
4
5
6
7
0
0
10
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47259&edit=1