3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server = stream_socket_server('tcp://127.0.0.1:8000'); stream_socket_server(stream_socket_get_name($server, false), $errno, $errstr); var_dump($errno, $errstr);
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Warning: stream_socket_server(): Unable to connect to tcp://127.0.0.1:8000 (Success) in /in/3qOBl on line 3 Fatal error: Uncaught TypeError: stream_socket_get_name(): Argument #1 ($socket) must be of type resource, false given in /in/3qOBl:4 Stack trace: #0 /in/3qOBl(4): stream_socket_get_name(false, false) #1 {main} thrown in /in/3qOBl on line 4
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30
Warning: stream_socket_server(): Unable to connect to tcp://127.0.0.1:8000 (Success) in /in/3qOBl on line 3 Fatal error: Uncaught TypeError: stream_socket_get_name(): Argument #1 ($socket) must be of type resource, bool given in /in/3qOBl:4 Stack trace: #0 /in/3qOBl(4): stream_socket_get_name(false, false) #1 {main} thrown in /in/3qOBl on line 4
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: stream_socket_server(): unable to connect to tcp://127.0.0.1:8000 (Success) in /in/3qOBl on line 3 Warning: stream_socket_get_name() expects parameter 1 to be resource, bool given in /in/3qOBl on line 4 Warning: stream_socket_server(): unable to connect to (Failed to parse address "") in /in/3qOBl on line 4 int(0) string(26) "Failed to parse address """

preferences:
84.47 ms | 1457 KiB | 4 Q