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

21 lines
450 B
PHP

--TEST--
SPL: iterator_count() 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_count('1');
?>
--EXPECTF--
Fatal error: Uncaught TypeError: iterator_count() expects argument #1 ($iterator) to be of type Traversable, string given in %s:%d
Stack trace:
#0 %s(%d): iterator_count('1')
#1 {main}
thrown in %s on line %d