On Tue, 7 Oct 2003, Curt Zirzow wrote:

>> function istrue() {
>>   return true;
>> }
>> function retor_test() {
>>   istrue() or return( "False" );
>>   return "True";
>> }

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

This doesn't answer the problem because it does not follow the same
logic as the orignial code example.  In your example you want to return a
value regardless of what istrue() returns.  In my example I only wanted to
return a value if istrue() failed, otherwise I wanted to continue in the
scope of the function.  That may not have been obvious because the example
was a little contrived.


Pat Carmody

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

Reply via email to