@ 2012-10-17T23:09:08Z <?php
if (strnatcmp(phpversion(),'5.4.7') >= 0)
{
$address="127.0.0.1";
$port=9876;
echo "I am here";
set_time_limit (0);
if(false==($socket= socket_create(AF_INET,SOCK_STREAM, SOL_TCP)))
{
echo "could not create socket";
}
socket_bind($socket, $address, $port) or die ("could not bind socket");
socket_listen($socket);
if(($client=socket_accept($socket)))
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.20 , 7.1.0 - 7.1.25 , 7.2.0 - 7.2.13 , 7.3.0 - 7.3.1 I am here
Fatal error: Uncaught Error: Call to undefined function socket_create() in /in/0FjH6:8
Stack trace:
#0 {main}
thrown in /in/0FjH6 on line 8
Process exited with code 255 . Output for 5.4.7 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.28 I am here
Fatal error: Call to undefined function socket_create() in /in/0FjH6 on line 8
Process exited with code 255 . Output for 5.3.0 - 5.3.29 , 5.4.0 - 5.4.6 preferences:dark mode live preview
149.18 ms | 402 KiB | 186 Q