1--TEST--
2Required parameter after optional is deprecated
3--FILE--
4<?php
5
6function test($testA = null, $testB = null, $testC) {}
7function test2(Type $test2A = null, $test2B = null, $test2C) {}
8function test3(Type $test3A = null, ?Type2 $test3B = null, $test3C) {}
9
10?>
11--EXPECTF--
12Deprecated: test(): Optional parameter $testA declared before required parameter $testC is implicitly treated as a required parameter in %s on line %d
13
14Deprecated: test(): Optional parameter $testB declared before required parameter $testC is implicitly treated as a required parameter in %s on line %d
15
16Deprecated: test2(): Implicitly marking parameter $test2A as nullable is deprecated, the explicit nullable type must be used instead in %s on line %d
17
18Deprecated: test2(): Optional parameter $test2B declared before required parameter $test2C is implicitly treated as a required parameter in %s on line %d
19
20Deprecated: test3(): Implicitly marking parameter $test3A as nullable is deprecated, the explicit nullable type must be used instead in %s on line %d
21
22Deprecated: test3(): Optional parameter $test3B declared before required parameter $test3C is implicitly treated as a required parameter in %s on line %d
23