3v4l.org

run code in 300+ PHP versions simultaneously
<?php $socket = fsockopen(gethostbyname("kubo2.wz.sk")); //if (!$socket) { // die("spojenie vypadlo"); //} $httpReq = "GET / HTTP/1.1\n"; $httpReq .= "Host: www.google.com\n"; $httpReq .= "Accept: */*\n"; $httpReq .= "Kubo2Sniffer 1.0 (+http://kubo2.wz.sk)\n\n"; fwrite($socket, $httpReq); while($line = fgets($socket) !== "\n\n") { echo $line; } fclose($socket);
Output for git.master, git.master_jit
Warning: fsockopen(): Unable to connect to kubo2.wz.sk:-1 (Failed to parse address "kubo2.wz.sk") in /in/Th3st on line 2 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /in/Th3st:10 Stack trace: #0 /in/Th3st(10): fwrite(false, 'GET / HTTP/1.1\n...') #1 {main} thrown in /in/Th3st on line 10
Process exited with code 255.
Output for rfc.property-hooks
Warning: fsockopen(): Unable to connect to kubo2.wz.sk:-1 (Failed to parse address "kubo2.wz.sk") in /in/Th3st on line 2 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/Th3st:10 Stack trace: #0 /in/Th3st(10): fwrite(false, 'GET / HTTP/1.1\n...') #1 {main} thrown in /in/Th3st on line 10
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:
52.11 ms | 401 KiB | 8 Q