Arquivos
hhvm/hphp/test/quick/unwind_backtrace.php
T
Jordan DeLong 42a6039125 Fix a bug with debug_backtrace during an unwind
The change to stop zeroing locals during RetC was too
aggressive---we stopped doing it during unwinding also.  When
unwinding, we need to zero locals and $this because another
destructing object may still run debug_backtrace, and we won't have
the *pc == OpRet{C,V} trick to tell us to ignore the junk.
2013-05-28 10:30:27 -07:00

33 linhas
409 B
PHP

<?php
function blah() {
throw new Exception('asd');
}
class something {
public function __destruct() {
echo "~something\n";
$k = debug_backtrace()[1]['object'];
var_dump($k);
}
public function yo() {
blah();
}
}
class Bar {
public function foo() {
$k = new something();
echo "wat\n";
blah();
echo "eh\n";
}
}
function main() {
(new Bar)->foo();
}
main();