note 102246 rejected from control-structures.switch by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: ashok at pushlife dot com 

----

NEED HELP!  

So I'm using the switch statement like this:

switch($state) {
        case ($state === 204):
                if ($state == 0) {
                    $transactions['Success'] += $cnt;                    
                    echo "THIS GETS PRINTED!";
                    break;
                }
                $transactions['Fail'] += $cnt;
                $transactions['SOAP Error (204)'] += $cnt;
                break;
}

The echo actually gets printed!  How is this possible?  I did the strict and the loose compare and both give the same results!  This is making me go crazy!  Please help!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.