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