blob: 0957b64f4df32bf920f57fc419e5447cc36cf77a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
Disable functions - match on an array using regexp
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini
--FILE--
<?php
function foo($arr) {
echo $arr["a"]."\n";
}
$a=Array("test2"=>"pof", "pof"=>"pif", "qwe"=>Array("qwe"=>"bbb"), "a"=>"cccc");
foo($a);
$a=Array("a"=>"", "pof"=>"pif", "bar"=>Array("qwe"=>"bbb"), "qweabcqwe"=>"nop");
foo($a);
?>
--EXPECTF--
cccc
[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_r_keys.php:3, because its argument 'arr' content (ARRAY) matched the rule '2'.
|