Re: Re: Named Parameters
| From: | Stanislav Malyshev | Date: | Mon, 12 Apr 2010 23:28:32 +0000 |
| Subject: | Re: Re: Named Parameters | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47898@lists.php.net to get a copy of this message | ||
Hi!
I think that's the idea in general, now how it looks like - be it 'opt1' => 'no-foo' or opt1: 'no-foo' - that's the decision we need to take. I personally still don't have the favorite, but in every case we still have the full params list, otherwise the whole story is kind of useless - we can pass arrays as arrays now. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.comI think the idea is to do: function foo($x,$y, $opt1 = 'foo', $opt2 = 'bar'){ } foo(1,2); foo(1,2,'opt1'=>'no-foo');That's the idea if we can't do (1, opt1 = 'foo') or?