note 75931 deleted from control-structures.switch by colder
| From: | colder@php.net | Date: | Fri, 22 Jun 2007 06:54:10 +0000 |
| Subject: | note 75931 deleted from control-structures.switch by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127880@lists.php.net to get a copy of this message | ||
Note Submitter: hyponiq at gmail dot com
Reason: in docs
----
What about type switching?
i.e.
switch ($var) {
case is_int($var):
echo "$var is type 'int'.\n";
case is_array($var):
echo "$var is type 'array'.\n";
case is_object($var):
echo "$var is type 'object'.\n";
}
does that work?