3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 0 => array( 'gozhi' => 2, 'uzorong' => 1, 'ngangla' => 4, 'langthel' => 5 ), 1 => array( 'gozhi' => 5, 'uzorong' => 0, 'ngangla' => 3, 'langthel' => 2 ), 2 => array( 'gozhi' => 3, 'uzorong' => 0, 'ngangla' => 1, 'langthel' => 3 ), ); $res = array_walk(function($item) { return array_map(function() { return array_sum(func_get_args()); }, $item); }, $data); var_dump($res);
Output for 8.3.0 - 8.3.4
Fatal error: Uncaught Error: array_walk(): Argument #1 ($array) could not be passed by reference in /in/qbaIF:28 Stack trace: #0 {main} thrown in /in/qbaIF on line 28
Process exited with code 255.
Output for 8.1.23 - 8.1.27, 8.2.10 - 8.2.17
Fatal error: Uncaught Error: array_walk(): Argument #1 ($array) cannot be passed by reference in /in/qbaIF:28 Stack trace: #0 {main} thrown in /in/qbaIF on line 28
Process exited with code 255.
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.30
Fatal error: Only variables can be passed by reference in /in/qbaIF on line 28
Process exited with code 255.

preferences:
95.15 ms | 401 KiB | 83 Q