File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / 028.phpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (12 years, 8 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

--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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>