On Tue, Apr 13, 2010 at 1:10 AM, Stanislav Malyshev <s...@zend.com> wrote: > Hi! > >> Proposed new syntax of this case: >> >> function foo($x,$y){ >> $options = func_get_args(); >> if ( !isset($options['opt1']) ) $options['opt1'] = 'foo'; >> if ( !isset($options['opt2']) ) $options['opt2'] = 'bar'; >> /* 1 */ >> } > > I 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? Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php