3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array( array("type"=>"fruit", "price"=>3.50), array("type"=>"milk", "price"=>2.90), array("type"=>"pork", "price"=>5.43), ); $inventory = $data; $time = microtime(true); array_multisort(array_column($inventory, 'price'), SORT_DESC, $inventory); echo microtime(true)-$time; echo "\n\n"; $new = []; $time = microtime(true); foreach($data as $row){ $new[$row['type']] = $row; } ksort($new); echo microtime(true)-$time; echo "\n\n"; print_r($inventory); print_r($new);
based on vHN6i

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Arrow functions
1.0013580322266E-5 5.0067901611328E-6 Array ( [0] => Array ( [type] => pork [price] => 5.43 ) [1] => Array ( [type] => fruit [price] => 3.5 ) [2] => Array ( [type] => milk [price] => 2.9 ) ) Array ( [fruit] => Array ( [type] => fruit [price] => 3.5 ) [milk] => Array ( [type] => milk [price] => 2.9 ) [pork] => Array ( [type] => pork [price] => 5.43 ) )

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