3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X extends ArrayObject{ public function offsetSet($key, $val){ echo "offsetSet called \n"; parent::offsetSet($key, $val); } } $arr = new X([]); $arr->append('val'); $arr->offsetSet(5, 'val');print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of X::offsetSet($key, $val) should either be compatible with ArrayObject::offsetSet(mixed $key, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/8TQVJ on line 4 offsetSet called offsetSet called X Object ( [storage:ArrayObject:private] => Array ( [0] => val [5] => val ) )

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