1--TEST--
2void socket_clear_error ([ resource $socket ] ) ;
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
5--EXTENSIONS--
6sockets
7--SKIPIF--
8<?php
9
10if (substr(PHP_OS, 0, 3) == 'WIN' ) {
11    die('skip non-windows only test');
12}
13?>
14--FILE--
15<?php
16$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
17socket_set_option($socket, -1, -1, -1);
18var_dump(socket_last_error($socket));
19socket_clear_error($socket);
20var_dump(socket_last_error($socket));
21?>
22--EXPECTF--
23Warning: socket_set_option(): Unable to set socket option [%s]: %s in %s on line %d
24int(%d)
25int(0)
26