1--TEST--
2ext/sockets - socket_getsockname - basic test
3--CREDITS--
4Florian Anderiasch
5fa@php.net
6--EXTENSIONS--
7sockets
8--FILE--
9<?php
10    $s_c     = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
11    $s_bind  = socket_bind($s_c, '0.0.0.0');
12    var_dump($s_bind);
13
14    // Connect to destination address
15    $s_conn  = socket_getsockname($s_c, $ip, $port);
16    var_dump($s_conn);
17    var_dump($ip);
18    var_dump($port);
19    socket_close($s_c);
20?>
21--EXPECTF--
22bool(true)
23bool(true)
24string(7) "0.0.0.0"
25int(%i)
26