3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a', 'b', 'c', 'd', null); for($i = 0; $i < count($a); $i += 2) { echo $i . " "; if (array_key_exists($i + 1, $a)) { echo $a[$i + 1] . " "; } echo ($i + 1) . PHP_EOL; } $n = explode('|', $a[5]); var_dump($n);
Output for git.master, git.master_jit, rfc.property-hooks
0 b 1 2 d 3 4 5 Warning: Undefined array key 5 in /in/284kS on line 12 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/284kS on line 12 array(1) { [0]=> string(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:
57 ms | 401 KiB | 8 Q