3v4l.org

run code in 300+ PHP versions simultaneously
<?php $it = new EmptyIterator; var_dump(count($it));
Output for 8.0.0
Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, EmptyIterator given in /in/WGmN2:4 Stack trace: #0 {main} thrown in /in/WGmN2 on line 4
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.26, 7.4.0 - 7.4.14
Warning: count(): Parameter must be an array or an object that implements Countable in /in/WGmN2 on line 4 int(1)
Output for 7.1.0 - 7.1.25
int(1)