3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['123', 'aaa'], ['124', 'bbb'], ['124', 'ccc'], ['125', 'ddd'], ['124', 'eee'], ['123', 'fff'], ]; var_export( array_reverse(array_column(array_reverse($array), null, 0)) ); $result = []; foreach ($array as $row) { if (!isset($result[$row[0]])) { $result[$row[0]] = $row; } } var_export(array_values($result));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => '125', 1 => 'ddd', ), 1 => array ( 0 => '124', 1 => 'bbb', ), 2 => array ( 0 => '123', 1 => 'aaa', ), )array ( 0 => array ( 0 => '123', 1 => 'aaa', ), 1 => array ( 0 => '124', 1 => 'bbb', ), 2 => array ( 0 => '125', 1 => 'ddd', ), )

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:
112.43 ms | 406 KiB | 5 Q