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);
18
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: stream_socket_client(): Unable to connect to  (Failed to parse address "") in %s on line %d
23bool(false)
24int(0)
25string(26) "Failed to parse address """
26
27Warning: stream_socket_client(): Unable to connect to [ (Failed to parse address "[") in %s on line %d
28bool(false)
29int(0)
30string(27) "Failed to parse address "[""
31
32Warning: stream_socket_client(): Unable to connect to [  (Failed to parse%saddress "[ ") in %s on line %d
33bool(false)
34int(0)
35string(%d) "Failed to parse%saddress "[ ""
36
37Warning: stream_socket_client(): Unable to connect to . (Failed to parse address ".") in %s on line %d
38bool(false)
39int(0)
40string(27) "Failed to parse address ".""
41
42Warning: stream_socket_client(): Unable to connect to 1 (Failed to parse address "1") in %s on line %d
43bool(false)
44int(0)
45string(27) "Failed to parse address "1""
46Done
47