Arquivos
hhvm/hphp/test/quick/define.php
T
ptarjan 6e899255c6 move .php files to .inc in test/quick that aren't tests
Instead of having a blacklist on name, how about we use a different file extension for included files? Many PHP installs do this for files that are in the document root but shouldn't be served.
@override-unit-failures
2013-04-17 10:12:47 -07:00

38 linhas
542 B
PHP

<?php
function foo() {
require 'define.inc';
}
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();