Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > Why do constants have quotes around when defined and class quoteshave no quotes??
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 1st November 06:07
External User
 
Posts: 1
Default Why do constants have quotes around when defined and class quoteshave no quotes??



This is a really basic question for all you people out there who know
PHP. This is not a problem but just something I'm confused about. I
was reading the article below and wondered why are normal constants
set with quotes around them, while "class constants" (those little
things I learned yesterday from the article) don't have to have quotes
around the constants when you define them? It seems really weird to me
why PHP would do it this way??

Constants: http://www.talkphp.com/showthread.php?t=1151

Could someome please explain to me the reasons why there are 2 ways to
define them - one via a function, and one via, what is it? A language
construct? I don't know. The latter having no quotes around to
define!! Really weird.
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666