3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php$server_ip = "carsija.topstream.net";$portbase = "19406";if (!is_numeric($portbase)) { print "Invalid port"; exit;}$fp = @fsockopen($server_ip,$portbase,$errno,$errstr,1);if (!$fp) { print "<p>Connection refused, the server appears to be offline.</p>"; exit;} else { fputs($fp, "GET /played.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n"); while (!feof($fp)) { $info = fgets($fp); } $content = get_string_between($info, "Admin Login</a></font></td></tr></table></td></tr></table><br>", "<br><br><table"); print $content; fclose($fp);}function get_string_between($string, $start, $end) { $string = " " . $string; $ini = strpos($string, $start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string, $end, $ini) - $ini; return substr($string, $ini, $len);}?>
Output for 5.4.0 - 5.6.16, 7.0.0
Parse error: syntax error, unexpected '$server_ip' (T_VARIABLE) in /in/2XAs7 on line 1
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.