3v4l.org

run code in 300+ PHP versions simultaneously
<?php private function formatColumnsWithValues(array $kRow): string { array_walk($kRow, fn (&$v, $k) => $v = sprintf("%s: %s\n", $k, $v)); return '<p>'.implode("</p><p>", $kRow).'</p>'; }
Output for 8.0.0 - 8.0.12
Parse error: syntax error, unexpected token "private", expecting end of file in /in/48rfT on line 3
Process exited with code 255.
Output for 7.3.0 - 7.3.32, 7.4.0 - 7.4.25
Parse error: syntax error, unexpected 'private' (T_PRIVATE), expecting end of file in /in/48rfT on line 3
Process exited with code 255.

preferences:
199.39 ms | 1399 KiB | 77 Q