Derick Rethans wrote: > On Fri, 16 Apr 2004, Marcus Boerger wrote: > >> [RFC] ifsetor operator >> >> Hello List, >> >> i also agrre that an internal function is much better. And here is >> it as such an internal function (that does not result in an expensive >> function call). >> >> Synopsis: "ifsetor" "(" value "," default ")" > > <snip> > > I don't like this name though, the rest sounds ok. > > Other possibilities: > > ifset > default > > I don't like a new short-cut operator either; it doesn't fit in the > spirit of PHP IMO. > > regards, > Derick
doesn't this function sort of work like the SQL function coalesce()? in SQL (SQL92, i think?) coalesce() takes any number of arguments and returns the first one that isn't NULL and returns NULL if everything is NULL. would that sort of fit in here? even if the name doesn't fit, that might actually be a useful addition, to let the function accept any number of parameters and return the first one that isn't NULL or the first one that has already been set. J -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php