Re: FW: Functionality request/proposal
| From: | Stas Malyshev | Date: | Mon, 14 Jan 2013 08:22:29 +0000 |
| Subject: | Re: FW: Functionality request/proposal | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64925@lists.php.net to get a copy of this message | ||
Hi!
> function multi() {
> return 10, 20;
> };
This can be done with:
function multi() {
return [10, 20];
}
list($x, $y) = multi();
However, sum() won't work this way:
> echo sum(multi()); // echoes 30
But can work this way:
call_user_func_array("sum", multi());
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227