mirror of
https://github.com/php/php-src.git
synced 2026-04-17 04:51:03 +02:00
Similar to other resource to object migrations, `FTPConnection` class is not allowed to be constructed with `new FTPConnection`.
Related to b4503fbf88.
Closes GH-6533.
16 lines
327 B
PHP
16 lines
327 B
PHP
--TEST--
|
|
Attempt to instantiate an FTPConnection directly
|
|
--SKIPIF--
|
|
<?php
|
|
require 'skipif.inc';
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
new FTPConnection();
|
|
} catch (Error $ex) {
|
|
echo "Exception: ", $ex->getMessage(), "\n";
|
|
}
|
|
--EXPECT--
|
|
Exception: Cannot directly construct FTPConnection, use ftp_connect() or ftp_ssl_connect() instead
|