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

Posted by rlee0001 on 03/12/06 12:55

Gary,

One thing about that is that it is counter-intuitive to read. For
example you are not asking "if 'fred' equals your name..." but rather
"if your name equals fred'...".

That said, your method is a very practical solution to a common
problem.

In a way I kinda wish that the '=' operator worked like the ECHO
construct in that you wouldn't be able to use it as a function. That
way if your source tried to actually look at the result of an '='
assignment a syntax error would occur (like the distinction between
echo and print). The only side effect would be that you would be unable
to chain assignments like this:

a = b = c = d = 0;

But an alternate method could be added to the language such as:

(a, b, c, d) = 0;

Which I think is actually used by LISP if I recall correctly.

But of course I'm just dreaming/thinking out loud here. :o)

-Robert

 

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

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