summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/stream_002.phpt
blob: e982f704c4f7ab817b67675f2ec6a9b483bcc6c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--TEST--
stream_socket_client() and invalid arguments
--FILE--
<?php

$a = NULL;
$b = NULL;
var_dump(stream_socket_client("", $a, $b));
var_dump($a, $b);
var_dump(stream_socket_client("[", $a, $b));
var_dump($a, $b);
var_dump(stream_socket_client("[ ", $a, $b));
var_dump($a, $b);
var_dump(stream_socket_client(".", $a, $b));
var_dump($a, $b);
var_dump(stream_socket_client(1, $a, $b));
var_dump($a, $b);
var_dump(stream_socket_client(array(), $a, $b));
var_dump($a, $b);

echo "Done\n";
?>
--EXPECTF--	
Warning: stream_socket_client(): unable to connect to  (Failed to parse address "") in %s on line %d
bool(false)
int(0)
string(26) "Failed to parse address """

Warning: stream_socket_client(): unable to connect to [ (Failed to parse address "[") in %s on line %d
bool(false)
int(0)
string(27) "Failed to parse address "[""

Warning: stream_socket_client(): unable to connect to [  (Failed to parse%saddress "[ ") in %s on line %d
bool(false)
int(0)
string(%d) "Failed to parse%saddress "[ ""

Warning: stream_socket_client(): unable to connect to . (Failed to parse address ".") in %s on line %d
bool(false)
int(0)
string(27) "Failed to parse address ".""

Warning: stream_socket_client(): unable to connect to 1 (Failed to parse address "1") in %s on line %d
bool(false)
int(0)
string(27) "Failed to parse address "1""

Warning: stream_socket_client() expects parameter 1 to be string, array given in %s on line %d
bool(false)
int(0)
string(27) "Failed to parse address "1""
Done