|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17766 Variable doesnt Exist if the value of the Variable is Zero
Submitted: 2002-06-14 17:50 UTC Modified: 2002-06-14 17:51 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: dmdeathmaker at aol dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.1 OS: Win9x
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
4 + 13 = ?
Subscribe to this entry?

 [2002-06-14 17:50 UTC] dmdeathmaker at aol dot com

anyone i know who trys to test a variable do it this way:
for Example a URL-Submitted value:
(http://localhost/somephp.php?variable=0 dont works)
(http://localhost/somephp.php?variable=1 works)
(http://localhost/somephp.php?variable=2 works)

Global $variable;
if ($variable)
 echo "Variable Exist";
} else { echo "Variable dont Exist"; }

You perhaps use it too ...
the problem is :) if the variable is value anythings
fine til the point the variable-value ist zero ... thats
the point the variable exist nomore ...
only way to proof the existens is

if (strlen($variable)!=0) echo "variable exist";

i think thats a bug ....

MfG Cybergen, Member of the Softeis Hacker Crew

PS: I think thats a generally problem


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-14 17:51 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 13:01:27 2024 UTC