global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / no_return_function.php
bloba72b505bd6e416ac8a627a8698af77a625c22612
1 <?hh
3 class Something {
4 static public function thrower() {
5 throw new Exception('heh');
8 static public function blah(?string $x = null) {
9 if ($x) {
10 try {
11 self::thrower();
12 } catch (Exception $l) {
13 echo "caught!\n";
14 echo "$x\n";
16 } else {
20 static public function looper() {
21 for (;;) {}
24 static public function blah2(?string $x = null) {
25 if ($x) {
26 return self::looper();
28 echo "not calling looper; this test would never stop ...\n";
29 return 12;
33 Something::blah();
34 Something::blah("asd");
36 Something::blah2();