On Sun, 2005-10-30 at 09:52 +0100, Ron Korving wrote: > I'm a big fan of coalesce($param1, $param2, ..., $paramN) (or firstset()). > The syntax allows for more than what ifsetor($var, $value) would do. > Ifsetor() could be done in userspace, but I don't see how coalesce() could, > because of the variable number of parameters.
It's not so much the variable number of parameters as the fact that it has to receive a variable that may not be set. Using a user-space function will cause an E_NOTICE to be thrown every time the function is used, because it's receiving an unset variable. It needs to be a language construct. FWIW, I like the $a ?? $b and $a ??= $b idea. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.name/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurch 8015, New Zealand -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php