3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = 0; $num = 2; $array = array(1,2,3,4,5,6,7); foreach($array as $key) { $c++; echo key(prev($array)); if($c == 6) { break; } }
Output for git.master, git.master_jit
Fatal error: Uncaught TypeError: key(): Argument #1 ($array) must be of type array, bool given in /in/Sb0tU:8 Stack trace: #0 /in/Sb0tU(8): key(false) #1 {main} thrown in /in/Sb0tU on line 8
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught TypeError: key(): Argument #1 ($array) must be of type array, false given in /in/Sb0tU:8 Stack trace: #0 /in/Sb0tU(8): key(false) #1 {main} thrown in /in/Sb0tU on line 8
Process exited with code 255.

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