ID: 19073
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Variables related
Operating System: Red Hat Linux 7.2
PHP Version: 4.2.2
New Comment:
hello
Tis is not a bug, u had placed a semi-colon after the if staement, so
print is not includeed in the if condition cheking, so it priints Y is
set.
bye
geethanandh
Previous Comments:
------------------------------------------------------------------------
[2002-08-23 11:20:14] [EMAIL PROTECTED]
The script was written incorrectly.
------------------------------------------------------------------------
[2002-08-23 11:19:06] [EMAIL PROTECTED]
$x = "";
if (isset($x))
print "X is set\n";
if (isset($y));
print "Y is set\n";
if (strlen($x) > 0)
print "X is set (SL)\n";
if (strlen($y) > 0)
print "Y is set (SL)\n";
###
The following script should at best print 'X is Set' because $x has
been set to "". However This is my output:
X is set
Y is set
$y is nowhere defined in the script, yet isset returns it as set.
Please feel free to contact if you need any more info.
Timothy M. Crider
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19073&edit=1