1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/sockets/tests/socket_send_params.phpt
2020-04-21 20:41:26 +02:00

21 lines
489 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
$s_c = socket_create_listen(0);
try {
$s_w = socket_send($s_c, "foo", -1, MSG_OOB);
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
socket_close($s_c);
?>
--EXPECT--
socket_send(): Argument #3 ($len) must be greater than or equal to 0