summaryrefslogtreecommitdiff
path: root/ext/json/tests/bug73254.phpt
blob: 9a696cc58fd5fc00e2756815c7fce05745d206e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #73254 (Incorrect indentation generated by json_encode() with JSON_PRETTY_PRINT)
--FILE--
<?php

echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";

$fp = fopen('php://temp', 'r');
$data = ['a' => $fp];
echo json_encode($data), "\n";
echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";

?>
--EXPECT--
["[\n    1\n]"]

["[\n    1\n]"]