1--TEST--
2Generators can't be counted
3--FILE--
4<?php
5
6function gen() { yield; }
7
8$gen = gen();
9
10try {
11    count($gen);
12} catch (Exception $e) {
13    echo $e;
14}
15
16?>
17--EXPECTF--
18Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
19