source: src/router/php7/Zend/tests/dynamic_call_005.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 559 bytes
Line 
1--TEST--
2Dynamic calls to scope introspection functions are forbidden
3--FILE--
4<?php
5
6function test_calls($func) {
7    $i = 1;
8
9    array_map($func, [['i' => new stdClass]]);
10    var_dump($i);
11
12    $func(['i' => new stdClass]);
13    var_dump($i);
14
15    call_user_func($func, ['i' => new stdClass]);
16    var_dump($i);
17}
18test_calls('extract');
19
20?>
21--EXPECTF--
22Warning: Cannot call extract() dynamically in %s on line %d
23int(1)
24
25Warning: Cannot call extract() dynamically in %s on line %d
26int(1)
27
28Warning: Cannot call extract() dynamically in %s on line %d
29int(1)
Note: See TracBrowser for help on using the repository browser.