3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isOnline($ip, $port, $timeout = 1) { return (($fp = fsockopen($ip, $port, $i, $j, $timeout)) ? fclose($fp) : false); } isOnline('127.0.0.1', 80);
Output for 5.0.0 - 7.1.7
Warning: fsockopen(): unable to connect to 127.0.0.1:80 (Connection refused) in /in/Hcu76 on line 3
Output for 4.3.3 - 4.4.9
Warning: fsockopen(): unable to connect to 127.0.0.1:80 in /in/Hcu76 on line 3
Output for 4.3.2
Warning: fsockopen(): php_hostconnect: connect failed in /in/Hcu76 on line 3 Warning: fsockopen(): unable to connect to 127.0.0.1:80 in /in/Hcu76 on line 3
Output for 4.3.0 - 4.3.1

Process exited with code 139.