3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $headers = array( "content-type" => "application/json", "accept" => "text/html", ); $h = array(); foreach ($headers as $key => $value) { $h[] = $key . ':' . $value; } print_r($h);
based on m5PpK
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.7, 7.2.0
Array ( [0] => content-type:application/json [1] => accept:text/html )
Output for 7.1.10

Process exited with code 137.