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.28, 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
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.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29
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:
125.93 ms | 411 KiB | 5 Q