summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_param_array.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_functions_param_array.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_param_array.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt
new file mode 100644
index 0000000..37a02e0
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_param_array.phpt
@@ -0,0 +1,25 @@
1--TEST--
2Disable functions
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini
7--FILE--
8<?php
9function foo($arr) {
10 echo $arr["a"]."\n";
11}
12$a=Array("a"=>"test1");
13foo($a);
14
15$a=Array("a"=>"abcde");
16foo($a);
17
18$a=Array("a"=>"abcd");
19foo($a);
20?>
21--EXPECTF--
22test1
23abcde
24
25Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file