You are here: Re: [PHP] define (true/false) « PHP « IT news, forums, messages
Re: [PHP] define (true/false)

Posted by Vidyut Luther on 11/14/93 11:22

Exactly,
CONSTANTS are ... "eternal truths" to the program, they shouldn't
change, constants should not be changing based on arguments being
passed, or other variables.
by definition, it's no longer a constant, and a misuse of the define
() function.




On Jul 28, 2005, at 8:46 AM, Jay Blanchard wrote:

> [snip]
>
> WHY?
> [/snip]
>
> [moresnip]
> But you would never want to use a variable to determine a constant
> because the variable is not likely to be the same (that is why we call
> them variables) on any iteration. Using constants in expressions is
> OK,
> for instance
>
> if(BAR == $foo){
> ...stuff...
> }
>
> But modifying a constant is a no-no.
> [/moresnip]

 

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

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