--TEST--
-Test if socket binds on 31337
+Test if socket binds on 31338
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
}
--FILE--
<?php
-$sock = socket_create_listen(31337);
+$sock = socket_create_listen(31338);
socket_getsockname($sock, $addr, $port);
var_dump($addr, $port);
--EXPECT--
string(7) "0.0.0.0"
-int(31337)
+int(31338)
--CREDITS--
Till Klampaeckel, till@php.net
PHP Testfest Berlin 2009-05-09
Warning: socket_create_pair() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d
NULL
-Warning: socket_create_pair(): unable to create socket pair [94]: Socket type not supported in %s on line %d
+Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d
bool(false)
Warning: socket_create_pair(): invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d
-Warning: socket_create_pair(): unable to create socket pair [94]: Socket type not supported in %s on line %d
+Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d
bool(false)
Warning: socket_create_pair(): invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d
-Warning: socket_create_pair(): unable to create socket pair [95]: Operation not supported in %s on line %d
+Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported %s on line %d
bool(false)
--CREDITS--
Till Klampaeckel, till@php.net
socket_close($socket);
--EXPECTF--
-Warning: socket_recvfrom(): unable to recvfrom [11]: Resource temporarily unavailable in %s on line %d
+Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
Warning: Wrong parameter count for socket_sendto() in %s on line %d
@unlink($address);
?>
--EXPECTF--
-Warning: socket_create(): Unable to create socket [93]: Protocol not supported in %s on line %d
+Warning: socket_create(): Unable to create socket [%d]: Protocol not supported in %s on line %d
-Warning: socket_recvfrom(): unable to recvfrom [11]: Resource temporarily unavailable in %s on line %d
+Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
Warning: socket_sendto() expects at least 5 parameters, 4 given in %s on line %d
bool(false)
--FILE--
<?php
-$socket = socket_create_listen(31337);
+$socket = socket_create_listen(31339);
var_dump(socket_set_block($socket));
socket_close($socket);
-$socket2 = socket_create_listen(31338);
+$socket2 = socket_create_listen(31340);
socket_close($socket2);
var_dump(socket_set_block($socket2));
--FILE--
<?php
-$socket = socket_create_listen(31337);
+$socket = socket_create_listen(31339);
var_dump(socket_set_nonblock($socket));
socket_close($socket);
-$socket2 = socket_create_listen(31338);
+$socket2 = socket_create_listen(31340);
socket_close($socket2);
var_dump(socket_set_nonblock($socket2));