php-src/ext/standard/tests/streams/bug74556.phpt
Remi Collet 0f20970216 Fix possible test failure with path > 108
E.g.  Notice: stream_socket_server(): socket path exceeded the maximum allowed length of 108 bytes and was truncated in /builddir/build/BUILD/php-src-32d7fa6f74b56fed8124d4dea0f98f0f9964a64e/ext/standard/tests/streams/bug74556.php on line 4
2017-05-29 11:17:32 +02:00

21 lines
450 B
PHP

--TEST--
Bug #74556 stream_socket_get_name() on unix socket returns "\0"
--SKIPIF--
<?php
if (!strncasecmp(PHP_OS, 'WIN', 3)) echo "skip Unix Only";
--FILE--
<?php
$sock = tempnam(sys_get_temp_dir(), 'bug74556') . '.sock';
$s = stream_socket_server("unix://$sock");
$c = stream_socket_client("unix://$sock");
var_dump(
stream_socket_get_name($s, true),
stream_socket_get_name($c, false)
);
unlink($sock);
--EXPECT--
bool(false)
bool(false)