1--TEST--
2Test ftp_ssl_connect() function : error conditions
3--SKIPIF--
4<?php
5$ssl = 1;
6require 'skipif.inc';
7if (!function_exists("ftp_ssl_connect")) die("skip ftp_ssl is disabled");
8?>
9--FILE--
10<?php
11echo "*** Testing ftp_ssl_connect() function : error conditions ***\n";
12echo "\n-- Testing ftp_ssl_connect() function on failure --\n";
13var_dump(ftp_ssl_connect('totes.invalid'));
14
15echo "\n-- Testing ftp_ssl_connect() function timeout exception for value 0 --\n";
16try {
17    ftp_ssl_connect('totes.invalid', 21, 0);
18} catch (ValueError $exception) {
19    echo $exception->getMessage() . "\n";
20}
21
22echo "===DONE===\n";
23--EXPECTF--
24*** Testing ftp_ssl_connect() function : error conditions ***
25
26-- Testing ftp_ssl_connect() function on failure --
27
28Warning: ftp_ssl_connect(): php_network_getaddresses: getaddrinfo failed: %s in %s on line %d
29bool(false)
30
31-- Testing ftp_ssl_connect() function timeout exception for value 0 --
32ftp_ssl_connect(): Argument #3 ($timeout) must be greater than 0
33===DONE===
34