xref: /PHP-7.4/ext/ftp/tests/006.phpt (revision d679f022)
1--TEST--
2FTP with bogus parameters
3--SKIPIF--
4<?php
5require 'skipif.inc';
6?>
7--FILE--
8<?php
9$ftp=null;
10
11var_dump(ftp_connect(array()));
12var_dump(ftp_connect('127.0.0.1', 0, -3));
13var_dump(ftp_raw($ftp));
14var_dump(ftp_mkdir($ftp));
15var_dump(ftp_rmdir($ftp));
16var_dump(ftp_nlist($ftp));
17var_dump(ftp_rawlist($ftp));
18var_dump(ftp_fget($ftp));
19var_dump(ftp_nb_fget($ftp));
20var_dump(ftp_nb_get($ftp));
21var_dump(ftp_pasv($ftp));
22var_dump(ftp_nb_continue());
23var_dump(ftp_fput());
24var_dump(ftp_nb_fput($ftp));
25var_dump(ftp_put($ftp));
26var_dump(ftp_nb_put($ftp));
27var_dump(ftp_size($ftp));
28var_dump(ftp_mdtm($ftp));
29var_dump(ftp_rename($ftp));
30var_dump(ftp_site($ftp));
31var_dump(ftp_set_option($ftp));
32var_dump(ftp_get_option($ftp));
33var_dump(ftp_mlsd($ftp));
34var_dump(ftp_append($ftp));
35
36?>
37--EXPECTF--
38Warning: ftp_connect() expects parameter 1 to be string, array given in %s006.php on line 4
39NULL
40
41Warning: ftp_connect(): Timeout has to be greater than 0 in %s006.php on line 5
42bool(false)
43
44Warning: ftp_raw() expects exactly 2 parameters, 1 given in %s006.php on line 6
45NULL
46
47Warning: ftp_mkdir() expects exactly 2 parameters, 1 given in %s006.php on line 7
48NULL
49
50Warning: ftp_rmdir() expects exactly 2 parameters, 1 given in %s006.php on line 8
51NULL
52
53Warning: ftp_nlist() expects exactly 2 parameters, 1 given in %s006.php on line 9
54NULL
55
56Warning: ftp_rawlist() expects at least 2 parameters, 1 given in %s006.php on line 10
57NULL
58
59Warning: ftp_fget() expects at least 3 parameters, 1 given in %s006.php on line 11
60NULL
61
62Warning: ftp_nb_fget() expects at least 3 parameters, 1 given in %s006.php on line 12
63NULL
64
65Warning: ftp_nb_get() expects at least 3 parameters, 1 given in %s006.php on line 13
66NULL
67
68Warning: ftp_pasv() expects exactly 2 parameters, 1 given in %s006.php on line 14
69NULL
70
71Warning: ftp_nb_continue() expects exactly 1 parameter, 0 given in %s006.php on line 15
72NULL
73
74Warning: ftp_fput() expects at least 3 parameters, 0 given in %s006.php on line 16
75NULL
76
77Warning: ftp_nb_fput() expects at least 3 parameters, 1 given in %s006.php on line 17
78NULL
79
80Warning: ftp_put() expects at least 3 parameters, 1 given in %s006.php on line 18
81NULL
82
83Warning: ftp_nb_put() expects at least 3 parameters, 1 given in %s006.php on line 19
84NULL
85
86Warning: ftp_size() expects exactly 2 parameters, 1 given in %s006.php on line 20
87NULL
88
89Warning: ftp_mdtm() expects exactly 2 parameters, 1 given in %s006.php on line 21
90NULL
91
92Warning: ftp_rename() expects exactly 3 parameters, 1 given in %s006.php on line 22
93NULL
94
95Warning: ftp_site() expects exactly 2 parameters, 1 given in %s006.php on line 23
96NULL
97
98Warning: ftp_set_option() expects exactly 3 parameters, 1 given in %s006.php on line 24
99NULL
100
101Warning: ftp_get_option() expects exactly 2 parameters, 1 given in %s006.php on line 25
102NULL
103
104Warning: ftp_mlsd() expects exactly 2 parameters, 1 given in %s006.php on line 26
105NULL
106
107Warning: ftp_append() expects at least 3 parameters, 1 given in %s006.php on line 27
108NULL
109