php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41756 It was bogus
Submitted: 2007-06-21 10:01 UTC Modified: 2007-06-21 21:44 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: vinod dot lakhanpal at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.4.7 OS: linux
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: vinod dot lakhanpal at gmail dot com
New email:
PHP Version: OS:

 

 [2007-06-21 10:01 UTC] vinod dot lakhanpal at gmail dot com
Description:
------------
Hi
Just try this

$tmp="flight&Hotel&Car";
if($tmp=="flight&Hotel&Car"){
 echo "Hello vinod";
}else{
 echo "Bye vinod"; 
}

to your surprise it will display "Bye vinod" where as it should have displayed "Hello vinod".
Its really astonishing that nobody pointed this error in php.



Reproduce code:
---------------
$tmp="flight&Hotel&Car";
if($tmp=="flight&Hotel&Car"){
 echo "Hello vinod";
}else{
 echo "Bye vinod"; 
}

Expected result:
----------------
Hello vinod

Actual result:
--------------
Bye vinod

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-21 11:00 UTC] vinod dot lakhanpal at gmail dot com
Oops it was my fault . I was converting the & into & before comparing . Soory.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Nov 30 16:00:01 2025 UTC