summaryrefslogtreecommitdiff
path: root/ext/standard/tests/streams/bug74556.phpt
blob: 121426105a7f0acece932a23d41b7ae9b5f2fe91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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)