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