<?php
class Counter implements Countable
{
public function count()
{
var_dump(func_get_args());
}
}
$counter = new Counter;
count($counter, 1);
$counter->count(1);
Deprecated: Return type of Counter::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/mgMkY on line 4
array(0) {
}
array(1) {
[0]=>
int(1)
}