3v4l.org

run code in 300+ PHP versions simultaneously
<?php //create function to compare first letter of item to the aisle arrays function checkAisle($term) { $item= "banana"; $letters = array("A", "B", "C", "D", "E", "F", "G","H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T","U", "V", "W", "X", "Y", "Z"); $aisles = array("1", "1", "1", "1", "1", "1", "1","1", "1", "1", "1", "1", "1", "2", "2", "2", "2", "2", "2", "2","2", "2", "2", "2", "2", "2"); $guide = array_combine($letters, $aisles); $itemUC = ucfirst($item); $firstChar = $itemUC[0]; echo "$itemUC is located on Aisle $guide[$firstChar]."; } //run function checkAisle("banana");
Output for git.master, git.master_jit, rfc.property-hooks
Banana is located on Aisle 1.

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