source: src/router/php7/ext/json/tests/bug73254.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 434 bytes
Line 
1--TEST--
2Bug #73254 (Incorrect indentation generated by json_encode() with JSON_PRETTY_PRINT)
3--SKIPIF--
4<?php
5if (!extension_loaded('json')) die('skip');
6?>
7--FILE--
8<?php
9
10echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";
11
12$fp = fopen('php://temp', 'r');
13$data = ['a' => $fp];
14echo json_encode($data), "\n";
15echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";
16
17?>
18--EXPECT--
19["[\n    1\n]"]
20
21["[\n    1\n]"]
Note: See TracBrowser for help on using the repository browser.