php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25414 All variables == 08 | 09 | 00
Submitted: 2003-09-07 11:27 UTC Modified: 2003-09-07 11:48 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: webmaster at demomusic dot nu Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.3 OS: WinXP, Unix
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: webmaster at demomusic dot nu
New email:
PHP Version: OS:

 

 [2003-09-07 11:27 UTC] webmaster at demomusic dot nu
Description:
------------
Every variable, uninitiated or == "", returns true when compared with 00, 08 or 09. 

Standard compilation + gd2 library. phpver 4.3.3, bug tested on both WinXP using apache and Unix using apache. On WinXP: no changes to php.ini-dist than different includepath. 

Reproduce code:
---------------
if ($foo == 00) {echo "Allthough this should not show, it shows<br>";}
if ($foo == 08) {echo "Allthough this should not show, it shows<br>";}
if ($foo == 09) {echo "Allthough this should not show, it shows<br>";}

Actual result:
--------------
Allthough this should not show, it shows
Allthough this should not show, it shows
Allthough this should not show, it shows

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-07 11:30 UTC] derick@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

octal numbers, manual... figure it out.
 [2003-09-07 11:39 UTC] webmaster at demomusic dot nu
Can't find any general information about them octal numbers, maybe someone could post some info about this here?

http://www.google.com/search?q=octal%2Bnumbers+site:www.php.net
 [2003-09-07 11:46 UTC] webmaster at demomusic dot nu
I still see this as a bug, since my script doesn't act the expected way because of it. I am using it in a <select>:
<option value=01 <?if ($form_hour == 01) echo "selected";?>>01
<option value=01 <?if ($form_hour == 02) echo "selected";?>>02 etc
<option value=01 <?if ($form_hour == 08) echo "selected";?>>08

And when $form_hour is == to 02 or anything under 09, the selected <option> is always 09. Irritating, and a bug, in my eyes
 [2003-09-07 11:48 UTC] derick@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. 

Thank you for your interest in PHP.

Keep this bogus, it's not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC