RE: [PHP] Re: Looking for caveats to the following code

2006-08-18 Thread Ford, Mike
On 17 August 2006 23:28, Adam Zey wrote: > > Better to do this: > > if ( ($result = do_something('hello')) !== false ) > { >// do something with $result > } > else > { >// do some other stuff > } > > The result of an assignment like "$result = do_something('hello')" is > itself the resu

[PHP] Re: Looking for caveats to the following code

2006-08-17 Thread Adam Zey
Chris W. Parker wrote: Hello, While experimenting with some object stuff I stumbled upon something new (although not object related). Normally I would do this: Using the same function above I discovered I can do this: The issue is whether or not this is a safe test. My initial thought is