3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = ['foo', 'bar', 'doo', 'lorem', 'ipsum']; // Take the current array-key from the URL $key = 3; // $_GET['key'] // validate if it really exists in the array, otherwise take a fallback if(!array_key_exists($key, $items)) $key = 0; // show data to this key echo $items[$key]; // provide a button to switch to the next array key sprintf('<a href="?key=%s">next</a>', $key+1);
Output for git.master_jit, git.master, rfc.property-hooks
lorem

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:
90.73 ms | 405 KiB | 5 Q