3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $scores = array( "Mike" => array(04, 03, 00, 07, 04, 07, 00, 01, 00, 07, 04), "Kyle" => array(07, 01, 00, 03, 04, 01, 00, 07, 03, 04, 04), "Johnny" => array(07, 07, 00, 03, 00, 04, 00, 01, 01, 04, 03), "Will" => array(03, 04, 00, 03, 04, 07, 00, 01, 00, 07, 04), "Vasques" => array(03, 01, 00, 03, 04, 07, 00, 01, 00, 07, 07) ); function cmp($a, $b) { return $a["mid"] - $b["mid"]; } usort($scores, "cmp"); //start loop for rows foreach($scores as $key=>$value) { echo array_sum($value) . "<br />"; }

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

Output for Typed properties v2
Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 37<br />34<br />30<br />33<br />33<br />
Output for Array change keys
Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 37<br />34<br />30<br />33<br />33<br />
Output for Lexical anon
Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 Notice: Undefined index: mid in /in/BoiZQ on line 12 37<br />34<br />30<br />33<br />33<br />

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