xref: /PHP-8.2/ext/json/tests/bug46215.phpt (revision 32a1ebbd)
1--TEST--
2Bug #46215 (json_encode mutates its parameter and has some class-specific state)
3--FILE--
4<?php
5
6class foo {
7    protected $a = array();
8}
9
10$a = new foo;
11$x = json_encode($a);
12
13print_r($a);
14
15?>
16--EXPECT--
17foo Object
18(
19    [a:protected] => Array
20        (
21        )
22
23)
24