--TEST-- Testing ftp_set_option errors while setting up --CREDITS-- Gabriel Caruso (carusogabriel34@gmail.com) --SKIPIF-- --FILE-- getMessage() . "\n"; } try { ftp_set_option($ftp, FTP_TIMEOUT_SEC, '0'); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } try { ftp_set_option($ftp, FTP_USEPASVADDRESS, ['1']); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } try { ftp_set_option($ftp, FTP_AUTOSEEK, 'true'); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } try { ftp_set_option($ftp, FOO_BAR, 1); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } ?> --EXPECT-- ftp_set_option(): Argument #3 ($value) must be greater than 0 for the FTP_TIMEOUT_SEC option ftp_set_option(): Argument #3 ($value) must be of type int for the FTP_TIMEOUT_SEC option, string given ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_USEPASVADDRESS option, array given ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_AUTOSEEK option, string given ftp_set_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS