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 (\TypeError $e) {
13    echo $e->getMessage(), PHP_EOL;
14}
15
16?>
17--EXPECT--
18count(): Argument #1 ($value) must be of type Countable|array, Generator given
19