* Thus wrote Pat Carmody ([EMAIL PROTECTED]):
> 
> 
> 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.

I wouldn't call this lazy, more like sloppy and confusing.

  return (istrue()? 'True': 'False');
  
hmm.. less typing, easier to understand and logically readable.

Curt
-- 
List Stats: http://zirzow.dyndns.org/html/mlists/php_general/

"I used to think I was indecisive, but now I'm not so sure."

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

Reply via email to