PHP Class Constants

It is possible to define constant values on a per-class basis remaining the same and unchangeable. Constants differ from normal variables in that you don’t use the $ symbol to declare or use them.

CONSTANT
<?php

class MyClass
{
const CONSTANT = ‘Kiran’;

function showConstant() {
echo self::CONSTANT . “\n”;
}
}

echo MyClass::CONSTANT . “\n”;

?>

OUTPUT :
Kiran