3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = [ 'a' => [], 'b' => ['total' => ['column' => '1']], 'c' => ['total' => ['column' => '2']], ]; function get_total($input) { foreach ($input as $v) { yeild (isset($v['total']) ? $v : null); } } var_dump(get_total($test));

preferences:
56.14 ms | 402 KiB | 5 Q