diff options
Diffstat (limited to 'src/tests/disabled_functions_param_array_r_keys.phpt')
| -rw-r--r-- | src/tests/disabled_functions_param_array_r_keys.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/disabled_functions_param_array_r_keys.phpt b/src/tests/disabled_functions_param_array_r_keys.phpt new file mode 100644 index 0000000..e9ef50d --- /dev/null +++ b/src/tests/disabled_functions_param_array_r_keys.phpt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - match on an array using regexp | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foo($arr) { | ||
| 10 | echo $arr["a"]."\n"; | ||
| 11 | } | ||
| 12 | $a=Array("test2"=>"pof", "pof"=>"pif", "qwe"=>Array("qwe"=>"bbb"), "a"=>"cccc"); | ||
| 13 | foo($a); | ||
| 14 | |||
| 15 | $a=Array("a"=>"", "pof"=>"pif", "bar"=>Array("qwe"=>"bbb"), "qweabcqwe"=>"nop"); | ||
| 16 | foo($a); | ||
| 17 | ?> | ||
| 18 | --EXPECTF-- | ||
| 19 | cccc | ||
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/tests/disabled_functions_param_array_r_keys.php:3 has been disabled, because its argument 'arr' content (ARRAY) matched the rule '2'. | ||
