1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/generators/errors/count_error.phpt
Nikita Popov 6c7b322de2 Fix parameter name in count() error message
This parameter has been renamed to $value.
2021-07-29 14:25:13 +02:00

19 lines
276 B
PHP

--TEST--
Generators can't be counted
--FILE--
<?php
function gen() { yield; }
$gen = gen();
try {
count($gen);
} catch (\TypeError $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
count(): Argument #1 ($value) must be of type Countable|array, Generator given