mirror of
https://github.com/php/php-src.git
synced 2026-04-25 08:58:28 +02:00
- New test
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #46215 (json_encode mutates its parameter and has some class-specific state)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo {
|
||||
protected $a = array();
|
||||
}
|
||||
|
||||
$a = new foo;
|
||||
$x = json_encode($a);
|
||||
|
||||
print_r($a);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
foo Object
|
||||
(
|
||||
[a:protected] => Array
|
||||
(
|
||||
)
|
||||
|
||||
)
|
||||
Reference in New Issue
Block a user