1--TEST--
2ext/sockets - socket_read- 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_c = socket_read();
17    $s_c = socket_read(14);
18    $s_c_l = socket_create_listen(31330+$rand);
19    $s_c = socket_read($s_c_l, 25);
20    socket_close($s_c_l);
21?>
22--EXPECTF--
23Warning: socket_read() expects at least 2 parameters, 0 given in %s on line %i
24
25Warning: socket_read() expects at least 2 parameters, 1 given in %s on line %i
26
27Warning: socket_read(): unable to read from socket [%i]: %a in %s on line %i
28