3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Peoples implements ArrayAccess { function offsetExists($index) { return 1; } function offsetSet($index, $value) { } function offsetUnset($index) { } function offsetGet($index) { echo "GETARRAYPROXY\n"; static $a = array(); return $a; } } $people = new Peoples; $people[0][0] = 'FooBaz';
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of Peoples::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/piOOH on line 4 Deprecated: Return type of Peoples::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/piOOH on line 8 Deprecated: Return type of Peoples::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/piOOH on line 5 Deprecated: Return type of Peoples::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/piOOH on line 6 GETARRAYPROXY Notice: Indirect modification of overloaded element of Peoples has no effect in /in/piOOH on line 18

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:
46.79 ms | 403 KiB | 8 Q