3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyStuff extends ArrayObject { function offsetGet($offset) { echo "Called"; return null; } } $array = ['foo' => 42]; $array_object = new MyStuff(); var_dump(isset($array['foo'])); var_dump(empty($array['foo'])); var_dump(isset($array_object['foo'])); var_dump(empty($array_object['foo']));
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of MyStuff::offsetGet($offset) should either be compatible with ArrayObject::offsetGet(mixed $key): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/YPPgl on line 5 bool(true) bool(false) bool(false) bool(true)

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.25 ms | 401 KiB | 8 Q