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