Re: or return problem
| From: | Robert Cummings | Date: | Tue, 07 Oct 2003 17:06:24 +0000 |
| Subject: | Re: or return problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165334@lists.php.net to get a copy of this message | ||
On Tue, 2003-10-07 at 13:02, Pat Carmody wrote:
>
>
> Calling the following retor_test() function causes a "Parse error: parse
> error, unexpected T_RETURN" message when the script is run:
>
> function istrue() {
> return true;
> }
> function retor_test() {
> istrue() or return( "False" );
> return "True";
> }
>
> The problem is with the "or return" part. Any ideas why? I realize that
> I could use an if statement instead, but I'm a lazy, lazy man and I don't
> want to.
Your laziness is causing you problems. Please check out ALL of the
documenation located at http://www.php.net since this is covered
under
basic syntax and we don't cater to lazy people (at the very least *I*
don't cater to lazy people).
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. |
`------------------------------------------------------------'