On Tue, 2003-10-07 at 14:51, Robert Cummings wrote:
>
> The original post came from someone being lazy, that appears to be
> influencing my take on the thread :) Also given the above code, it's
> completely pointless since the first operand is true and so it is
> impossible for return( 'foo' ) to ever be evaluated (and as stated in a
> post just before this the expression shouldn't break). Nonetheless given
> a variable as the first operand, I think anyone coding a return in a
> conditional like that is asking for trouble since I would guess that it
> has an undefined return value.

I would say the real issue at hand here is that the return statement is
not a fucntion, but rather a language construct, thus it cannot be used
as a function unless explicitly stated as so. The reason a parse error
is occurring is because this particular construct has no support for
being used in the given context. It would be like dropping in any other
language construct suddenly such as a { or @ where it is not understood.
Given that die() and exit() works just means they have been given
support for this context.

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