mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +08:00
RFC: https://wiki.php.net/rfc/partial_function_application_v2 Co-authored-by: Joe Watkins <krakjoe@php.net>
16 lines
307 B
PHP
16 lines
307 B
PHP
--TEST--
|
|
PFA errors: named parameter that resolve to the position of a placeholder is an error
|
|
--FILE--
|
|
<?php
|
|
function foo($a) {
|
|
}
|
|
|
|
try {
|
|
foo(?, a: 1);
|
|
} catch (Error $ex) {
|
|
printf("%s: %s\n", $ex::class, $ex->getMessage());
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Error: Named parameter $a overwrites previous placeholder
|