File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / iterator_to_array.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
SPL: iterator_to_array() exceptions test
--CREDITS--
Lance Kesson jac_kesson@hotmail.com
#testfest London 2009-05-09
--FILE--
<?php
$array=array('a','b');

$iterator = new ArrayIterator($array);

iterator_to_array();


iterator_to_array($iterator,'test','test');

iterator_to_array('test','test');

?>
--EXPECTF--
Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s

Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s

Catchable fatal error: Argument 1 passed to iterator_to_array() must implement interface Traversable, %unicode_string_optional% given %s

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