php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5469 null string tests equal to integer zero
Submitted: 2000-07-08 20:46 UTC Modified: 2000-07-09 00:00 UTC
From: bill at rsv dot ricoh dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1pl2 OS: RH6.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bill at rsv dot ricoh dot com
New email:
PHP Version: OS:

 

 [2000-07-08 20:46 UTC] bill at rsv dot ricoh dot com
if (0*0 =="")
     echo "<font color='red'>Oops!  0 == \"\"</font>";
else
     echo "<font color='green'>OK  0 != \"\"</font>";


'./configure' '--with-mysql' '--with-apache=../apache_1.3.12' '--enable-track-vars'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-09 00:00 UTC] bill at rsv dot ricoh dot com
The '==' operator tests numerical equality REGARDLESS OF TYPE, hence the results are correct.  The '===' operator tests equality of value AND type, and would yield the desired results here.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 28 11:01:30 2024 UTC