Turn FFP errors upto 11; report everything
[hiphop-php.git] / hphp / test / slow / intercept / prolog.php
blob4131c285038ca227370cccf2faa5b7732631478a
1 <?hh
2 // Copyright 2004-present Facebook. All Rights Reserved.
4 class Cls {
5 function func() { echo "func called\n"; }
6 function intercept1() { return false; }
7 function intercept2() {
8 var_dump(debug_backtrace());
9 return false;
11 function intercept3() { throw new Exception("intercept3"); }
12 function __destruct() {}
15 function getCls() { return new Cls(); }
17 function test($s) {
18 fb_intercept('Cls::func', "Cls::$s");
19 try {
20 getCls()->func();
21 } catch (Exception $e) {
22 echo "Caught exception: " . $e->getMessage() . "\n";
24 echo "$s DONE\n";
27 test('intercept1');
28 test('intercept2');
29 test('intercept3');