Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Bug #68567 JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key --FILE--..

Decoded Output download

--TEST--
Bug #68567 JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key
--FILE--
<?php

var_dump(json_encode(array("" => 1), JSON_PARTIAL_OUTPUT_ON_ERROR));

?>
--EXPECT--
string(6) "{"":1}"

Did this file decode correctly?

Original Code

--TEST--
Bug #68567 JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key
--FILE--
<?php

var_dump(json_encode(array("\x80" => 1), JSON_PARTIAL_OUTPUT_ON_ERROR));

?>
--EXPECT--
string(6) "{"":1}"

Function Calls

None

Variables

None

Stats

MD5 66c828f52cfd3a52cf04016658a3f5f1
Eval Count 0
Decode Time 81 ms