PHP·98 questions

What are constants in PHP?

Answer
define('NAME', 'value') — old way.
const NAME = 'value' — modern.
Do not start with $.
Cannot be changed after definition.
Class constants: Class::CONST.
Was this answer helpful?

More questions in this topic

Related questions from other topics