mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
As a followup to f34114b1fb print
the contents of arrays rather than just a generic "Array" marker.
Also drop the truncation on strings. As we no longer resolve
constants, there should be less concerns about printing very
large strings here. If someone thought it was a good idea to use
a 10k character strings as a default value in code, then it should
be fine for us to print it in reflection as well.
24 lines
612 B
PHP
24 lines
612 B
PHP
--TEST--
|
|
Bug #60357 (__toString() method triggers E_NOTICE "Array to string conversion")
|
|
--FILE--
|
|
<?php
|
|
function foo(
|
|
array $x = array('a', 'b'),
|
|
array $y = ['x' => 'y'],
|
|
array $z = [0 => 0, 2 => -2],
|
|
array $a = [[], [1], [2, 3]],
|
|
) {}
|
|
echo new ReflectionFunction('foo'), "\n";
|
|
?>
|
|
--EXPECTF--
|
|
Function [ <user> function foo ] {
|
|
@@ %s
|
|
|
|
- Parameters [4] {
|
|
Parameter #0 [ <optional> array $x = ['a', 'b'] ]
|
|
Parameter #1 [ <optional> array $y = ['x' => 'y'] ]
|
|
Parameter #2 [ <optional> array $z = [0 => 0, 2 => -2] ]
|
|
Parameter #3 [ <optional> array $a = [[], [1], [2, 3]] ]
|
|
}
|
|
}
|