3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["one" => 1, "two" => 2, "three" => 3]; $newArray = array_shift($array); var_export($newArray); echo "\n---\n"; var_export(array_values($newArray));
Output for git.master_jit, git.master
1 --- Fatal error: Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, int given in /in/IMc4c:8 Stack trace: #0 /in/IMc4c(8): array_values(1) #1 {main} thrown in /in/IMc4c 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:
53.32 ms | 1004 KiB | 4 Q