1--TEST--
2Test socket_set_block return values
3--EXTENSIONS--
4sockets
5--FILE--
6<?php
7
8$socket = socket_create_listen(0);
9var_dump(socket_set_block($socket));
10socket_close($socket);
11
12$socket2 = socket_create_listen(0);
13socket_close($socket2);
14try {
15    var_dump(socket_set_block($socket2));
16} catch (Error $e) {
17    echo $e->getMessage(), "\n";
18}
19
20?>
21--EXPECT--
22bool(true)
23socket_set_block(): Argument #1 ($socket) has already been closed
24