You are here: Re: if an multiple statements « PHP Programming Language « IT news, forums, messages
Re: if an multiple statements

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация