1--TEST--
2get_object_vars() fast/slow-path discrepancies
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5--FILE--
6<?php
7
8$obj = (object)[
9    "\0A\0b" => 42,
10    "\0*\0c" => 24,
11    12 => 6,
12];
13$obj->test = new class implements JsonSerializable {
14    public function jsonSerialize() {
15        var_dump(get_object_vars($GLOBALS['obj']));
16    }
17};
18
19var_dump(get_object_vars($obj));
20
21// Use json_encode to get a dump with apply_count > 0
22json_encode($obj);
23
24?>
25--EXPECT--
26array(4) {
27  ["�A�b"]=>
28  int(42)
29  ["�*�c"]=>
30  int(24)
31  [12]=>
32  int(6)
33  ["test"]=>
34  object(JsonSerializable@anonymous)#2 (0) {
35  }
36}
37array(4) {
38  ["�A�b"]=>
39  int(42)
40  ["�*�c"]=>
41  int(24)
42  [12]=>
43  int(6)
44  ["test"]=>
45  object(JsonSerializable@anonymous)#2 (0) {
46  }
47}
48