3v4l.org

run code in 300+ PHP versions simultaneously
<?php class my_ite implements Iterator { public function current() { return 1; } public function key() { return 1; } public function next() { // do something. } public function rewind() { // do something. } public function valid() { return true; } }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of my_ite::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bPN2V on line 4 Deprecated: Return type of my_ite::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bPN2V on line 10 Deprecated: Return type of my_ite::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bPN2V on line 7 Deprecated: Return type of my_ite::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bPN2V on line 16 Deprecated: Return type of my_ite::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bPN2V on line 13

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:
30.26 ms | 409 KiB | 5 Q