Arquivos
hhvm/hphp/test/vm/inline_surprise_throw.php
T
jdelong 067e38c23d Fix exception safety for inline returns
If the profiler hook throws (and it used to not be able to),
we can decref a local twice.  The generic return case is safe, but the
inline return case wasn't zeroing the type.
2013-02-11 10:10:23 -08:00

22 linhas
297 B
PHP

<?php
# bug #2088495
function asd($x, $y) {
if ($x == 'exit' && $y == 'foo') {
echo "yep\n";
throw new Exception ('yo');
}
echo "hi $x $y\n";
}
fb_setprofile('asd');
function foo() {
$x = new stdclass;
}
try {
foo();
} catch (Exception $x) {
echo $x->getMessage() . "\n";
}