summaryrefslogtreecommitdiff
path: root/src/tests/disabled_function_local_var_2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disabled_function_local_var_2.phpt')
-rw-r--r--src/tests/disabled_function_local_var_2.phpt46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/tests/disabled_function_local_var_2.phpt b/src/tests/disabled_function_local_var_2.phpt
new file mode 100644
index 0000000..da0a3d2
--- /dev/null
+++ b/src/tests/disabled_function_local_var_2.phpt
@@ -0,0 +1,46 @@
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$a = 1338;
10function test(){
11 echo strlen("id") . "\n";
12}
13echo "Value of a: $a\n";
14test();
15
16$a = Array();
17$a['qwe'] = 'block';
18$a['123'] = 'nop';
19echo "Value of a:\n";
20var_dump($a);
21test();
22
23$a['123'] = 'block';
24echo "Value of a:\n";
25var_dump($a);
26test();
27?>
28--EXPECTF--
29Value of a: 1338
302
31Value of a:
32array(2) {
33 ["qwe"]=>
34 string(5) "block"
35 [123]=>
36 string(3) "nop"
37}
382
39Value of a:
40array(2) {
41 ["qwe"]=>
42 string(5) "block"
43 [123]=>
44 string(5) "block"
45}
46[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'strlen' in %a/tests/disabled_function_local_var_2.php:%d has been disabled.