3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $items = array('amount' => 50, 'amount' => 60, 'amount' => 100, 'amount' => 25, 'amount' => 30, 'amount' => 89, 'amount' => 90, 'amount' => 120, 'amount' => 16, 'amount' => 38); $itemsSum = 0; foreach ($items as $item) { $itemsSum += $item['amount']; } echo $itemsSum;
Output for 4.3.0 - 7.1.0
0