Arquivos
hhvm/hphp/test/slow/exceptions/retc.php
T
Paul Tarjan c2ec1c97c9 sortof format slow tests
A poor man's formatter since I didn't like any of the other ones I found. The original C++ source sometimes put newlines and sometimes not.

Codemods:

    codemod '([;{}])([^\n])' '\1\n\2'
    codemod -m '\s*<\?php\s+' '<?php\n\n'
    codemod '\t' '  '

I hand-fixed all the failing tests
2013-05-30 17:32:57 -07:00

33 linhas
625 B
PHP

<?php
class Obj {
public function __destruct() {
// Raise a fatal.
class Obj {
}
}
}
function foo() {
$y = new Obj;
$x = new Obj;
$y = new Obj;
// Currently our behavior during return when a local dtor throws a
// fatal is to swallow it, then keep rethrowing it from the enter
// hook for each destructor. Then we return as normal (and this
// test is trying to make sure nothing chokes due to the destroyed
// locals), then further out the next enter hook will throw the
// fatal.
}
try {
foo();
}
catch (Exception $x) {
echo "notreached\n";
}
foo();
// enter hook throws the fatal