note 94577 added to control-structures.switch

From: Date: Thu, 12 Nov 2009 19:12:13 +0000
Subject: note 94577 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-162820@lists.php.net to get a copy of this message
<?php /* * Note that there will adulterated results if a case is filled * with <true> * it will always passed */ $str='test'; switch ($str){ case true: echo "true";break; case 'test': echo "no results here";break; case 2: echo "2"; break; case false: echo "false"; break; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 78.52.167.21 ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- https://master.php.net/note/edit/94577 Del: integrated -- https://master.php.net/note/delete/94577/integrated Del: useless -- https://master.php.net/note/delete/94577/useless Del: bad code -- https://master.php.net/note/delete/94577/bad+code Del: spam -- https://master.php.net/note/delete/94577/spam Del: non-english -- https://master.php.net/note/delete/94577/non-english Del: in docs -- https://master.php.net/note/delete/94577/in+docs Del: other reasons-- https://master.php.net/note/delete/94577 Reject -- https://master.php.net/note/reject/94577 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162820) next »