blob: 2c58a87b32249a717245dcbb406b65e171f0e594 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--TEST--
Testing function call through of array item
--FILE--
<?php
$arr = array('strtoupper', 'strtolower');
$k = 0;
var_dump($arr[0]('foo') == 'FOO');
var_dump($arr[$k]('foo') == 'FOO');
var_dump($arr[++$k]('FOO') == 'foo');
var_dump($arr[++$k]('FOO') == 'foo');
?>
--EXPECTF--
bool(true)
bool(true)
bool(true)
Notice: Undefined offset: 2 in %s on line %d
Fatal error: Function name must be a string in %s on line %d
|