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