blob: 538d693eb7d65e285c57dfe8f29278a708bf78ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
--TEST--
Disable functions - match on a local variable
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disabled_function_local_var.ini
--FILE--
<?php
$qwe = Array('123' => Array('qwe'), '456' => Array('no block this'));
var_dump($qwe);
strlen("qwe");
$qwe = Array('123' => Array('qwe'), '456' => Array(Array('block this')));
var_dump($qwe);
strlen("qwe");
?>
--EXPECTF--
array(2) {
[123]=>
array(1) {
[0]=>
string(3) "qwe"
}
[456]=>
array(1) {
[0]=>
string(13) "no block this"
}
}
array(2) {
[123]=>
array(1) {
[0]=>
string(3) "qwe"
}
[456]=>
array(1) {
[0]=>
array(1) {
[0]=>
string(10) "block this"
}
}
}
[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'strlen' in %a/tests/disabled_function_local_var_10.php:%d has been disabled.
|