<?php
class C implements \Countable
{
public function count($mode = \COUNT_NORMAL)
{
var_dump(func_get_args());
return 0;
}
}
$c = new C();
count($c);
count($c, \COUNT_RECURSIVE);
Deprecated: Return type of C::count($mode = COUNT_NORMAL) should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/lp6SR on line 6
array(0) {
}
array(0) {
}
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 17
array(0) {
}
array(0) {
}
Output for 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 17
Fatal error: Interface 'Countable' not found in /in/lp6SR on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lp6SR on line 17
Fatal error: Class 'Countable' not found in /in/lp6SR on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/lp6SR on line 3
Process exited with code 255.