Annotation of embedaddon/php/ext/json/tests/bug46215.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #46215 (json_encode mutates its parameter and has some class-specific state)
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("json")) {
6: die('skip JSON extension not available in this build');
7: }
8: ?>
9: --FILE--
10: <?php
11:
12: class foo {
13: protected $a = array();
14: }
15:
16: $a = new foo;
17: $x = json_encode($a);
18:
19: print_r($a);
20:
21: ?>
22: --EXPECT--
23: foo Object
24: (
25: [a:protected] => Array
26: (
27: )
28:
29: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>