1--TEST-- 2ext/sockets - socket_connect - 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 15$s_c = socket_create_listen(0); 16socket_getsockname($s_c, $addr, $port); 17 18// wrong parameter count 19$s_w = socket_connect(); 20$s_w = socket_connect($s_c); 21$s_w = socket_connect($s_c, '0.0.0.0'); 22$s_w = socket_connect($s_c, '0.0.0.0', $port); 23 24socket_close($s_c); 25 26?> 27--EXPECTF-- 28Warning: socket_connect() expects at least 2 parameters, 0 given in %s on line %d 29 30Warning: socket_connect() expects at least 2 parameters, 1 given in %s on line %d 31 32Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %d 33 34Warning: socket_connect(): unable to connect [%i]: %a in %s on line %d 35