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(), ); function f($v, $k) { return $k . ': ' . $v; } print_r( implode("\r\n", array_map( 'f', $headers, array_keys($headers) )) );
based on UPPav
Output for 8.0.2
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/8.0.2
Output for 8.0.1
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/8.0.1
Output for 8.0.0
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/8.0.0
Output for 7.4.15
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.15
Output for 7.4.14
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.14
Output for 7.4.13
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.13
Output for 7.4.12
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.12
Output for 7.4.11
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.11
Output for 7.4.10
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.10
Output for 7.4.9
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.9
Output for 7.4.8
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.8
Output for 7.4.7
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.7
Output for 7.4.6
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.6
Output for 7.4.5
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.5
Output for 7.4.4
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.4
Output for 7.4.3
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.3
Output for 7.4.2
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.2
Output for 7.4.1
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.1
Output for 7.4.0
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.4.0
Output for 7.3.27
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.27
Output for 7.3.26
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.26
Output for 7.3.25
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.25
Output for 7.3.24
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.24
Output for 7.3.23
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.23
Output for 7.3.22
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.22
Output for 7.3.21
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.21
Output for 7.3.20
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.20
Output for 7.3.19
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.19
Output for 7.3.18
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.18
Output for 7.3.17
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.17
Output for 7.3.16
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.16
Output for 7.3.15
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.15
Output for 7.3.14
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.14
Output for 7.3.13
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.13
Output for 7.3.12
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.12
Output for 7.3.11
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.11
Output for 7.3.10
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.10
Output for 7.3.9
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.9
Output for 7.3.8
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.8
Output for 7.3.7
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.7
Output for 7.3.6
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.6
Output for 7.3.5
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.5
Output for 7.3.4
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.4
Output for 7.3.3
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.3
Output for 7.3.2
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.2
Output for 7.3.1
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.1
Output for 7.3.0
From: webmaster@example.com Reply-To: webmaster@example.com X-Mailer: PHP/7.3.0