← Back
Editing: get_object_vars_variation_004.phpt
--TEST-- get_object_vars() fast/slow-path discrepancies --SKIPIF-- <?php if (!extension_loaded("json")) print "skip"; ?> --FILE-- <?php $obj = (object)[ "\0A\0b" => 42, "\0*\0c" => 24, 12 => 6, ]; $obj->test = new class implements JsonSerializable { public function jsonSerialize() { var_dump(get_object_vars($GLOBALS['obj'])); } }; var_dump(get_object_vars($obj)); // Use json_encode to get a dump with apply_count > 0 json_encode($obj); ?> --EXPECT-- array(4) { ["