global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / catch-order.php
blobf3293a127a2d984e4f037400fd92cec842f50d43
1 <?hh
3 // NB: The names need to be all-lowercase to ensure that "someexception" has a
4 // lower litstr id than "other" (both original and lowercase versions of the
5 // name get put in the litstr table). This test relies on someexception having a
6 // lower litstr id to reproduce a specific bug.
8 class someexception extends Exception {}
9 class other extends someexception {}
11 function main() {
12 try {
13 throw new other;
14 } catch (other $e) {
15 echo "win\n";
16 } catch (someexception $e) {
17 echo "fail\n";
20 main();