3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo implements IteratorAggregate { public function getIterator() { yield from ['A', 'B', 'C']; yield from ['D', 'E', 'F']; } } print_r(iterator_to_array(new Foo()));
Output for git.master_jit, git.master, rfc.property-hooks
Deprecated: Return type of Foo::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/H07Ot on line 6 Array ( [0] => D [1] => E [2] => F )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
55.03 ms | 401 KiB | 8 Q