Hello,
I've been following this thread since it started... In my years of PHP programming, I never had a problem with passing an array to a function and using it's keys.
If this is about not typing array(), then I must say I strongly disagree with the proposal. Shoot, with arrays, it's simple to define default parameters.
function foo($aArgs) { $aArgs += array('SomeID' => 0, 'DoThat' => TRUE);
}
Required keys can even be checked for with a quick array_diff().
For the amount of times that it would *probably* be used, I don't think it's worth adding new syntax for.
Sincerely, Jason Garber
At 6/24/2004 10:55 PM +0000, Daniel Crookston wrote:
Okay, so keyword arguments probably won't be implemented. "Ice cube's chance in hell" is the phrase I recall being thrown around. I have two questions:
1. Why not?
2. Where do I start with my own copy of PHP to put it in? (The reason I asked about it initially is that I thought it'd be a fun first "Let's modify PHP" project.
And, finally - our messages are logged, aren't they? Why don't we trim quoted emails? No need to log all those old things.
Dan
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php