1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Files
archived-php-src/ext/standard/tests/array/bug67064.phpt
2014-04-13 19:34:17 +02:00

18 lines
355 B
PHP

--TEST--
Bug #67064 (Countable interface prevents using 2nd parameter ($mode) of count() function)
--FILE--
<?php
class Counter implements Countable {
public function count($mode = COUNT_NORMAL) {
var_dump($mode == COUNT_RECURSIVE);
return 1;
}
}
$counter = new Counter;
var_dump(count($counter, COUNT_RECURSIVE));
?>
--EXPECTF--
bool(true)
int(1)