1--TEST--
2Test socket_set_block return values
3--SKIPIF--
4<?php
5if (!extension_loaded('sockets')) {
6    die('SKIP The sockets extension is not loaded.');
7}
8?>
9--FILE--
10<?php
11
12$socket = socket_create_listen(31339);
13var_dump(socket_set_block($socket));
14socket_close($socket);
15
16$socket2 = socket_create_listen(31340);
17socket_close($socket2);
18var_dump(socket_set_block($socket2));
19
20?>
21--EXPECTF--
22bool(true)
23
24Warning: socket_set_block(): %d is not a valid Socket resource in %s on line %d
25bool(false)
26--CREDITS--
27Robin Mehner, robin@coding-robin.de
28PHP Testfest Berlin 2009-05-09
29