Why do constants have quotes around when defined and class quotes have no quotes??

Why do constants have quotes around when defined and class quotes have no quotes??

Post by adam.timbe » Wed, 12 Dec 2007 23:00:31


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.yqcomputer.com/

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.