xref: /PHP-7.4/ext/json/tests/bug66021.phpt (revision e5abc537)
1--TEST--
2Bug #66021 (Blank line inside empty array/object when JSON_PRETTY_PRINT is set)
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5--FILE--
6<?php
7
8class Foo {
9	private $bar = 'baz';
10}
11
12echo json_encode(array(array(), (object) array(), new Foo), JSON_PRETTY_PRINT);
13
14?>
15--EXPECT--
16[
17    [],
18    {},
19    {}
20]
21