Updating submodules
[hiphop-php.git] / hphp / test / slow / debugger_serialize_to_debug_display_ham.php
blobda38e726ad33786395045899f4b7b254cb237161
1 <?hh
3 class C {
4 public $x;
5 public function __toDebugDisplay() { return "lol"; }
8 function test($thing) {
9 echo "==== " . get_class($thing) . " ====\n";
10 // 9 == VariableSerializer::Type::DebuggerSerialize
11 var_dump(__hhvm_intrinsics\serialize_with_format($thing, 9));
14 <<__EntryPoint>>
15 function main() {
16 set_error_handler(($errno, $string) ==> {
17 if ($errno === E_NOTICE &&
18 strpos($string, "Lval on missing array element") !== false) {
19 throw new Exception("lol");
21 return false;
22 });
24 test(new C());