You are here: Re: php best practise « PHP Programming Language « IT news, forums, messages
Re: php best practise

Posted by fiziwig on 03/12/06 09:36

I've been programming since the middle of the 20th century and I still
type '=' when I mean '=='. One trick I learned is this:

if ($string = 'fred') will NOT generate a syntax error.

if ('fred' = $string) WILL generate a syntax error. You can't assign a
variable to a constant.

Put the constants first in compares and if it's not '==' it will warn
you.

That doesn't solve you larger problem, but it might help avoid one
common debugging annoyance.

--gary shannon

 

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

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