3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users_emails = array('a' => 'Spence', 'b' => 'Matt', 'c' => 'Marc', 'd' => 'Adam', 'e' => 'Paul'); $keys = array_values(array_keys($users_emails)); $current = 'Matt'; $ordinal = array_search($current,$users_emails); $nextkey = (array_search($ordinal, $keys)+1); $next = $users_emails[$keys[$nextkey]]; echo $next;
Output for git.master, git.master_jit, rfc.property-hooks
Marc

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