3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeIterator implements Iterator{ function rewind(){ $this->x = 0; } function next(){ $this->x++; } function valid(){ return $this->x < 10; } function key(){ echo "key"; } function current(){ echo "current"; } } foreach(new SomeIterator as $value);
Output for rfc.property-hooks, git.master, git.master_jit
Deprecated: Return type of SomeIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/UTs15 on line 8 Deprecated: Return type of SomeIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/UTs15 on line 5 Deprecated: Return type of SomeIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/UTs15 on line 7 Deprecated: Return type of SomeIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/UTs15 on line 6 Deprecated: Return type of SomeIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/UTs15 on line 4 Deprecated: Creation of dynamic property SomeIterator::$x is deprecated in /in/UTs15 on line 4 currentcurrentcurrentcurrentcurrentcurrentcurrentcurrentcurrentcurrent

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:
117.98 ms | 2196 KiB | 4 Q