3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_for_exploit($host,$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; } echo check_for_exploit("http://www.smiths-gloucester.co.uk/"); ?>
Output for git.master, git.master_jit
Warning: fsockopen(): Unable to connect to http://www.smiths-gloucester.co.uk/:80 (Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?) in /in/liBSb on line 11 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /in/liBSb:13 Stack trace: #0 /in/liBSb(13): fwrite(false, 'HEAD / HTTP/1.1...') #1 /in/liBSb(23): check_for_exploit('http://www.smit...') #2 {main} thrown in /in/liBSb on line 13
Process exited with code 255.
Output for rfc.property-hooks
Warning: fsockopen(): Unable to connect to http://www.smiths-gloucester.co.uk/:80 (Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?) in /in/liBSb on line 11 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/liBSb:13 Stack trace: #0 /in/liBSb(13): fwrite(false, 'HEAD / HTTP/1.1...') #1 /in/liBSb(23): check_for_exploit('http://www.smit...') #2 {main} thrown in /in/liBSb on line 13
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
36.03 ms | 401 KiB | 8 Q