summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_local_var.phpt
blob: 1323cc9f19b2be6f2d1b1c1c5287f497c561c4fa (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
--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 
$a = 1338;
function test(){
    echo strtoupper("id") . "\n";
}
echo "Value of a: $a\n";
test();

$a = 1337;
echo "Value of a: $a\n";
test();
?>
--EXPECTF--
Value of a: 1338
ID
Value of a: 1337

Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4