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.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to