summaryrefslogtreecommitdiff
path: root/Zend/tests/named_params/duplicate_param.phpt
blob: 6abc95bba0fb789a185a752690727eba77fe3193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Duplicate param
--FILE--
<?php

function test($a) {}

try {
    test(a: 1, a: 2);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

try {
    test(1, a: 2);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Named parameter $a overwrites previous argument
Named parameter $a overwrites previous argument