3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Test implements \IteratorAggregate { public function getIterator(){} } function test(iterable $it){ var_dump($it); } test((new Test)); test([1,2,3]);

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
51.69 ms | 1510 KiB | 4 Q