1--TEST--
2ext/sockets - socket_write - test with empty parameters
3--CREDITS--
4Florian Anderiasch
5fa@php.net
6--SKIPIF--
7<?php
8    if (!extension_loaded('sockets')) {
9        die('skip sockets extension not available.');
10    }
11?>
12--FILE--
13<?php
14    $rand = rand(1,999);
15    // wrong parameter count
16    $s_w = socket_write();
17    $s_c = socket_create_listen(31330+$rand);
18    $s_w = socket_write($s_c);
19    $s_w = socket_write($s_c, "foo");
20    socket_close($s_c);
21?>
22--EXPECTF--
23
24Warning: socket_write() expects at least 2 parameters, 0 given in %s on line %i
25
26Warning: socket_write() expects at least 2 parameters, 1 given in %s on line %i
27
28Warning: socket_write(): unable to write to socket [%i]: %a in %s on line %i
29