bug64330.phpt 493 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #64330 (stream_socket_server() creates wrong Abstract Namespace UNIX sockets)
  3. --SKIPIF--
  4. <?php
  5. if (!in_array("unix", stream_get_transports())) die("SKIP unix domain sockets unavailable");
  6. if (!stristr(PHP_OS, "Linux")) die('skip abstract namespace is a Linux-only feature');
  7. ?>
  8. --FILE--
  9. <?php
  10. echo "Test\n";
  11. $server = stream_socket_server("unix://\x00/MyBindName");
  12. $client = stream_socket_client("unix://\x00/MyBindName");
  13. if ($client) {
  14. echo "ok\n";
  15. }
  16. ?>
  17. --EXPECT--
  18. Test
  19. ok