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: Optional parameter $testA declared before required parameter $testC is implicitly treated as a required parameter in %s on line %d
13
14Deprecated: Optional parameter $testB declared before required parameter $testC is implicitly treated as a required parameter in %s on line %d
15
16Deprecated: Optional parameter $test2B declared before required parameter $test2C is implicitly treated as a required parameter in %s on line %d
17
18Deprecated: Optional parameter $test3B declared before required parameter $test3C is implicitly treated as a required parameter in %s on line %d
19