6f223125a5
"$unused_local = UndefinedConstant;" was being optimized away, so we didnt get a warning for the constant. return it instead. $unused_local = new Object; return; became new Object; return; This affected the (unspecified) order of destruction of $this vs $unused_local. Since we're specifically trying to test that we dont crash when a local generates a backtrace after $this has been destroyed, force the variable to be used.
22 linhas
273 B
PHP
22 linhas
273 B
PHP
<?php
|
|
|
|
function id($x) { return $x; }
|
|
|
|
class Foo {
|
|
public function hi() {
|
|
$bad = new Tracer();
|
|
return $bad !== null;
|
|
}
|
|
}
|
|
|
|
class Tracer {
|
|
public function __destruct() {
|
|
var_dump(debug_backtrace());
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
id(new Foo())->hi();
|
|
}
|
|
main();
|