<?php$arr = [ 'area1' => 4.8, 'area2' => 6.1, 'area3' => 3.6, 'area4' => 5.1 ]; var_dump(asort($arr)); var_dump($arr);
Standard input is empty
bool(true) array(4) { ["area3"]=> float(3.6) ["area1"]=> float(4.8) ["area4"]=> float(5.1) ["area2"]=> float(6.1) }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!