1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 12:31:06 +02:00
Files
archived-php-src/ext/spl/tests/iterator_to_array.phpt
Máté Kocsis ac0853eb26 Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00

21 lines
483 B
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('test','test');
?>
--EXPECTF--
Fatal error: Uncaught TypeError: iterator_to_array() expects argument #1 ($iterator) to 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