3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Hello World'; $socket= socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_set_option($socket, SOL_SOCKET, MCAST_JOIN_SOURCE_GROUP, array("group"=>"239.194.0.73","interface"=>"eth0","source"=>"239.194.0.73")); $binded = socket_bind($socket, '0.0.0.1', 6073); //receive data $from = '192.168.0.1'; $port = 4824; socket_recvfrom($socket, $buf, 12, MSG_WAITALL, $from, $port); echo "Received $buf from remote address $from and remote port $port" . PHP_EOL; ?> <?php echo 'Hello World'; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Hello World Fatal error: Uncaught Error: Call to undefined function socket_create() in /in/tHJRH:7 Stack trace: #0 {main} thrown in /in/tHJRH on line 7
Process exited with code 255.

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