Closed
Description
Description
The following code:
<?php
class a {
public function __call($name, $args) { var_dump($args); }
}
$a = new a;
$a->test(a: 123);
$a->test(...)(a: 123);
Resulted in this output:
array(1) {
["a"]=>
int(123)
}
PHP Fatal error: Uncaught Error: Unknown named parameter $a in /home/daniil/repos/MadelineProto/a.php:8
Stack trace:
#0 {main}
thrown in /home/daniil/repos/MadelineProto/a.php on line 8
But I expected this output instead:
array(1) {
["a"]=>
int(123)
}
array(1) {
["a"]=>
int(123)
}
PHP Version
8.2.6
Operating System
Arch linux