Arquivos
hhvm/hphp/test/quick/undefined-variable.php
T
Mark Williams a2e46efe38 Make sure we raise a warning in repo mode
Repo mode can skip undefined variable warnings,
if they're known to be uninit at compile time, and eliminate
expressions whose only side effect might be to raise a
diagnostic.
2013-04-22 14:43:52 -07:00

14 linhas
175 B
PHP

<?php
function foo() {
if (isset($GLOBALS['b'])) $b = 0;
return $b;
}
foo();
function baz($x) {}
function bar() {
if (isset($GLOBALS['a'])) $a = 0;
baz($a);
}
bar();