Arquivos
hhvm/hphp/test/vm/catch-order.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

21 linhas
524 B
PHP

<?php
// NB: The names need to be all-lowercase to ensure that "someexception" has a
// lower litstr id than "other" (both original and lowercase versions of the
// name get put in the litstr table). This test relies on someexception having a
// lower litstr id to reproduce a specific bug.
class someexception extends Exception {}
class other extends someexception {}
function main() {
try {
throw new other;
} catch (other $e) {
echo "win\n";
} catch (someexception $e) {
echo "fail\n";
}
}
main();