1--TEST-- 2ReflectionClass::__toString() - various parameters 3--FILE-- 4<?php 5Class A { 6 public function privf(Exception $a) {} 7 public function pubf(A $a, 8 $b, 9 ?C $c = null, 10 $d = K, 11 $e = "15 chars long -", 12 $f = null, 13 $g = false, 14 array $h = null) {} 15} 16 17Class C extends A { } 18 19define('K', "16 chars long --"); 20echo new ReflectionClass("C"), "\n"; 21?> 22--EXPECTF-- 23Deprecated: A::pubf(): Implicitly marking parameter $h as nullable is deprecated, the explicit nullable type must be used instead in %s on line %d 24Class [ <user> class C extends A ] { 25 @@ %s 14-14 26 27 - Constants [0] { 28 } 29 30 - Static properties [0] { 31 } 32 33 - Static methods [0] { 34 } 35 36 - Properties [0] { 37 } 38 39 - Methods [2] { 40 Method [ <user, inherits A> public method privf ] { 41 @@ %s 3 - 3 42 43 - Parameters [1] { 44 Parameter #0 [ <required> Exception $a ] 45 } 46 } 47 48 Method [ <user, inherits A> public method pubf ] { 49 @@ %s 4 - 11 50 51 - Parameters [8] { 52 Parameter #0 [ <required> A $a ] 53 Parameter #1 [ <required> $b ] 54 Parameter #2 [ <optional> ?C $c = NULL ] 55 Parameter #3 [ <optional> $d = K ] 56 Parameter #4 [ <optional> $e = '15 chars long -' ] 57 Parameter #5 [ <optional> $f = NULL ] 58 Parameter #6 [ <optional> $g = false ] 59 Parameter #7 [ <optional> ?array $h = NULL ] 60 } 61 } 62 } 63} 64