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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 14:01:35 2025 UTC