Re: or return problem
| From: | Chris Sherwood | Date: | Tue, 07 Oct 2003 17:08:03 +0000 |
| Subject: | Re: or return problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165335@lists.php.net to get a copy of this message | ||
Well Unfortunately pat
You are going to have to be an unlazy man and use an if statement
Chris
>
> 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.
>
>
> Pat Carmody
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>