diff options
Diffstat (limited to 'src/tests/disable_function/disabled_functions_param_array_r.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_param_array_r.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt new file mode 100644 index 0000000..1773bbe --- /dev/null +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt | |||
| @@ -0,0 +1,21 @@ | |||
| 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", "a"=>Array("qwe"=>"bbb"), "a"=>"cccc"); | ||
| 13 | foo($a); | ||
| 14 | |||
| 15 | $a=Array("a"=>"abcd", "pof"=>"pif", "bar"=>Array("qwe"=>"bbb"), "b"=>"cccc"); | ||
| 16 | foo($a); | ||
| 17 | ?> | ||
| 18 | --EXPECTF-- | ||
| 19 | cccc | ||
| 20 | |||
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file | ||
