summaryrefslogtreecommitdiff
path: root/src/tests/disabled_function_local_var_5.phpt
blob: 4b4a59c7b5215c9802d0443c714d39c22b1c9ad3 (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
--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 
function test(){
    echo strlen("id") . "\n";
}

$a = Array();
echo "Value of a:\n";
var_dump($a);
test();

$a = (Object)['zxc' => 'not a good value'];
echo "Value of a:\n";
var_dump($a);
test();
?>
--EXPECTF--
Value of a:
array(0) {
}
2
Value of a:
object(stdClass)#1 (1) {
  ["zxc"]=>
  string(16) "not a good value"
}
[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_5.php:%d.