- var_dump: documentation ( source)
- define: documentation ( source)
<?php
// define class constant linking to a not defined constant
const CONST_FOO = FOO;
const CONST_BAR = BAR;
echo "Define the linked constant AFTER reading:\n";
CONST_FOO;
define('FOO', 'Value of FOO');
var_dump(CONST_FOO);
echo "Define the linked constant BEFORE reading:\n";
define('BAR', 'Value of BAR');
var_dump(CONST_BAR);