@ 2012-10-17T23:12:35Z <?php
if (strnatcmp(phpversion(),'5.4.7') >= 0)
{
$address="127.0.0.1";
$port=9878;
echo "I am here";
set_time_limit (0);
echo "1";
if(false==($socket= socket_create(AF_INET,SOCK_STREAM, SOL_TCP)))
{
echo "2";
echo "could not create socket";
}
echo "3";
socket_bind($socket, $address, $port) or die ("could not bind socket");
echo "4";
socket_listen($socket);
echo "5";
if(($client=socket_accept($socket)))
echo "6";
echo "client is here";
sleep(60);
socket_close($socket);
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.26 , 7.3.0 - 7.3.13 , 7.4.0 - 7.4.1 I am here1
Fatal error: Uncaught Error: Call to undefined function socket_create() in /in/UZvvM:9
Stack trace:
#0 {main}
thrown in /in/UZvvM on line 9
Process exited with code 255 . Output for 5.4.7 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.40 I am here1
Fatal error: Call to undefined function socket_create() in /in/UZvvM on line 9
Process exited with code 255 . Output for 4.3.0 - 4.3.11 , 4.4.0 - 4.4.9 , 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.0 - 5.4.6 preferences:dark mode live preview
215.19 ms | 403 KiB | 325 Q