Arquivos
hhvm/hphp/test/vm/define.php
T
hermanv 96350d1a66 add support for late bound constants to the defined function
The defined function did not have code to deal with "static::const" expressions. Added the necessary logic.
2013-03-12 14:22:14 -07:00

38 linhas
544 B
PHP

<?php
function foo() {
require 'define_b.php';
}
function main() {
define('FOO', 42);
if (!defined('FOO')) {
echo 'how can we run phpMyAdmin without defined() working?';
exit(1);
}
define('BAR', "hello");
define('FOO', 43);
define('BIZ', array("a", "b", "c"));
var_dump(FOO);
var_dump(BAR);
foo();
var_dump(BAZ);
define('BAZ', "baz_a");
var_dump(BAZ);
define('HI', strtoupper("hello"));
echo HI;
echo HI;
echo "\n";
}
main();
function bug() {
return defined('static::SOME_CONST');
}
bug();