3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array(1,2,3,4,5); $output = array(); //Put your code here for ($i = 0; $i < count($input) + 1; $i++) { echo $i; $output[$i] = $input[$i] * 2; } var_dump($output); /*Output: array(5) { [0]=> int(2) [1]=> int(4) [2]=> int(6) [3]=> int(8) [4]=> int(10) } */
Output for git.master, git.master_jit, rfc.property-hooks
012345 Warning: Undefined array key 5 in /in/voAGI on line 8 array(6) { [0]=> int(2) [1]=> int(4) [2]=> int(6) [3]=> int(8) [4]=> int(10) [5]=> int(0) }

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:
61.27 ms | 401 KiB | 8 Q