3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 0 => Array ( 'id' => 16059, 'product_id' => 4013, 'Product' => Array ( 'id' => 4013, 'name' => 'XYZ' ) ), 1 => Array ( 'id' => 16060, 'product_id' => 4462, 'Product' => Array ( 'id' => 4462, 'name' => 'MNOP' ) ), 2 => Array ( 'id' => 16061, 'product_id' => 4473, 'Product' => Array ( 'id' => 4473, 'name' => 'ABCD' ) ) ); usort($array, function($a, $b) { return strcmp($a['Product']['name'] , $b['Product']['name']); }); print_r($array);

preferences:
24.93 ms | 406 KiB | 5 Q