xref: /PHP-8.4/ext/reflection/tests/bug60357.phpt (revision fb5cff12)
1--TEST--
2Bug #60357 (__toString() method triggers E_NOTICE "Array to string conversion")
3--FILE--
4<?php
5function foo(
6    array $x = array('a', 'b'),
7    array $y = ['x' => 'y'],
8    array $z = [0 => 0, 2 => -2],
9    array $a = [[], [1], [2, 3]],
10) {}
11echo new ReflectionFunction('foo'), "\n";
12?>
13--EXPECTF--
14Function [ <user> function foo ] {
15  @@ %s
16
17  - Parameters [4] {
18    Parameter #0 [ <optional> array $x = ['a', 'b'] ]
19    Parameter #1 [ <optional> array $y = ['x' => 'y'] ]
20    Parameter #2 [ <optional> array $z = [0 => 0, 2 => -2] ]
21    Parameter #3 [ <optional> array $a = [[], [1], [2, 3]] ]
22  }
23}
24