[PHP-DEV] Re: ifsetor(), goto, 5.x, my two cents

2005-06-09 Thread Taco van den Broek
It will be difficult to define the check for such a coalesce function that everybody agrees on. Personnally I like the !empty test, but would want it to check on != 0 too. Most probably my favourite check would be something like: !empty($foo) || (string)$foo !== '' Someone else might want thi

Re: [PHP-DEV] Re: ifsetor(), goto, 5.x, my two cents

2005-06-09 Thread Noah Botimer
Ron, I was thinking about behavioral variants but left them out to keep my message shorter. I haven't really thought of a clean way to use one named function to provide both types of functionality. I was originally thinking of a constant parameter to indicate a "mode" but with the arbit

[PHP-DEV] Re: ifsetor(), goto, 5.x, my two cents

2005-06-08 Thread Ron Korving
I must say, I like the coalesce() idea a lot. It gives more flexibility over ifsetor() which sounds to me like it only handles 1 variable that is or isn't set. coalesce() would handle any number of variables. Here's something else to consider though: Would anybody be interested in a parameter for