3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [[2,48],[48,2],[19,31],[31,19]]; $result = []; foreach ($array as $row) { sort($row); $result[json_encode($row)] ??= $row; } var_export(array_values($result));
Output for rfc.property-hooks, git.master, git.master_jit
array ( 0 => array ( 0 => 2, 1 => 48, ), 1 => array ( 0 => 19, 1 => 31, ), )

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:
48.97 ms | 1300 KiB | 4 Q