3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function check_for_exploit($host="http://skinarena.eu", $port=80, $timeout=10){ $range = '0-1'; for($i=0;$i<20;$i++){ $range .= ",5-$i"; } $error_code = null; $error = null; $socket = fsockopen($host,$port,$error_code,$error,$timeout); $packet = "HEAD / HTTP/1.1\r\nHost: $host\r\nRange:bytes=$range\r\nAccept-Encoding: gzip\r\nConnection: close\r\n\r\n"; fwrite($socket,$packet); $result = fread($socket,2048); //check to see if "Partial" is in the response if(strstr($result,"Partial") !== false){ return true; } return false; } eval(check_for_exploit); ?>
based on vijPZ
Output for 7.2.0
Warning: Use of undefined constant check_for_exploit - assumed 'check_for_exploit' (this will throw an Error in a future version of PHP) in /in/KbDpR on line 21 Parse error: syntax error, unexpected end of file in /in/KbDpR(21) : eval()'d code on line 1
Process exited with code 255.
Output for 5.4.2 - 5.4.10, 7.0.0 - 7.1.10
Notice: Use of undefined constant check_for_exploit - assumed 'check_for_exploit' in /in/KbDpR on line 21 Parse error: syntax error, unexpected end of file in /in/KbDpR(21) : eval()'d code on line 1
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Notice: Use of undefined constant check_for_exploit - assumed 'check_for_exploit' in /in/KbDpR on line 21 Parse error: syntax error, unexpected end of file in /in/KbDpR(21) : eval()'d code on line 1
Output for 5.3.18 - 5.3.29
Notice: Use of undefined constant check_for_exploit - assumed 'check_for_exploit' in /in/KbDpR on line 21 Parse error: syntax error, unexpected $end in /in/KbDpR(21) : eval()'d code on line 1
Process exited with code 255.