3v4l.org

run code in 300+ PHP versions simultaneously
<?php class It extends ArrayIterator { public function __call($method, $args) { printf("%s\n", $method); return $this->$method(); } } $i = new It([1, 2, 3, 4]); foreach($i as $k => $v) { }

preferences:
67.32 ms | 402 KiB | 5 Q