3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = array( "content-type" => "application/json", "accept" => "text/html", ); $h = array(); foreach ($headers as $key => $value) { $h[] = $key . ':' . $value; } print_r($h);

preferences:
39.46 ms | 402 KiB | 5 Q