3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'id' => 2, 'type' => 'comment', 'text' => 'hey', 'datetime' => '2010-05-15 11:29:45' ], [ 'id' => 3, 'type' => 'status', 'text' => 'oi', 'datetime' => '2010-05-26 15:59:53' ], [ 'id' => 4, 'type' => 'status', 'text' => 'yeww', 'datetime' => '2010-05-26 16:04:24' ] ]; // array_multisort() by date column ASC: array_multisort(array_column($array, 'datetime'), $array); echo var_export($array, true) . "\n***\n";

preferences:
57.07 ms | 402 KiB | 5 Q