3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $objects = [ [ 'amount' => 1], [ 'amount' => 2], [ 'amount' => null], ]; $sum = array_sum(array_column($objects,'amount')); echo $sum;
Output for 7.0.19
3