summaryrefslogtreecommitdiff
path: root/Zend/tests/dynamic_call_006.phpt
blob: 058e22fda0d347d97b12bacafd6edb432409861a (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--TEST--
Dynamic calls to scope introspection functions are forbidden (function variations)
--FILE--
<?php
function test() {
    $func = 'extract';
    $func(['a' => 'b']);

    $func = 'compact';
    $func(['a']);

    $func = 'parse_str';
    $func('a=b');

    $func = 'get_defined_vars';
    $func();

    $func = 'assert';
    $func('1==2');

    $func = 'func_get_args';
    $func();

    $func = 'func_get_arg';
    $func(1);

    $func = 'func_num_args';
    $func();
}
test();

?>
--EXPECTF--
Warning: Cannot call extract() dynamically in %s on line %d

Warning: Cannot call compact() dynamically in %s on line %d

Warning: Cannot call parse_str() with a single argument dynamically in %s on line %d

Warning: Cannot call get_defined_vars() dynamically in %s on line %d

Warning: Cannot call assert() with string argument dynamically in %s on line %d

Warning: Cannot call func_get_args() dynamically in %s on line %d

Warning: Cannot call func_get_arg() dynamically in %s on line %d

Warning: Cannot call func_num_args() dynamically in %s on line %d