In PHP, constants are identifiers for simple values that do not change during the execution of a script i.e. remains unchanged. Constant identifiers are always in uppercase by convention.
The define() is a built in function which is used to define a constant.
<?php
define("CONTSTANT_NAME", "constant_value");
?>
The `const` keyword is an alternative way to define constants, which was introduced in PHP 5.3.
<?php
const CONSTANT_NAME = "constant_value";
?>
<?php
define("PI", 3.14);
const PIE = 3.14;
echo PI;
echo PIE;
?>
Note: There is no need to use `$` in name convention and by default constants names are case-sensitive.