3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function sd($a,$b) {if($a['date'] == $b['date']) return 0; return $a['date'] >$b['date'] ? 1 : -1; usort($arr, 'sd'); $amount = 0; foreach($arr as &$item) { $amount += $item['amount']; $item['amount'] = $amount; }
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected end of file in /in/QJfsO on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/QJfsO on line 9
Process exited with code 255.