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(0); 13var_dump(socket_set_block($socket)); 14socket_close($socket); 15 16$socket2 = socket_create_listen(0); 17socket_close($socket2); 18try { 19 var_dump(socket_set_block($socket2)); 20} catch (Error $e) { 21 echo $e->getMessage(), "\n"; 22} 23 24?> 25--EXPECT-- 26bool(true) 27socket_set_block(): Argument #1 ($socket) has already been closed 28