1--TEST--
2get_mangled_object_vars() function
3--FILE--
4<?php
5
6class A {
7    public $pub = 1;
8    protected $prot = 2;
9    private $priv = 3;
10}
11class B extends A {
12    private $priv = 4;
13}
14
15$obj = new B;
16$obj->dyn = 5;
17$obj->{"6"} = 6;
18
19var_export(get_mangled_object_vars($obj));
20echo "\n";
21
22class AO extends ArrayObject {
23    private $priv = 1;
24}
25
26$ao = new AO(['x' => 'y']);
27$ao->dyn = 2;
28var_export(get_mangled_object_vars($ao));
29echo "\n";
30var_export((array) $ao);
31echo "\n";
32
33?>
34--EXPECT--
35array (
36  'pub' => 1,
37  '' . "\0" . '*' . "\0" . 'prot' => 2,
38  '' . "\0" . 'A' . "\0" . 'priv' => 3,
39  '' . "\0" . 'B' . "\0" . 'priv' => 4,
40  'dyn' => 5,
41  6 => 6,
42)
43array (
44  '' . "\0" . 'AO' . "\0" . 'priv' => 1,
45  'dyn' => 2,
46)
47array (
48  'x' => 'y',
49)
50