- var_dump: documentation ( source)
- define: documentation ( source)
<?php
/*
https://bugs.php.net/bug.php?id=67897
*/
namespace Foo\Bar\Baz;
function before(){
return A_RELATIVE_CONSTANT;
}
define('A_RELATIVE_CONSTANT', 'GLOBAL');
var_dump(before());
define('Foo\\Bar\\Baz\\A_RELATIVE_CONSTANT', 'RELATIVE');
function after(){
return A_RELATIVE_CONSTANT;
}
var_dump(before());
var_dump(after());