3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = array( 'From' => 'webmaster@example.com', 'Reply-To' => 'webmaster@example.com', 'X-Mailer' => 'PHP/' . phpversion(), ); print_r(array_join(array_map( function ($v, $k) { return $k . ': ' . $v; }, $headers, array_keys($headers) ), '\r\n');
based on ApsiF
Output for 8.0.0 - 8.0.2
Parse error: syntax error, unexpected token ";", expecting ")" in /in/fPFqM on line 13
Process exited with code 255.
Output for 7.3.0 - 7.3.27, 7.4.0 - 7.4.15
Parse error: syntax error, unexpected ';', expecting ')' in /in/fPFqM on line 13
Process exited with code 255.