mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
2079da0158
I added the function/method name to some compile-time deprecation messages which are related to parameters/return values. Consistently with the other similar error messages, I included the function/method name at the start of the message.
18 lines
412 B
PHP
18 lines
412 B
PHP
--TEST--
|
|
Optional param before required should be treated as required for named args as well
|
|
--FILE--
|
|
<?php
|
|
|
|
function test($a = 1, $b) {
|
|
}
|
|
try {
|
|
test(b: 2);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: test(): Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in %s on line %d
|
|
test(): Argument #1 ($a) not passed
|