1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 00:32:23 +01:00
Files
archived-php-src/ext/spl/tests/iterator_to_array.phpt
Nikita Popov 4d90848d68 Don't verify arginfo types for internal functions
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00

21 lines
463 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 parameter 1 to be Traversable, string given in %s:%d
Stack trace:
#0 %s(%d): iterator_to_array('test', 'test')
#1 {main}
thrown in %s on line %d