Basic flow analysis on if statements
[hiphop-php.git] / hphp / test / slow / debugger_serialize_to_debug_display.php
blobf52be2bf1ede34bb265802de55312860e4543c5a
1 <?hh
3 class C {
4 public function __toDebugDisplay() { return "lol"; }
7 class D {
8 public function __toDebugDisplay() { throw new Exception("lol"); }
11 class E {
12 public function __toDebugDisplay() { throw new Error(2.0); }
15 class F {
16 public function __toDebugDisplay() { __hhvm_intrinsics\trigger_oom(true); }
19 function test($thing) {
20 echo "==== " . get_class($thing) . " ====\n";
21 // 9 == VariableSerializer::Type::DebuggerSerialize
22 var_dump(__hhvm_intrinsics\serialize_with_format($thing, 9));
25 <<__EntryPoint>>
26 function main() {
27 test(new C());
28 test(new D());
29 test(new E());
30 test(new F());