3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['hej' => 'a', 'heej' => 'b', 'heeej' => 'c']; test21($a); error_log($a); function test21($para) { foreach ($para as $p) { $p .= '1'; }; }
Output for 8.0.1 - 8.0.27, 8.1.0 - 8.1.14, 8.2.0 - 8.2.1
Fatal error: Uncaught TypeError: error_log(): Argument #1 ($message) must be of type string, array given in /in/6QZKG:5 Stack trace: #0 /in/6QZKG(5): error_log(Array) #1 {main} thrown in /in/6QZKG on line 5
Process exited with code 255.

preferences:
16.98 ms | 406 KiB | 5 Q