php-src/ext/sockets/tests/gh13603.phpt
David Carlier e3f0d03452 Fix GH-13603 ext/sockets: properly initialised address info data.
Led to random characters visible on socket id on macOs.

Close GH-13606
2024-03-06 11:37:48 +00:00

16 lines
393 B
PHP

--TEST--
GH-13603 - socket_getsockname - invalid characters
--EXTENSIONS--
sockets
--FILE--
<?php
$socket = socket_create(AF_UNIX, SOCK_STREAM, 0);
socket_bind($socket, 'sn.socp');
socket_listen($socket);
socket_getsockname($socket, $address);
var_dump($address);
socket_close($socket);
unlink($address);
--EXPECT--
string(7) "sn.socp"