Jay I. wrote:
> interesting idea, thanks. but unfortunately it won't help me as i really
> need to pass arrays as a single argument like this:
> 
> my_func($param_1,$param_2,array(...));

You can do that. All parameters in a row with => will be merged to one
array.

You could call
        myfunc($a, $b, 'foo' => "bar", 'qux' => "quux");
with our patch

You can free mix arrays and scalar values like
        myfunc($a, 'b' => "foo", $c, 'd' => "bar", ...);
which is the same as
        myfunc($a, array('b' => "foo"), $c, array('d' => "foo"), ...);

And if you need two separate arrays in a row you can still go back to
having array() for the second one (but we avoid parameter lists like that).

Ok, enough plugging of that syntax on the list, further replies will be
off-list ;-)

- Chris


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to