note 10872 deleted from switch by ronabop

From: Date: Sun, 25 Feb 2001 00:40:58 +0000
Subject: note 10872 deleted from switch by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-11537@lists.php.net to get a copy of this message
There is some limited functionality to use more complex expressions in the 'case', but it behaves strange. for($i = 0 ; $i < 10 ; $i++) { switch($i) { case $i<6: print $i; break; default: print "foo"; break; } } prints foo12345foofoofoofoo. for($i = 0 ; $i < 10 ; $i++) { switch($i) { case $i<6 && $i > 3: print $i; break; default: print "foo"; break; } } prints 0foofoofoofoofoofoofoofoofoo

« previous php.notes (#11537) next »