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-- json_encode() on SplFixedArray --FILE-- <?php echo json_encode(new SplFixedArray..
Decoded Output download
--TEST--
json_encode() on SplFixedArray
--FILE--
<?php
echo json_encode(new SplFixedArray()) . "
";
echo json_encode(new SplFixedArray(1)) . "
";
$a = new SplFixedArray(3);
$a[0] = 0;
$a[2] = 2;
echo json_encode($a) . "
";
?>
--EXPECT--
[]
[null]
[0,null,2]
Did this file decode correctly?
Original Code
--TEST--
json_encode() on SplFixedArray
--FILE--
<?php
echo json_encode(new SplFixedArray()) . "\n";
echo json_encode(new SplFixedArray(1)) . "\n";
$a = new SplFixedArray(3);
$a[0] = 0;
$a[2] = 2;
echo json_encode($a) . "\n";
?>
--EXPECT--
[]
[null]
[0,null,2]
Function Calls
None |
Stats
MD5 | 8988b8b1e685a35c94d162c661426997 |
Eval Count | 0 |
Decode Time | 106 ms |