summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_param_array_deref.phpt
blob: a10c6486b395fba707faf0813e955494b54c1ace (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
--TEST--
Disable functions
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini
--FILE--
<?php
function foo($arr) {
	 echo $arr["a"]."\n";
}

$a=Array("bla"=>"aaa", "a"=>"eee" );
foo($a);

$a=Array("bla"=>"aaa", "a"=>"abcdef" );
foo($a);

$a=Array("bla"=>"abcdef", "not_bla"=>"134");
foo($a);
?>
--EXPECTF--
eee
abcdef

Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3