3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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));
based on tHHo6
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined function yeild() in /in/UEMM1:11 Stack trace: #0 /in/UEMM1(15): get_total(Array) #1 {main} thrown in /in/UEMM1 on line 11
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Call to undefined function yeild() in /in/UEMM1:11 Stack trace: #0 /in/UEMM1(15): get_total() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function yeild() in /in/UEMM1 on line 11
Process exited with code 255.