3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array[] = array ( 'age' => 'Lower limit', 'shipments' => null, 'orders' => null, 'ifs' => null, 'items' => 2, 'highlight' => false ); $array[] = array ( 'age' => 'Upper limit', 'shipments' => null, 'orders' => null, 'ifs' => null, 'items' =>3, 'highlight' => false ); $array[] = array ( 'age' => 'Limits:', 'shipments' => null, 'orders' => null, 'ifs' => null, 'items' => null, 'highlight' => 1 ); $array[] = array ( 'age' => 'Freeze limit', 'shipments' => null, 'orders' => null, 'ifs' => null, 'items' => 1, 'highlight' => false ); $array2 = array ( 'ageing_data' => $array, ); foreach ($array2 as $row) { print_r(implode('',array_slice($row), 1)); }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught ArgumentCountError: array_slice() expects at least 2 arguments, 1 given in /in/SoPfE:43 Stack trace: #0 /in/SoPfE(43): array_slice(Array) #1 {main} thrown in /in/SoPfE on line 43
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: array_slice() expects at least 2 parameters, 1 given in /in/SoPfE on line 43 Warning: implode() expects at most 2 parameters, 3 given in /in/SoPfE on line 43
Output for 5.2.6 - 5.2.17
Warning: array_slice() expects at least 2 parameters, 1 given in /in/SoPfE on line 43 Warning: Wrong parameter count for implode() in /in/SoPfE on line 43
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.5
Warning: Wrong parameter count for array_slice() in /in/SoPfE on line 43 Warning: Wrong parameter count for implode() in /in/SoPfE on line 43

preferences:
225.69 ms | 402 KiB | 355 Q