Table of contents Home page
$d = 'DOZEN'; define($d, 12); echo "The value of the constant '$d' is " . constant($d) . ".\n"; class NaturalConstants { const c = 299792458; } echo 'The speed of light is ' . constant('NaturalConstants::c') . " m/s.\n";