3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = ''; foreach ($_SERVER as $key => $value) { if (strpos($key, 'HTTP_') === 0 && $key != 'HTTP_HOST' && $key != 'HTTP_CONNECTION') { $key = strtolower(strtr(substr($key, 5), '_', '-')); $headers .= $key . ': ' . $value . "\r\n"; } } $opts = array( 'http'=>array( 'method'=>"GET", 'header'=> $headers, ) ); echo file_get_contents('http://phd.yandex.net/detect', false, stream_context_create($opts));

preferences:
49.23 ms | 402 KiB | 5 Q