1--TEST--
2Bug #74429 Remote socket URI with unique persistence identifier broken
3--FILE--
4<?php
5
6/* This behavior is undocumented, but might be in use. Until there's no officially
7    supported alternative, ensure changes doesn't cause BC breach. Otherwise,
8    the test should be removed once the undocumented behavior changes. */
9
10for ($i=0; $i<100; $i++) {
11  $port = rand(10000, 65000);
12  /* Setup socket server */
13  $server = @stream_socket_server("tcp://127.0.0.1:$port");
14  if ($server) {
15    break;
16  }
17}
18
19$client0 = stream_socket_client("tcp://127.0.0.1:$port/client0");
20$client1 = stream_socket_client("tcp://127.0.0.1:$port/client1");
21
22var_dump($client0, $client1);
23
24fclose($server);
25fclose($client0);
26fclose($client1);
27
28?>
29--EXPECTF--
30resource(%d) of type (stream)
31resource(%d) of type (stream)
32