php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8495 Bug #6818 continued
Submitted: 2000-12-30 13:51 UTC Modified: 2001-01-30 05:04 UTC
From: mark at dreamzpace dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.0.4 OS: Linux Redhat 6.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mark at dreamzpace dot com
New email:
PHP Version: OS:

 

 [2000-12-30 13:51 UTC] mark at dreamzpace dot com
In response to (the closed) bug #6818 (I can't reopen it):

Using === instead of == is not a solution in my opinion:
- it's not compatible with older code (php3)
- it's still a bug: comparing a variable with value 0 with a string should always return 'false', regardless the type.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-09 10:27 UTC] stas@php.net
Could you please describe your problem and give an example
of faulty code?
 [2001-01-10 14:43 UTC] mark at dreamzpace dot com
Taken from bug 6818:

<?

$variable = 0;

if ($variable == "some_string")
{
  print "This must be a bug?! Variable set as $variable.\n\n<br>";
  $variable++;
  if ($variable != "some_string")
  {
    print "But with variable set as $variable it works fine.\n\n";
  }
}
else
{
  print "This works as I expected.\n\n";
}

?>
 [2001-01-30 05:04 UTC] sniper@php.net
This is not a bug.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC