summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_local_var_array_key.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_functions_local_var_array_key.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_local_var_array_key.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt
new file mode 100644
index 0000000..777611b
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt
@@ -0,0 +1,21 @@
1--TEST--
2Disable functions - match on an array value buried in several levels
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini
7--FILE--
8<?php
9function foo($arr) {
10 echo $arr["a"]."\n";
11}
12$a=Array("test2"=>Array("pof"=>"pif", "foo"=>Array("lol"=>"bbb")), "a"=>"cccc");
13foo($a);
14
15$a=Array("test2"=>Array("foo"=>Array("aaa"=>"ccc")), "a"=>"dddd");
16foo($a);
17?>
18--EXPECTF--
19cccc
20
21Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file