summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_named_args_ooo_opt_pos.phpt
blob: 86abbee3021d34fb5c817f0473c77b798636c5b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Disable functions with out-of-order named optional arguments by matching argument position
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus") || PHP_VERSION_ID < 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disabled_function_named_args.ini
--FILE--
<?php
function foo_named_args_ooo_opt_pos($name, $greeting='HI!', $color='red') {
    echo "boo\n";
}
foo_named_args_ooo_opt_pos("bob", color: "green", greeting:  "xxx");
--EXPECTF--
Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo_named_args_ooo_opt_pos', because its argument 'color'%s matched a rule in %s.php on line %d