3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = 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' ) ) ); $t = []; foreach ($arr as $key => $value) { $t[$key] = $value['Product']['name']; } array_multisort($t, SORT_ASC, $arr); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [id] => 16061 [product_id] => 4473 [Product] => Array ( [id] => 4473 [name] => ABCD ) ) [1] => Array ( [id] => 16060 [product_id] => 4462 [Product] => Array ( [id] => 4462 [name] => MNOP ) ) [2] => Array ( [id] => 16059 [product_id] => 4013 [Product] => Array ( [id] => 4013 [name] => XYZ ) ) )

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:
140.58 ms | 407 KiB | 5 Q