|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-06 10:46 UTC] laruence@php.net
[2016-05-06 10:46 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-05-06 10:48 UTC] laruence@php.net
[2016-05-06 12:25 UTC] laruence@php.net
[2016-05-06 12:26 UTC] laruence@php.net
-Status: Closed
+Status: Re-Opened
-Assigned To:
+Assigned To: bukka
[2016-05-15 15:07 UTC] bukka@php.net
-Package: json
+Package: JSON related
[2016-07-20 11:31 UTC] davey@php.net
[2016-07-20 11:31 UTC] davey@php.net
-Status: Re-Opened
+Status: Closed
[2016-07-20 11:31 UTC] davey@php.net
[2016-07-20 19:02 UTC] bukka@php.net
-Status: Closed
+Status: Re-Opened
[2017-10-24 05:45 UTC] kalle@php.net
-Status: Re-Opened
+Status: Assigned
[2021-04-20 12:39 UTC] cmb@php.net
-Status: Assigned
+Status: Closed
[2021-04-20 12:39 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
Description: ------------ see test script Test script: --------------- <?php class Dummy implements JsonSerializable{ public function jsonSerialize() { global $flag; if ($flag) { exit; } else { return "xxxx"; } } } $array = array(new Dummy()); $array[] = "xxx"; register_shutdown_function(function() use($array) { global $flag; $flag = 0; var_dump(json_encode(array($array))); }); $flag = 1; var_dump(json_encode(array($array))); Expected result: ---------------- string(16) "[["xxxx","xxx"]]" Actual result: -------------- false