1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/sockets/tests/socket_send_params.phpt
2018-11-13 12:56:37 +01:00

18 lines
430 B
PHP

--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