3v4l.org

run code in 200+ php & hhvm versions
<?php $s = stream_socket_server('unix:///tmp/demo.sock'); $c = stream_socket_client('unix:///tmp/demo.sock'); var_dump( stream_socket_get_name($s, true), stream_socket_get_name($c, false) );
based on 5C1lo
Output for 7.0.21 - 7.0.25, 7.1.7 - 7.2.6
bool(false) bool(false)
Output for 5.0.0 - 5.6.30, 7.0.0 - 7.0.20, 7.1.0 - 7.1.6
bool(false) string(1) ""
Output for hhvm-3.22.0
Warning: unable to retrieve peer name [107]: Transport endpoint is not connected in /in/VStV6 on line -1 bool(false) string(0) ""
Output for hhvm-3.19.2 - 3.21.3
Warning: unable to retrieve peer name [107]: Transport endpoint is not connected in /in/VStV6 on line 9 bool(false) string(0) ""
Output for hhvm-3.10.1 - 3.18.5
Warning: unable to retrieve peer name [107]: Transport endpoint is not connected in /in/VStV6 on line 7 bool(false) string(1) ":"
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: stream_socket_server() in /in/VStV6 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: stream_socket_server() in /in/VStV6 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: stream_socket_server() in /in/VStV6 on line 3