3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ (object) ['id' => 1, 'name' => 'hovno'], (object) ['id' => 2, 'name' => 'piča'], ]; $test = array_walk($array, function($item) { return $item->id; }); var_dump($test); echo implode(',', $test);
Output for 8.3.0 - 8.3.6
bool(true) Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, true given in /in/8S1qD:13 Stack trace: #0 /in/8S1qD(13): implode(',', true) #1 {main} thrown in /in/8S1qD on line 13
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
bool(true) Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, bool given in /in/8S1qD:13 Stack trace: #0 /in/8S1qD(13): implode(',', true) #1 {main} thrown in /in/8S1qD on line 13
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
bool(true) Warning: implode(): Invalid arguments passed in /in/8S1qD on line 13

preferences:
147.78 ms | 403 KiB | 183 Q