|
Posted by Rik Wasmus on 01/07/08 16:28
On Mon, 07 Jan 2008 17:24:29 +0100, jodleren <sonnich@hot.ee> wrote:
> if( $goahead && copy($somefile1, $somefile2) )
> echo "hello world";
>
> What if $goahead is false, will the if the fall, or test all of the
> statements?
In PHP, failure of $goahead will mean copy() is not checked/executed in
this case.
> I can make a complex if system, but eventuallt I can keep it simple
> here...
Well, short from a programmers standpoint indeed. Being more verbose often
doesn't hurt though, and makes code somewhat more flexible/debuggable.
Depends on the actual need offcourse.
--
Rik Wasmus
[Back to original message]
|