3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $server_ip = '195.138.247.69'; $server_port = 1008; $connect = "\x10\x00\x00\x01"; $sth = "\x10\x00\x00\x03"; $info = "\x00\x00\x01\x41\x07\x01\x03\x30\x2e\x36\x20\x36\x32\x36\x66\x63\x65\x39\x61\x37\x37\x38\x64\x66\x34\x64\x34\x00\x00"; $ready = "\x00\x01\x01\x40\x01\x02\x1d"; $enter = "\x00\x06\x01\x40\x01\x04\x1f"; $name = "\x00\x03\x01\x43\x0e\x03\x28\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x00\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x00\x40\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x00\x01\x80\xfc\xc7\x05\x80\xfc\x07"; $name2 = "\x00\x0a\x01\x43\x0e\x05\x2a\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x00\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x00\x40\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x00\x01\x80\xfc\xc7\x05\x80\xfc\x07"; $chat = "\x00\x0a\x01\x40\x08\x05\x22\x00\x31\x31\x32\x33\x34\x00"; $alive = "\x00\x00\x21\xa4\x8a\x80\xe4\x01\x68\xc3\x08\xd6\x30\xa9\x1a\xaa\x61\x52\xb5\xb5\xe6\x33\x65\xc7\x12\x33\x0b\x05\x8a\x1b"; $test = "\x00\x20\xa4\x89\x80\x82\x01\x68\x67\x44\x17\x26\x5d\xa9\xf6\xd3\xd0\x95\x6a\xeb\xb0\xa2\x4d\x66\x8f\xb5\xe2\x06"; $disconnect = "\x10\x0b\x00\x04\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x63"; print "1. Sending heartbeat to IP $server_ip, port $server_port\n"; if ($socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP)) { for(;$blub < 10; $blub++) { socket_sendto($socket, $connect, strlen($connect), 0, $server_ip, $server_port); socket_sendto($socket, $sth, strlen($sth), 0, $server_ip, $server_port); socket_sendto($socket, $info, strlen($info), 0, $server_ip, $server_port); socket_sendto($socket, $ready, strlen($ready), 0, $server_ip, $server_port); socket_sendto($socket, $name, strlen($name), 0, $server_ip, $server_port); socket_sendto($socket, $enter, strlen($enter), 0, $server_ip, $server_port); socket_sendto($socket, $name2, strlen($name2), 0, $server_ip, $server_port); sleep(1); socket_sendto($socket, $chat, strlen($chat), 0, $server_ip, $server_port); //socket_sendto($socket, $alive, strlen($alive), 0, $server_ip, $server_port); sleep(1); //socket_sendto($socket, $disconnect, strlen($disconnect), 0, $server_ip, $server_port); //sleep(6); //sleep(0.2); } } else { print("can't create socket\n"); } print("end");
Output for 7.0.0 - 7.1.0
1. Sending heartbeat to IP 195.138.247.69, port 1008 Fatal error: Uncaught Error: Call to undefined function socket_create() in /in/APNMK:21 Stack trace: #0 {main} thrown in /in/APNMK on line 21
Process exited with code 255.
Output for hhvm-3.12.0
1. Sending heartbeat to IP 195.138.247.69, port 1008 Notice: Undefined variable: blub in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Notice: Undefined variable: blub in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line -1
Process exited with code 137.
Output for hhvm-3.10.0
1. Sending heartbeat to IP 195.138.247.69, port 1008 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 34 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31
Process exited with code 137.
Output for 5.4.0 - 5.6.28
1. Sending heartbeat to IP 195.138.247.69, port 1008 Fatal error: Call to undefined function socket_create() in /in/APNMK on line 21
Process exited with code 255.
Output for 5.0.4 - 5.3.29
1. Sending heartbeat to IP 195.138.247.69, port 1008 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 34 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32
Process exited with code 137.
Output for 5.0.0 - 5.0.3
1. Sending heartbeat to IP 195.138.247.69, port 1008 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 34 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: socket_sendto(): unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32
Process exited with code 137.
Output for 4.3.2 - 4.4.9
1. Sending heartbeat to IP 195.138.247.69, port 1008 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 34 Notice: Undefined variable: blub in /in/APNMK on line 24 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 26 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 27 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 28 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 29 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 30 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 31 Warning: socket_sendto() unable to write to socket [101]: Network is unreachable in /in/APNMK on line 32
Process exited with code 137.
Output for 4.3.0 - 4.3.1
1. Sending heartbeat to IP 195.138.247.69, port 1008 Notice: Undefined variable: blub in /in/APNMK on line 24
Process exited with code 139.