php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13828 switch problem
Submitted: 2001-10-25 16:35 UTC Modified: 2001-10-25 17:12 UTC
From: happyclik_2000 at yahoo dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: Red Hat 7.0
Private report: No CVE-ID: None
 [2001-10-25 16:35 UTC] happyclik_2000 at yahoo dot com
The following print "ok". Isn't it a bug?

 $a = "a";
 switch ($a) {
        case 0:
                echo "ok";
                break;
        case "a":
                echo "a";
                break;
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-25 17:06 UTC] hholzgra@php.net
not realy, as "a"==0 is true (opposed to "a"===0)
 [2001-10-25 17:12 UTC] jpm@php.net
Not a bug -> bogus.

--Joao
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 04:01:26 2024 UTC