3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server = stream_socket_server('tcp://127.0.0.1:8080'); $context = stream_context_create(array('socket'=>array('bindto'=>'1.2.3.4:5678'))); $client = stream_socket_client('tcp://127.0.0.1:8080', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context); var_dump($client); var_dump(stream_socket_get_name($client, false));
Output for git.master
Warning: stream_socket_client(): Failed to bind to '1.2.3.4:5678', system said: Cannot assign requested address in /in/GkN7F on line 6 resource(7) of type (stream) string(15) "127.0.0.1:45726"
Output for git.master_jit
Warning: stream_socket_client(): Failed to bind to '1.2.3.4:5678', system said: Cannot assign requested address in /in/GkN7F on line 6 resource(7) of type (stream) string(15) "127.0.0.1:45724"

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:
13.79 ms | 460 KiB | 5 Q