summaryrefslogtreecommitdiff
path: root/ext/spl/tests/iterator_to_array.phpt
blob: a754c9da6fbe4c1130102f3ec35800cb8a3df6b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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('test','test');

?>
--EXPECTF--
Fatal error: Uncaught TypeError: iterator_to_array(): Argument #1 ($iterator) must be of type Traversable, string given in %s:%d
Stack trace:
#0 %s(%d): iterator_to_array('test', 'test')
#1 {main}
  thrown in %s on line %d