3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cur=1; $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43","Rob"=>"43"); $new_array = array(); arsort($age, SORT_NUMERIC); $new_array = $age; $key=array_search(max($new_array),$new_array); while ( $cur > 0) { echo $key; $cur--; }
Output for 7.0.0 - 7.2.0
Joe
Output for 5.3.19 - 5.6.28
Rob