1--TEST--
2stream_socket_client() and invalid arguments
3--FILE--
4<?php
5
6$a = NULL;
7$b = NULL;
8var_dump(stream_socket_client("", $a, $b));
9var_dump($a, $b);
10var_dump(stream_socket_client("[", $a, $b));
11var_dump($a, $b);
12var_dump(stream_socket_client("[ ", $a, $b));
13var_dump($a, $b);
14var_dump(stream_socket_client(".", $a, $b));
15var_dump($a, $b);
16var_dump(stream_socket_client(1, $a, $b));
17var_dump($a, $b);
18var_dump(stream_socket_client(array(), $a, $b));
19var_dump($a, $b);
20
21echo "Done\n";
22?>
23--EXPECTF--
24Warning: stream_socket_client(): unable to connect to  (Failed to parse address "") in %s on line %d
25bool(false)
26int(0)
27string(26) "Failed to parse address """
28
29Warning: stream_socket_client(): unable to connect to [ (Failed to parse address "[") in %s on line %d
30bool(false)
31int(0)
32string(27) "Failed to parse address "[""
33
34Warning: stream_socket_client(): unable to connect to [  (Failed to parse%saddress "[ ") in %s on line %d
35bool(false)
36int(0)
37string(%d) "Failed to parse%saddress "[ ""
38
39Warning: stream_socket_client(): unable to connect to . (Failed to parse address ".") in %s on line %d
40bool(false)
41int(0)
42string(27) "Failed to parse address ".""
43
44Warning: stream_socket_client(): unable to connect to 1 (Failed to parse address "1") in %s on line %d
45bool(false)
46int(0)
47string(27) "Failed to parse address "1""
48
49Warning: stream_socket_client() expects parameter 1 to be string, array given in %s on line %d
50bool(false)
51int(0)
52string(27) "Failed to parse address "1""
53Done
54