xref: /PHP-8.3/ext/ftp/tests/ftp_constructor.phpt (revision 68224f2a)
1--TEST--
2Attempt to instantiate an FTP\Connection directly
3--EXTENSIONS--
4ftp
5pcntl
6--FILE--
7<?php
8
9try {
10    new FTP\Connection();
11} catch (Error $ex) {
12    echo "Exception: ", $ex->getMessage(), "\n";
13}
14--EXPECT--
15Exception: Cannot directly construct FTP\Connection, use ftp_connect() or ftp_ssl_connect() instead
16