3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fp = fsockopen("www.gmail.com", 80); if (!$fp) { echo "Unable to open\n"; } else { fwrite($fp, "GET / HTTP/1.0\r\n\r\n"); stream_set_timeout($fp, 2); $res = fread($fp, 2000); $info = stream_get_meta_data($fp); fclose($fp); if ($info['timed_out']) { echo 'Connection timed out!'; } else { echo $res; } } ?>

preferences:
36.94 ms | 402 KiB | 5 Q