If it were possible at all to make a function accept unset variables without
generating a notice, I think ifsetor() shouldn't even be implemented. People
could then have the freedom to create such functions themselves. But
unfortunately, it doesn't seem to be possible, unless you'd suppress every
function call with a @, which I don't think is the way to go in this case.

So if it would be possible somehow to create your own isset()-like functions
in PHP-code, I'd say implement something that would make that possible, and
ingore the whole ifsetor() discussion from that moment on. People would be
free to write whatever function they'd prefer.

Ron


""Sara Golemon"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > > What about ifsetor for 5.1 ?
> >
> > Would anybody be interested in a parameter for ifsetor() that would
treat
> > isset() as !empty() or an alternative function that achieves this? I
know
> > I'd love to see that. I use empty() a lot more than isset().
> >
> In the interrest of KISS, I'd leave the emptiness concept out of the
> picture.  Unlike isset-ness, an emptiness coalesce *can* be done in
> userspace:
>
> function firstNotEmpty() {
>     $vars = func_get_args();
>     foreach($vars as $var)
>         if (!empty($var)) return $var;
>     return NULL;
> }
>
> There's enough....contention over the undeniably useful and
> not-implementable-in-userspace parts of this thread that it's not worth
> muddling it up with things that are a simple matter to do in userspace.
It
> doesn't matter that notempty() and ifsetor() could easily be implemented
by
> the same opcode (just like isset/empty are).
>
> -Sara

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

Reply via email to