note 6848 deleted from control-structures.switch by betz
| From: | betz@php.net | Date: | Wed, 29 Mar 2006 02:28:43 +0000 |
| Subject: | note 6848 deleted from control-structures.switch by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106899@lists.php.net to get a copy of this message | ||
Note Submitter: joe at -SPAM-modjeski dot net
----
Just my 2 bits. Now that PHP4 supports variable function arguments, based on example 2 you should be
able to assign vars like this:
<?php
switch (func_num_args()){
case 3:
$arg2 = func_get_arg(2);
case 2:
$arg1 = func_get_arg(1);
case 1:
$arg0 = func_get_arg(0);
break;
}
?>