3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DebugRAI extends RecursiveArrayIterator { public function rewind() { echo __METHOD__, "\n"; return parent::rewind(); } public function current() { echo __METHOD__, "\n"; return parent::current(); } public function key() { echo __METHOD__, "\n"; return parent::key(); } public function valid() { echo __METHOD__, "\n"; return parent::valid(); } public function next() { echo __METHOD__, "\n"; return parent::next(); } } $array = array("A", "B", "C"); $iterator = new RecursiveIteratorIterator(new DebugRAI($array)); while ($iterator->valid()) { echo $iterator->current(), "\n"; $iterator->next(); }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of DebugRAI::rewind() should either be compatible with ArrayIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DmAHB on line 4 Deprecated: Return type of DebugRAI::current() should either be compatible with ArrayIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DmAHB on line 5 Deprecated: Return type of DebugRAI::key() should either be compatible with ArrayIterator::key(): string|int|null, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DmAHB on line 6 Deprecated: Return type of DebugRAI::next() should either be compatible with ArrayIterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DmAHB on line 8 Deprecated: Return type of DebugRAI::valid() should either be compatible with ArrayIterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DmAHB on line 7 DebugRAI::valid DebugRAI::current A DebugRAI::valid DebugRAI::valid A DebugRAI::next DebugRAI::valid DebugRAI::valid DebugRAI::current B DebugRAI::next DebugRAI::valid DebugRAI::valid DebugRAI::current C DebugRAI::next DebugRAI::valid DebugRAI::valid

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:
51.16 ms | 404 KiB | 8 Q