3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fp = fsockopen("www.example.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; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: fsockopen(): php_network_getaddresses: getaddrinfo for www.example.com failed: System error in /in/eHedn on line 1 Warning: fsockopen(): Unable to connect to www.example.com:80 (php_network_getaddresses: getaddrinfo for www.example.com failed: System error) in /in/eHedn on line 1 Unable to open

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:
48.56 ms | 401 KiB | 8 Q