3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo extends Traversable { } class Bar implements Foo, IteratorAggregate { public function getIterator() { return new ArrayIterator(array(1, 2, 3)); } } $b = new Bar; var_dump($b instanceof Foo);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of Bar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/VK52Q on line 7 bool(true)

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:
48.71 ms | 402 KiB | 8 Q