3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [0, 1, 2, 3]; unset($array[3]); function changeScope($array){ assert($array === array_values($array)); $array[] = "x"; assert([0, 1, 2, "x"] === $array, print_r($array, TRUE)); } changeScope($array);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught AssertionError: Array ( [0] => 0 [1] => 1 [2] => 2 [4] => x ) in /in/UbjbE:9 Stack trace: #0 /in/UbjbE(9): assert(false, 'Array\n(\n [0]...') #1 /in/UbjbE(12): changeScope(Array) #2 {main} thrown in /in/UbjbE on line 9
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:
125.72 ms | 409 KiB | 6 Q