1--TEST--
2ext/sockets - socket_sendto - test with incorrect parameters
3--SKIPIF--
4<?php
5    if (!extension_loaded('sockets')) {
6        die('skip sockets extension not available.');
7    }
8?>
9--FILE--
10<?php
11    $rand = rand(1,999);
12    $s_c = socket_create_listen(31330+$rand);
13    $s_w = socket_sendto($s_c, "foo", -1, MSG_OOB, '127.0.0.1');
14    socket_close($s_c);
15?>
16--EXPECTF--
17Warning: socket_sendto(): Length cannot be negative in %s on line %i
18