* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> On Wed, 2003-10-08 at 11:43, Curt Zirzow wrote:
> > * Thus wrote Chris Shiflett ([EMAIL PROTECTED]):
> > > --- "Ford, Mike [LSS]" <[EMAIL PROTECTED]>" <[EMAIL PROTECTED]> wrote:
> > > > Firstly, "or", as a Boolean operator requires two operands, both of
> > > > which must have an actual value.
> > >
> > > [snip]
> > >
> > > > statements don't have a value (and can't even be coerced to have
> > > > one), so "return" can't be valid as one of the operands to "or".
> > >
> > > Based on yesterday's discussion, this seems to be a very common misconception.
> > > I will try to clear it up.
> >
> > To add this, the 'include' family also accepts this construct:
> >
> > condition or include(file);
> >
> > Which also violates the rule that statments (constructs) dont have return
> > values.
> >
>
> This isn't a rule per se since it really depends on whether special
> treatment was given to the construct. The internals developers probably
> didn't see a need to provide support for "return" in conditionals since
> it can't return a value to the conditional. Incidentally does return in
> this manner work in perl since it appears that's what the "or die()"
> stuff is attmepting to mimic.
perl:
0 or return;
Works fine.
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php