1--TEST--
2SPL: iterator_to_array() exceptions test
3--CREDITS--
4Lance Kesson jac_kesson@hotmail.com
5#testfest London 2009-05-09
6--FILE--
7<?php
8$array=array('a','b');
9
10$iterator = new ArrayIterator($array);
11
12iterator_to_array();
13
14
15iterator_to_array($iterator,'test','test');
16
17iterator_to_array('test','test');
18
19?>
20--EXPECTF--
21Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s
22
23Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s
24
25Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d
26Stack trace:
27#0 %s(%d): iterator_to_array('test', 'test')
28#1 {main}
29  thrown in %s on line %d
30