summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_local_var_10.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_function_local_var_10.phpt')
-rw-r--r--src/tests/disable_function/disabled_function_local_var_10.phpt45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt
new file mode 100644
index 0000000..4902972
--- /dev/null
+++ b/src/tests/disable_function/disabled_function_local_var_10.phpt
@@ -0,0 +1,45 @@
1--TEST--
2Disable functions - match on a local variable
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/disabled_function_local_var.ini
7--FILE--
8<?php
9$qwe = Array('123' => Array('qwe'), '456' => Array('no block this'));
10var_dump($qwe);
11strlen("qwe");
12$qwe = Array('123' => Array('qwe'), '456' => Array(Array('block this')));
13var_dump($qwe);
14strlen("qwe");
15?>
16--EXPECTF--
17array(2) {
18 [123]=>
19 array(1) {
20 [0]=>
21 string(3) "qwe"
22 }
23 [456]=>
24 array(1) {
25 [0]=>
26 string(13) "no block this"
27 }
28}
29array(2) {
30 [123]=>
31 array(1) {
32 [0]=>
33 string(3) "qwe"
34 }
35 [456]=>
36 array(1) {
37 [0]=>
38 array(1) {
39 [0]=>
40 string(10) "block this"
41 }
42 }
43}
44
45Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file