summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/json/tests/bug71835.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/json/tests/bug71835.phpt b/ext/json/tests/bug71835.phpt
index bbca19829b..dbe313b70c 100644
--- a/ext/json/tests/bug71835.phpt
+++ b/ext/json/tests/bug71835.phpt
@@ -12,6 +12,16 @@ class SomeClass implements JsonSerializable {
$class = new SomeClass;
$arr = [$class];
var_dump(json_encode($arr));
+
+class SomeClass2 implements JsonSerializable {
+ public function jsonSerialize() {
+ return [(array)$this];
+ }
+}
+$class = new SomeClass2;
+$arr = [$class];
+var_dump(json_encode($arr));
?>
--EXPECT--
string(6) "[[[]]]"
+string(6) "[[[]]]"