3v4l.org

run code in 300+ PHP versions simultaneously
<?php // https://stackoverflow.com/a/79816463/367456 $myArray = new class ([]) extends ArrayObject { /* implement from ArrayAccess to explore further */ }; // ArrayAccess allows to treat an object as an array var_dump(isset($myArray['key'])); // bool(false) -- offsetExists() $myArray['key'] = 'value'; // -- offsetSet() var_dump($myArray['key']); // string(5) "value" -- offsetGet() var_dump(isset($myArray['key'])); // bool(true) -- offsetExists() unset($myArray['key']); // -- offsetUnset() var_dump(isset($myArray['key'])); // bool(false) -- offsetExists()
Output for git.master_jit, git.master
bool(false) string(5) "value" bool(true) bool(false)

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:
49.33 ms | 837 KiB | 4 Q