--TEST-- recvmsg(): receive SCM_CREDS messages --EXTENSIONS-- sockets --SKIPIF-- --FILE-- [], "buffer_size" => 2000, "controllen" => socket_cmsg_space(SOL_SOCKET, SCM_CREDS2, 1) ]; if (!socket_recvmsg($s, $data, 0)) die("recvmsg"); print_r($data); $pid = getmypid(); var_dump($data['control'][0]['data']['pid'] === $pid); ?> --CLEAN-- --EXPECTF-- creating send socket object(Socket)#%d (0) { } creating receive socket object(Socket)#%d (0) { } bool(true) int(5) Array ( [name] => Array ( [family] => %d [path] => ) [control] => Array ( [0] => Array ( [level] => %d [type] => %d [data] => Array ( [pid] => %d [uid] => %d [gid] => %d ) ) ) [iov] => Array ( [0] => dread ) [flags] => 0 ) bool(true)