3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server = stream_socket_server('tcp://localhost:1337'); $a = stream_socket_client('tcp://localhost:1337'); $b = stream_socket_client('tcp://localhost:1337'); stream_context_set_option($a, 'test', 'name', 'a'); var_dump(stream_context_get_options($b));
Output for git.master, git.master_jit
Warning: stream_socket_server(): php_network_getaddresses: getaddrinfo for localhost failed: System error in /in/cdnV9 on line 3 Warning: stream_socket_server(): Unable to connect to tcp://localhost:1337 (php_network_getaddresses: getaddrinfo for localhost failed: System error) in /in/cdnV9 on line 3 Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo for localhost failed: System error in /in/cdnV9 on line 5 Warning: stream_socket_client(): Unable to connect to tcp://localhost:1337 (php_network_getaddresses: getaddrinfo for localhost failed: System error) in /in/cdnV9 on line 5 Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo for localhost failed: System error in /in/cdnV9 on line 6 Warning: stream_socket_client(): Unable to connect to tcp://localhost:1337 (php_network_getaddresses: getaddrinfo for localhost failed: System error) in /in/cdnV9 on line 6 Fatal error: Uncaught TypeError: stream_context_set_option(): Argument #1 ($context) must be of type resource, bool given in /in/cdnV9:8 Stack trace: #0 /in/cdnV9(8): stream_context_set_option(false, 'test', 'name', 'a') #1 {main} thrown in /in/cdnV9 on line 8
Process exited with code 255.
Output for rfc.property-hooks
Warning: stream_socket_server(): php_network_getaddresses: getaddrinfo for localhost failed: System error in /in/cdnV9 on line 3 Warning: stream_socket_server(): Unable to connect to tcp://localhost:1337 (php_network_getaddresses: getaddrinfo for localhost failed: System error) in /in/cdnV9 on line 3 Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo for localhost failed: System error in /in/cdnV9 on line 5 Warning: stream_socket_client(): Unable to connect to tcp://localhost:1337 (php_network_getaddresses: getaddrinfo for localhost failed: System error) in /in/cdnV9 on line 5 Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo for localhost failed: System error in /in/cdnV9 on line 6 Warning: stream_socket_client(): Unable to connect to tcp://localhost:1337 (php_network_getaddresses: getaddrinfo for localhost failed: System error) in /in/cdnV9 on line 6 Fatal error: Uncaught TypeError: stream_context_set_option(): Argument #1 ($context) must be of type resource, false given in /in/cdnV9:8 Stack trace: #0 /in/cdnV9(8): stream_context_set_option(false, 'test', 'name', 'a') #1 {main} thrown in /in/cdnV9 on line 8
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:
37.48 ms | 409 KiB | 5 Q