mirror of
https://github.com/php/php-src.git
synced 2026-03-25 00:32:23 +01:00
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.
21 lines
463 B
PHP
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
|