blob: 89e423a9d8c9c13544ec2f9f89f694f2a3644371 (
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 - match on a local variable
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini
--FILE--
<?php
class test_class {
public $qwe = 'value';
function __construct($arg, $value) {
$this->$arg = $value;
}
}
$test_array = ['qwe'];
$arg = 'qwe';
$test = new test_class('qwe', 'qwe');
echo strtoupper($test->$arg) . "\n";
$test = new test_class('qwe', 'nop_object');
echo strtoupper($test->$arg) . "\n";
?>
--EXPECTF--
QWE
Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14
|