xref: /PHP-8.3/ext/json/tests/bug73254.phpt (revision 32a1ebbd)
1--TEST--
2Bug #73254 (Incorrect indentation generated by json_encode() with JSON_PRETTY_PRINT)
3--FILE--
4<?php
5
6echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";
7
8$fp = fopen('php://temp', 'r');
9$data = ['a' => $fp];
10echo json_encode($data), "\n";
11echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";
12
13?>
14--EXPECT--
15["[\n    1\n]"]
16
17["[\n    1\n]"]
18