1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/json/tests/bug73254.phpt
2020-05-28 15:07:47 -04:00

18 lines
370 B
PHP

--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]"]