3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $kw = array(array('visits' => 1, 'n' => 'a'), array('visits' => 2, 'n' => 'b'), array('visits' => 100, 'n' => 'c')); foreach($kw as $kw_key => $kw_data){ $v[$kw_key] = $kw_data['v']; } array_multisort($v, SORT_DESC, $kw); print_r($kw);
Output for 5.3.0 - 7.1.0
Notice: Undefined index: v in /in/SrcTl on line 6 Notice: Undefined index: v in /in/SrcTl on line 6 Notice: Undefined index: v in /in/SrcTl on line 6 Array ( [0] => Array ( [visits] => 1 [n] => a ) [1] => Array ( [visits] => 2 [n] => b ) [2] => Array ( [visits] => 100 [n] => c ) )
Output for 4.3.0 - 5.2.17
Notice: Undefined index: v in /in/SrcTl on line 6 Notice: Undefined index: v in /in/SrcTl on line 6 Notice: Undefined index: v in /in/SrcTl on line 6 Array ( [0] => Array ( [visits] => 1 [n] => a ) [1] => Array ( [visits] => 2 [n] => b ) [2] => Array ( [visits] => 100 [n] => c ) )