summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/socket_create_listen-win32.phpt
blob: 23bf963c5f7930a6e27266d549a04f8c6e92bcad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Test if socket binds on 31338
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
	die('skip.. Not valid for non Windows');
}
if (!extension_loaded('sockets')) {
    die('SKIP The sockets extension is not loaded.');
}
--FILE--
<?php
$sock = socket_create_listen(31338);
socket_getsockname($sock, $addr, $port); 
var_dump($addr, $port);
--EXPECT--
string(9) "127.0.0.1"
int(31338)
--CREDITS--
Till Klampaeckel, till@php.net
PHP Testfest Berlin 2009-05-09