3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [0, 1, 2, 3]; unset($array[3], $array[2]); $arrayCopy = $array; $arrayCopy[] = 2; assert($arrayCopy === [0, 1, 2]); // this assertion must pass; it doesn't currently $array[] = 2; assert($array === $arrayCopy); // still identical/equal
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught AssertionError: assert($arrayCopy === [0, 1, 2]) in /in/vDj4c:9 Stack trace: #0 /in/vDj4c(9): assert(false, 'assert($arrayCo...') #1 {main} thrown in /in/vDj4c 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:
63.65 ms | 401 KiB | 8 Q