3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arr_unique($arr) { sort($arr); $curr = $arr[0]; $uni_arr[] = $arr[0]; for($i=0; $i<count($arr);$i++){ if($curr != $arr[$i]) { $uni_arr[] = $arr[$i]; $curr = $arr[$i]; } } return $uni_arr; } var_export(arr_unique([null, '', .0, [], false, null, 0, '0.0', -.1, "\0", false, []]));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => NULL, 1 => '' . "\0" . '', 2 => -0.1, 3 => 0, 4 => array ( ), )

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:
61.11 ms | 405 KiB | 5 Q