1--TEST-- 2Support for paths in the abstract namespace (bind, sendmsg, recvmsg) 3--EXTENSIONS-- 4sockets 5--SKIPIF-- 6<?php 7if (PHP_OS != 'Linux') { 8 die('skip For Linux only'); 9} 10?> 11--FILE-- 12<?php 13include __DIR__."/mcast_helpers.php.inc"; 14 15$path = "\x00/bar_foo"; 16 17echo "creating send socket\n"; 18$sends1 = socket_create(AF_UNIX, SOCK_DGRAM, 0) or die("err"); 19socket_set_nonblock($sends1) or die("Could not put in non-blocking mode"); 20 21echo "creating receive socket\n"; 22$s = socket_create(AF_UNIX, SOCK_DGRAM, 0) or die("err"); 23socket_bind($s, $path) or die("err"); 24 25$r = socket_sendmsg($sends1, [ 26 "name" => [ "path" => $path], 27 "iov" => ["test ", "thing", "\n"], 28], 0); 29var_dump($r); 30checktimeout($s, 500); 31 32if (!socket_recv($s, $buf, 20, 0)) die("recv"); 33print_r($buf); 34?> 35--EXPECT-- 36creating send socket 37creating receive socket 38int(11) 39test thing 40