socket_send_params.phpt 395 B

12345678910111213141516
  1. --TEST--
  2. ext/sockets - socket_send - test with incorrect parameters
  3. --EXTENSIONS--
  4. sockets
  5. --FILE--
  6. <?php
  7. $s_c = socket_create_listen(0);
  8. try {
  9. $s_w = socket_send($s_c, "foo", -1, MSG_OOB);
  10. } catch (\ValueError $e) {
  11. echo $e->getMessage() . \PHP_EOL;
  12. }
  13. socket_close($s_c);
  14. ?>
  15. --EXPECT--
  16. socket_send(): Argument #3 ($length) must be greater than or equal to 0