3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['columnName' => 3], ['columnName' => 4], ['columnName' => 1], ['columnName' => 3], ['columnName' => 2], ['columnName' => 5] ]; $direction = 'desc'; $c = 'columnName'; array_multisort( array_column($array, $c), $direction === 'desc' ? SORT_DESC : SORT_ASC, $array ); var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'columnName' => 5, ), 1 => array ( 'columnName' => 4, ), 2 => array ( 'columnName' => 3, ), 3 => array ( 'columnName' => 3, ), 4 => array ( 'columnName' => 2, ), 5 => array ( 'columnName' => 1, ), )

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