3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new ArrayIterator(get_declared_classes()); $bar = new IteratorIterator($foo); foreach($bar as $class) { echo $class . ' - ' . $bar->getInnerIterator()->current() . PHP_EOL; }

preferences:
45.09 ms | 402 KiB | 5 Q