3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = [ 'person_1@gmail.com' => [ '2017-01-05' =>[ 'this is line one', 'this is line two', ], '2016-05-05' => [ 'this is another line', 'and this is a fourth line' ], '2017-07-10' => [ 'more lines', 'yet another line' ], ], 'person_2@gmail.com' => [ '2015-01-01' => ['line for person_2'], ] ]; foreach($myArray as $key=>$value){ krsort($myArray[$key]); } print_r($myArray);

preferences:
43.75 ms | 405 KiB | 5 Q