Adjust tests for zpp TypeError change
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 19 Feb 2019 16:11:00 +0000 (17:11 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 11 Mar 2019 10:32:20 +0000 (11:32 +0100)
907 files changed:
Zend/tests/011.phpt
Zend/tests/012.phpt
Zend/tests/013.phpt
Zend/tests/014.phpt
Zend/tests/015.phpt
Zend/tests/017.phpt
Zend/tests/018.phpt
Zend/tests/020.phpt
Zend/tests/bug31720.phpt
Zend/tests/bug45186.phpt
Zend/tests/bug45186_2.phpt
Zend/tests/bug46106.phpt
Zend/tests/bug51827.phpt
Zend/tests/bug70895.phpt
Zend/tests/bug70898.phpt
Zend/tests/bug73338.phpt
Zend/tests/call_user_func_001.phpt
Zend/tests/call_user_func_002.phpt
Zend/tests/class_exists_002.phpt
Zend/tests/closure_040.phpt
Zend/tests/error_reporting10.phpt
Zend/tests/exception_handler_004.phpt
Zend/tests/function_arguments/argument_count_incorrect_internal.phpt
Zend/tests/interface_exists_001.phpt
Zend/tests/methods-on-non-objects-call-user-func.phpt
Zend/tests/trait_exists_001.phpt
Zend/tests/unexpected_ref_bug.phpt
ext/bz2/tests/001.phpt
ext/bz2/tests/003-mb.phpt
ext/bz2/tests/003.phpt
ext/bz2/tests/005.phpt
ext/calendar/tests/jdtomonthname.phpt
ext/curl/tests/curl_setopt_error.phpt
ext/date/tests/005.phpt
ext/date/tests/006.phpt
ext/date/tests/007.phpt
ext/date/tests/008.phpt
ext/date/tests/009.phpt
ext/date/tests/009_win32.phpt
ext/date/tests/011.phpt
ext/date/tests/012.phpt
ext/date/tests/013.phpt
ext/date/tests/014.phpt
ext/date/tests/68062.phpt
ext/date/tests/DateTimeImmutable_createFromMutable.phpt
ext/date/tests/DateTime_createFromImmutable.phpt
ext/date/tests/bug36988.phpt
ext/date/tests/bug52062.phpt
ext/date/tests/bug70245.phpt
ext/date/tests/date_default_timezone_set_error.phpt
ext/date/tests/date_parse_001.phpt
ext/date/tests/date_parse_error.phpt
ext/date/tests/date_sunrise_variation9.phpt [deleted file]
ext/date/tests/date_sunset_variation9.phpt [deleted file]
ext/date/tests/getdate_variation7.phpt [deleted file]
ext/date/tests/gmdate_variation14.phpt [deleted file]
ext/date/tests/gmmktime_basic.phpt
ext/date/tests/idate_variation3.phpt [deleted file]
ext/date/tests/localtime_variation3.phpt [deleted file]
ext/date/tests/microtime_error.phpt
ext/date/tests/mktime_error.phpt
ext/date/tests/strftime_variation23.phpt [deleted file]
ext/date/tests/timezone_offset_get_error.phpt
ext/dba/tests/dba011.phpt
ext/dba/tests/dba_handlers.phpt
ext/dba/tests/dba_optimize.phpt
ext/dba/tests/dba_split.phpt
ext/dba/tests/dba_sync.phpt
ext/exif/tests/exif_imagetype_error.phpt
ext/fileinfo/tests/bug71527-mb.phpt
ext/fileinfo/tests/bug71527.phpt
ext/fileinfo/tests/finfo_close_error.phpt
ext/fileinfo/tests/finfo_open_001.phpt
ext/fileinfo/tests/finfo_open_error.phpt
ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt
ext/fileinfo/tests/finfo_set_flags_basic.phpt
ext/filter/tests/007.phpt
ext/filter/tests/008.phpt
ext/filter/tests/009.phpt
ext/filter/tests/010.phpt
ext/filter/tests/011.phpt
ext/filter/tests/039.phpt
ext/filter/tests/040.phpt
ext/ftp/tests/004.phpt
ext/ftp/tests/006.phpt [deleted file]
ext/ftp/tests/ftp_get_basic.phpt
ext/ftp/tests/ftp_ssl_connect_error.phpt
ext/gd/tests/imagecolorallocatealpha_error1.phpt
ext/gd/tests/imagecolorstotal_error.phpt
ext/gd/tests/imagecreatetruecolor_error2.phpt
ext/gd/tests/imagefilter_error1.phpt
ext/gd/tests/imagegd2_nullbyte_injection.phpt
ext/gd/tests/imagegd_nullbyte_injection.phpt
ext/gd/tests/imageistruecolor_error1.phpt
ext/gd/tests/imagesetthickness_error1.phpt
ext/gd/tests/imagetruecolortopalette_error1.phpt
ext/gd/tests/imagetruecolortopalette_error3.phpt
ext/gd/tests/lines.phpt
ext/gettext/tests/dcngettext.phpt
ext/gmp/tests/gmp_abs.phpt
ext/gmp/tests/gmp_and.phpt
ext/gmp/tests/gmp_clrbit.phpt
ext/gmp/tests/gmp_cmp.phpt
ext/gmp/tests/gmp_com.phpt
ext/gmp/tests/gmp_div_q.phpt
ext/gmp/tests/gmp_div_qr.phpt
ext/gmp/tests/gmp_div_r.phpt
ext/gmp/tests/gmp_divexact.phpt
ext/gmp/tests/gmp_export.phpt
ext/gmp/tests/gmp_fact.phpt
ext/gmp/tests/gmp_gcd.phpt
ext/gmp/tests/gmp_gcdext.phpt
ext/gmp/tests/gmp_hamdist.phpt
ext/gmp/tests/gmp_import.phpt
ext/gmp/tests/gmp_init.phpt
ext/gmp/tests/gmp_intval.phpt
ext/gmp/tests/gmp_invert.phpt
ext/gmp/tests/gmp_jacobi.phpt
ext/gmp/tests/gmp_legendre.phpt
ext/gmp/tests/gmp_mod.phpt
ext/gmp/tests/gmp_neg.phpt
ext/gmp/tests/gmp_or.phpt
ext/gmp/tests/gmp_perfect_square.phpt
ext/gmp/tests/gmp_popcount.phpt
ext/gmp/tests/gmp_pow.phpt
ext/gmp/tests/gmp_pown.phpt
ext/gmp/tests/gmp_prob_prime.phpt
ext/gmp/tests/gmp_random_bits.phpt
ext/gmp/tests/gmp_random_range.phpt
ext/gmp/tests/gmp_remroot.phpt
ext/gmp/tests/gmp_root.phpt
ext/gmp/tests/gmp_scan0.phpt
ext/gmp/tests/gmp_scan1.phpt
ext/gmp/tests/gmp_setbit.phpt
ext/gmp/tests/gmp_sign.phpt
ext/gmp/tests/gmp_sqrt.phpt
ext/gmp/tests/gmp_sqrtrem.phpt
ext/gmp/tests/gmp_strval.phpt
ext/gmp/tests/gmp_sub.phpt
ext/gmp/tests/gmp_testbit.phpt
ext/gmp/tests/gmp_xor.phpt
ext/hash/tests/hash_error.phpt
ext/hash/tests/hash_file_error.phpt
ext/hash/tests/hash_hkdf_error.phpt
ext/hash/tests/hash_hmac_error.phpt
ext/hash/tests/hash_hmac_file_basic.phpt
ext/hash/tests/hash_hmac_file_error.phpt
ext/hash/tests/hash_init_error.phpt
ext/hash/tests/hash_pbkdf2_error.phpt
ext/intl/tests/breakiter_createCodePointInstance_error.phpt [deleted file]
ext/intl/tests/breakiter_factories_error.phpt [deleted file]
ext/intl/tests/breakiter_first_last_previous_current_error.phpt [deleted file]
ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt [deleted file]
ext/intl/tests/breakiter_getLocale_error.phpt [deleted file]
ext/intl/tests/breakiter_getPartsIterator_error.phpt
ext/intl/tests/breakiter_getText_error.phpt [deleted file]
ext/intl/tests/breakiter_next_error.phpt [deleted file]
ext/intl/tests/breakiter_setText_error.phpt [deleted file]
ext/intl/tests/calendar_add_error.phpt
ext/intl/tests/calendar_before_after_error.phpt
ext/intl/tests/calendar_clear_error.phpt
ext/intl/tests/calendar_createInstance_error.phpt
ext/intl/tests/calendar_equals_error.phpt
ext/intl/tests/calendar_fieldDifference_error.phpt
ext/intl/tests/calendar_fromDateTime_error.phpt
ext/intl/tests/calendar_getAvailableLocales_error.phpt [deleted file]
ext/intl/tests/calendar_getDayOfWeekType_error.phpt
ext/intl/tests/calendar_getErrorCode_error.phpt
ext/intl/tests/calendar_getErrorMessage_error.phpt
ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt [deleted file]
ext/intl/tests/calendar_getLocale_error.phpt
ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
ext/intl/tests/calendar_getNow_error.phpt [deleted file]
ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
ext/intl/tests/calendar_getTimeZone_error.phpt
ext/intl/tests/calendar_getTime_error.phpt
ext/intl/tests/calendar_getType_error.phpt
ext/intl/tests/calendar_getWeekendTransition_error.phpt
ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
ext/intl/tests/calendar_inDaylightTime_error.phpt
ext/intl/tests/calendar_isEquivalentTo_error.phpt
ext/intl/tests/calendar_isLenient_error.phpt
ext/intl/tests/calendar_isSet_error.phpt
ext/intl/tests/calendar_isWeekend_error.phpt
ext/intl/tests/calendar_roll_error.phpt
ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
ext/intl/tests/calendar_setLenient_error.phpt
ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
ext/intl/tests/calendar_setTimeZone_error.phpt
ext/intl/tests/calendar_setTime_error.phpt
ext/intl/tests/calendar_set_error.phpt
ext/intl/tests/calendar_toDateTime_error.phpt
ext/intl/tests/cpbi_getLastCodePoint_error.phpt [deleted file]
ext/intl/tests/dateformat_formatObject_error.phpt
ext/intl/tests/dateformat_getCalendarObject_error.phpt [deleted file]
ext/intl/tests/dateformat_getTimeZone_error.phpt [deleted file]
ext/intl/tests/dateformat_setTimeZone_error.phpt
ext/intl/tests/formatter_fail.phpt
ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt [deleted file]
ext/intl/tests/idn_uts46_errors.phpt
ext/intl/tests/intl_get_error_code.phpt
ext/intl/tests/intl_get_error_message.phpt
ext/intl/tests/locale_accept.phpt
ext/intl/tests/msgfmt_fail2.phpt
ext/intl/tests/timezone_countEquivalentIDs_error.phpt
ext/intl/tests/timezone_createDefault_error.phpt [deleted file]
ext/intl/tests/timezone_createEnumeration_error.phpt
ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
ext/intl/tests/timezone_createTimeZone_error.phpt
ext/intl/tests/timezone_fromDateTimeZone_error.phpt
ext/intl/tests/timezone_getCanonicalID_error.phpt
ext/intl/tests/timezone_getDSTSavings_error.phpt
ext/intl/tests/timezone_getDisplayName_error.phpt
ext/intl/tests/timezone_getEquivalentID_error.phpt
ext/intl/tests/timezone_getErrorCode_error.phpt
ext/intl/tests/timezone_getErrorMessage_error.phpt
ext/intl/tests/timezone_getGMT_error.phpt [deleted file]
ext/intl/tests/timezone_getID_error.phpt
ext/intl/tests/timezone_getOffset_error.phpt
ext/intl/tests/timezone_getRawOffset_error.phpt
ext/intl/tests/timezone_getRegion_error.phpt
ext/intl/tests/timezone_getTZDataVersion_error.phpt [deleted file]
ext/intl/tests/timezone_getUnknown_error.phpt [deleted file]
ext/intl/tests/timezone_toDateTimeZone_error.phpt
ext/intl/tests/timezone_useDaylightTime_error.phpt
ext/intl/tests/transliterator_create_from_rule_error.phpt
ext/intl/tests/transliterator_create_inverse_error.phpt
ext/intl/tests/transliterator_get_error_code_error.phpt
ext/intl/tests/transliterator_get_error_message_error.phpt
ext/intl/tests/transliterator_list_ids_error.phpt [deleted file]
ext/intl/tests/transliterator_transliterate_error.phpt
ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt [deleted file]
ext/json/tests/001.phpt
ext/json/tests/json_decode_error.phpt
ext/json/tests/json_last_error_error.phpt
ext/json/tests/json_last_error_msg_error.phpt
ext/libxml/tests/001.phpt
ext/libxml/tests/004.phpt
ext/libxml/tests/bug63389.phpt
ext/libxml/tests/libxml_set_external_entity_loader_error1.phpt
ext/mbstring/tests/mb_convert_encoding.phpt
ext/mbstring/tests/mb_detect_encoding.phpt
ext/mbstring/tests/mb_encoding_aliases.phpt
ext/mbstring/tests/mb_ereg1.phpt
ext/mbstring/tests/mb_ereg2.phpt
ext/mbstring/tests/mb_ereg_variation1.phpt [deleted file]
ext/mbstring/tests/mb_http_output.phpt
ext/mbstring/tests/mb_internal_encoding.phpt
ext/mbstring/tests/mb_stripos.phpt
ext/mbstring/tests/mb_strlen.phpt
ext/mbstring/tests/mb_strpos.phpt
ext/mysqli/tests/057.phpt
ext/mysqli/tests/mysqli_affected_rows.phpt
ext/mysqli/tests/mysqli_autocommit.phpt
ext/mysqli/tests/mysqli_begin_transaction.phpt
ext/mysqli/tests/mysqli_change_user.phpt
ext/mysqli/tests/mysqli_character_set_name.phpt
ext/mysqli/tests/mysqli_character_set_name_oo.phpt
ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
ext/mysqli/tests/mysqli_close.phpt
ext/mysqli/tests/mysqli_close_oo.phpt
ext/mysqli/tests/mysqli_commit.phpt
ext/mysqli/tests/mysqli_connect.phpt
ext/mysqli/tests/mysqli_data_seek.phpt
ext/mysqli/tests/mysqli_data_seek_oo.phpt
ext/mysqli/tests/mysqli_debug.phpt
ext/mysqli/tests/mysqli_dump_debug_info.phpt
ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
ext/mysqli/tests/mysqli_errno.phpt
ext/mysqli/tests/mysqli_error.phpt
ext/mysqli/tests/mysqli_error_unicode.phpt
ext/mysqli/tests/mysqli_fetch_all.phpt
ext/mysqli/tests/mysqli_fetch_array.phpt
ext/mysqli/tests/mysqli_fetch_assoc.phpt
ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
ext/mysqli/tests/mysqli_fetch_field.phpt
ext/mysqli/tests/mysqli_fetch_field_direct.phpt
ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
ext/mysqli/tests/mysqli_fetch_field_oo.phpt
ext/mysqli/tests/mysqli_fetch_fields.phpt
ext/mysqli/tests/mysqli_fetch_lengths.phpt
ext/mysqli/tests/mysqli_fetch_object.phpt
ext/mysqli/tests/mysqli_fetch_object_oo.phpt
ext/mysqli/tests/mysqli_fetch_row.phpt
ext/mysqli/tests/mysqli_field_count.phpt
ext/mysqli/tests/mysqli_field_seek.phpt
ext/mysqli/tests/mysqli_field_tell.phpt
ext/mysqli/tests/mysqli_free_result.phpt
ext/mysqli/tests/mysqli_get_charset.phpt
ext/mysqli/tests/mysqli_get_client_stats.phpt
ext/mysqli/tests/mysqli_get_connection_stats.phpt
ext/mysqli/tests/mysqli_get_host_info.phpt
ext/mysqli/tests/mysqli_get_proto_info.phpt
ext/mysqli/tests/mysqli_get_server_info.phpt
ext/mysqli/tests/mysqli_get_server_version.phpt
ext/mysqli/tests/mysqli_info.phpt
ext/mysqli/tests/mysqli_insert_id.phpt
ext/mysqli/tests/mysqli_kill.phpt
ext/mysqli/tests/mysqli_max_links.phpt
ext/mysqli/tests/mysqli_more_results.phpt
ext/mysqli/tests/mysqli_multi_query.phpt
ext/mysqli/tests/mysqli_next_result.phpt
ext/mysqli/tests/mysqli_num_fields.phpt
ext/mysqli/tests/mysqli_num_rows.phpt
ext/mysqli/tests/mysqli_options.phpt
ext/mysqli/tests/mysqli_ping.phpt
ext/mysqli/tests/mysqli_poll.phpt
ext/mysqli/tests/mysqli_prepare.phpt
ext/mysqli/tests/mysqli_query.phpt
ext/mysqli/tests/mysqli_query_unicode.phpt
ext/mysqli/tests/mysqli_real_connect.phpt
ext/mysqli/tests/mysqli_real_escape_string.phpt
ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
ext/mysqli/tests/mysqli_real_query.phpt
ext/mysqli/tests/mysqli_reap_async_query.phpt
ext/mysqli/tests/mysqli_release_savepoint.phpt
ext/mysqli/tests/mysqli_report.phpt
ext/mysqli/tests/mysqli_rollback.phpt
ext/mysqli/tests/mysqli_savepoint.phpt
ext/mysqli/tests/mysqli_select_db.phpt
ext/mysqli/tests/mysqli_set_charset.phpt
ext/mysqli/tests/mysqli_set_opt.phpt
ext/mysqli/tests/mysqli_sqlstate.phpt
ext/mysqli/tests/mysqli_ssl_set.phpt
ext/mysqli/tests/mysqli_stat.phpt
ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
ext/mysqli/tests/mysqli_stmt_attr_get.phpt
ext/mysqli/tests/mysqli_stmt_attr_set.phpt
ext/mysqli/tests/mysqli_stmt_bind_param.phpt
ext/mysqli/tests/mysqli_stmt_bind_result.phpt
ext/mysqli/tests/mysqli_stmt_close.phpt
ext/mysqli/tests/mysqli_stmt_data_seek.phpt
ext/mysqli/tests/mysqli_stmt_errno.phpt
ext/mysqli/tests/mysqli_stmt_error.phpt
ext/mysqli/tests/mysqli_stmt_execute.phpt
ext/mysqli/tests/mysqli_stmt_fetch.phpt
ext/mysqli/tests/mysqli_stmt_field_count.phpt
ext/mysqli/tests/mysqli_stmt_free_result.phpt
ext/mysqli/tests/mysqli_stmt_get_result.phpt
ext/mysqli/tests/mysqli_stmt_get_result2.phpt
ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
ext/mysqli/tests/mysqli_stmt_init.phpt
ext/mysqli/tests/mysqli_stmt_insert_id.phpt
ext/mysqli/tests/mysqli_stmt_num_rows.phpt
ext/mysqli/tests/mysqli_stmt_param_count.phpt
ext/mysqli/tests/mysqli_stmt_prepare.phpt
ext/mysqli/tests/mysqli_stmt_reset.phpt
ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
ext/mysqli/tests/mysqli_stmt_store_result.phpt
ext/mysqli/tests/mysqli_store_result.phpt
ext/mysqli/tests/mysqli_thread_id.phpt
ext/mysqli/tests/mysqli_use_result.phpt
ext/mysqli/tests/mysqli_warning_count.phpt
ext/odbc/tests/odbc_free_result_001.phpt
ext/opcache/tests/bug70207.phpt
ext/openssl/tests/bug38255.phpt
ext/openssl/tests/bug38261.phpt
ext/openssl/tests/openssl_csr_export_bacis.phpt
ext/openssl/tests/openssl_csr_export_to_file_basic.phpt
ext/openssl/tests/openssl_csr_new_basic.phpt
ext/openssl/tests/openssl_csr_sign_basic.phpt
ext/openssl/tests/openssl_decrypt_error.phpt
ext/openssl/tests/openssl_encrypt_error.phpt
ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt
ext/openssl/tests/openssl_pkcs7_read_basic.phpt
ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
ext/openssl/tests/openssl_pkey_new_error.phpt
ext/openssl/tests/openssl_seal_basic.phpt
ext/openssl/tests/openssl_sign_basic.phpt
ext/openssl/tests/openssl_x509_fingerprint_basic.phpt
ext/openssl/tests/openssl_x509_free_basic.phpt
ext/pcntl/tests/pcntl_alarm.phpt
ext/pcntl/tests/pcntl_exec_3.phpt
ext/pcntl/tests/pcntl_signal.phpt
ext/pcntl/tests/pcntl_wait.phpt
ext/pcre/tests/002.phpt
ext/pcre/tests/grep2.phpt
ext/pcre/tests/preg_grep_error1.phpt
ext/pcre/tests/preg_match_all_error1.phpt
ext/pcre/tests/preg_match_all_error2.phpt
ext/pcre/tests/preg_match_error1.phpt
ext/pcre/tests/preg_match_error2.phpt
ext/pcre/tests/preg_replace_callback3.phpt
ext/pcre/tests/preg_replace_callback_array2.phpt
ext/pcre/tests/preg_split_error1.phpt
ext/pcre/tests/split.phpt
ext/pcre/tests/split2.phpt
ext/pdo/tests/bug_44173.phpt
ext/pdo/tests/pdo_drivers_error.phpt [deleted file]
ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt
ext/pgsql/tests/01createdb.phpt
ext/phar/tests/002.phpt
ext/phar/tests/badparameters.phpt
ext/phar/tests/bug64931/bug64931.phpt
ext/phar/tests/create_path_error.phpt
ext/phar/tests/fgc_edgecases.phpt
ext/phar/tests/fopen.phpt
ext/phar/tests/fopen_edgecases2.phpt
ext/phar/tests/open_for_write_existing_b.phpt
ext/phar/tests/open_for_write_existing_c.phpt
ext/phar/tests/open_for_write_newfile_b.phpt
ext/phar/tests/open_for_write_newfile_c.phpt
ext/phar/tests/opendir_edgecases.phpt
ext/phar/tests/phar_bz2.phpt
ext/phar/tests/phar_decompress.phpt
ext/phar/tests/phar_extract.phpt
ext/phar/tests/phar_isvalidpharfilename.phpt
ext/phar/tests/phar_oo_006.phpt
ext/phar/tests/phar_running.phpt
ext/phar/tests/phar_unlinkarchive.phpt
ext/phar/tests/pharfileinfo_chmod.phpt
ext/phar/tests/pharfileinfo_compression.phpt
ext/phar/tests/pharfileinfo_setmetadata.phpt
ext/phar/tests/readfile_edgecases.phpt
ext/phar/tests/stat2_5.3.phpt
ext/phar/tests/tar/open_for_write_existing_b.phpt
ext/phar/tests/tar/open_for_write_existing_c.phpt
ext/phar/tests/tar/open_for_write_newfile_b.phpt
ext/phar/tests/tar/open_for_write_newfile_c.phpt
ext/phar/tests/zip/open_for_write_existing_b.phpt
ext/phar/tests/zip/open_for_write_existing_c.phpt
ext/phar/tests/zip/open_for_write_newfile_b.phpt
ext/phar/tests/zip/open_for_write_newfile_c.phpt
ext/posix/tests/posix_errno_error.phpt [deleted file]
ext/posix/tests/posix_getcwd.phpt
ext/posix/tests/posix_getgrgid_error.phpt
ext/posix/tests/posix_getpgid_error.phpt
ext/posix/tests/posix_getpwuid_error.phpt
ext/posix/tests/posix_getsid_error.phpt
ext/posix/tests/posix_initgroups.phpt
ext/posix/tests/posix_kill_error.phpt
ext/posix/tests/posix_seteuid_variation4.phpt [deleted file]
ext/posix/tests/posix_setgid_variation4.phpt [deleted file]
ext/posix/tests/posix_setuid_variation4.phpt [deleted file]
ext/posix/tests/posix_strerror_error.phpt
ext/posix/tests/posix_ttyname_error_wrongparams.phpt
ext/pspell/tests/002.phpt
ext/readline/tests/libedit_callback_handler_install_001.phpt
ext/readline/tests/readline_add_history_001.phpt
ext/readline/tests/readline_callback_handler_install_001.phpt
ext/readline/tests/readline_clear_history_001.phpt
ext/readline/tests/readline_list_history_001.phpt
ext/reflection/tests/ReflectionClass_constructor_002.phpt
ext/reflection/tests/ReflectionClass_getConstant_error.phpt
ext/reflection/tests/ReflectionClass_getMethod_002.phpt
ext/reflection/tests/ReflectionClass_getParentClass.phpt
ext/reflection/tests/ReflectionClass_getParentClass_001.phpt [deleted file]
ext/reflection/tests/ReflectionClass_getProperty_002.phpt
ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
ext/reflection/tests/ReflectionMethod_006.phpt
ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
ext/reflection/tests/ReflectionMethod_invoke_error1.phpt
ext/reflection/tests/ReflectionObject_getName_basic.phpt
ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
ext/reflection/tests/ReflectionProperty_error.phpt
ext/reflection/tests/ReflectionProperty_export_error.phpt
ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt
ext/reflection/tests/ReflectionProperty_getValue_error.phpt
ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt
ext/reflection/tests/ReflectionProperty_setValue_error.phpt
ext/reflection/tests/request38992.phpt
ext/session/tests/session_cache_limiter_error.phpt
ext/session/tests/session_set_save_handler_class_012.phpt
ext/session/tests/session_set_save_handler_class_013.phpt
ext/session/tests/session_set_save_handler_iface_002.phpt
ext/shmop/tests/002.phpt
ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt [deleted file]
ext/simplexml/tests/bug37565.phpt
ext/soap/tests/bug77088.phpt
ext/soap/tests/bugs/bug31422.phpt
ext/sockets/tests/socket_connect_params.phpt
ext/sockets/tests/socket_create_listen_used.phpt
ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
ext/sockets/tests/socket_create_pair-wrongparams.phpt
ext/sockets/tests/socket_export_stream-2.phpt
ext/sockets/tests/socket_import_stream-2.phpt
ext/sockets/tests/socket_listen-wrongparams.phpt
ext/sockets/tests/socket_read_params.phpt
ext/sockets/tests/socket_select-wrongparams-2.phpt
ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp-win32.phpt
ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt
ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
ext/sockets/tests/socket_strerror.phpt
ext/spl/tests/SplFileInfo_setFileClass_error.phpt
ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
ext/spl/tests/SplFileObject_seek_error_001.phpt
ext/spl/tests/arrayObject_asort_basic1.phpt
ext/spl/tests/arrayObject_count_basic1.phpt
ext/spl/tests/arrayObject_exchangeArray_basic3.phpt
ext/spl/tests/arrayObject_ksort_basic1.phpt
ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
ext/spl/tests/bug46051.phpt
ext/spl/tests/bug65545.phpt
ext/spl/tests/fileobject_005.phpt
ext/spl/tests/iterator_044.phpt
ext/spl/tests/iterator_045.phpt
ext/spl/tests/iterator_count.phpt
ext/spl/tests/iterator_to_array.phpt
ext/spl/tests/regexIterator_setMode_error.phpt
ext/spl/tests/spl_004.phpt
ext/spl/tests/spl_heap_is_empty_basic.phpt
ext/spl/tests/spl_object_id.phpt
ext/sqlite3/tests/sqlite3_33_reset.phpt
ext/sqlite3/tests/sqlite3_enable_exceptions.phpt
ext/standard/tests/array/005.phpt
ext/standard/tests/array/009.phpt
ext/standard/tests/array/array_change_key_case_variation.phpt
ext/standard/tests/array/array_column_error.phpt
ext/standard/tests/array/array_diff_uassoc_error.phpt
ext/standard/tests/array/array_diff_ukey_variation10.phpt
ext/standard/tests/array/array_fill_error.phpt
ext/standard/tests/array/array_fill_keys.phpt
ext/standard/tests/array/array_fill_keys_variation3.phpt
ext/standard/tests/array/array_filter.phpt
ext/standard/tests/array/array_filter_variation10.phpt
ext/standard/tests/array/array_filter_variation9.phpt
ext/standard/tests/array/array_intersect_ukey_variation8.phpt
ext/standard/tests/array/array_key_exists.phpt
ext/standard/tests/array/array_keys_error.phpt
ext/standard/tests/array/array_map_error.phpt
ext/standard/tests/array/array_map_object1.phpt
ext/standard/tests/array/array_map_object2.phpt
ext/standard/tests/array/array_map_object3.phpt
ext/standard/tests/array/array_map_variation12.phpt
ext/standard/tests/array/array_map_variation14.phpt
ext/standard/tests/array/array_map_variation15.phpt
ext/standard/tests/array/array_map_variation16.phpt
ext/standard/tests/array/array_map_variation17.phpt
ext/standard/tests/array/array_merge.phpt
ext/standard/tests/array/array_merge_recursive_error.phpt
ext/standard/tests/array/array_multisort_error.phpt
ext/standard/tests/array/array_pad.phpt
ext/standard/tests/array/array_push.phpt
ext/standard/tests/array/array_rand.phpt
ext/standard/tests/array/array_search1.phpt
ext/standard/tests/array/array_search_variation3.phpt
ext/standard/tests/array/array_slice.phpt
ext/standard/tests/array/array_slice_variation1.phpt
ext/standard/tests/array/array_unshift.phpt
ext/standard/tests/array/array_walk.phpt
ext/standard/tests/array/array_walk_closure.phpt
ext/standard/tests/array/array_walk_error2.phpt
ext/standard/tests/array/array_walk_objects.phpt
ext/standard/tests/array/array_walk_rec_objects.phpt
ext/standard/tests/array/array_walk_recursive1.phpt
ext/standard/tests/array/array_walk_recursive_error2.phpt
ext/standard/tests/array/array_walk_recursive_variation7.phpt
ext/standard/tests/array/array_walk_recursive_variation8.phpt
ext/standard/tests/array/array_walk_variation7.phpt
ext/standard/tests/array/array_walk_variation8.phpt
ext/standard/tests/array/bug35014.phpt
ext/standard/tests/array/bug35014_64bit.phpt
ext/standard/tests/array/bug40191.phpt
ext/standard/tests/array/count_recursive.phpt
ext/standard/tests/array/end.phpt
ext/standard/tests/array/end_64bit.phpt
ext/standard/tests/array/extract_error.phpt
ext/standard/tests/array/in_array_variation3.phpt
ext/standard/tests/array/max.phpt
ext/standard/tests/array/min.phpt
ext/standard/tests/array/range_errors.phpt
ext/standard/tests/array/uasort_variation8.phpt
ext/standard/tests/array/usort_variation8.phpt
ext/standard/tests/assert/assert04.phpt
ext/standard/tests/class_object/property_exists_error.phpt
ext/standard/tests/dir/closedir_error-win32-mb.phpt [deleted file]
ext/standard/tests/dir/scandir_variation3-win32-mb.phpt [deleted file]
ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
ext/standard/tests/directory/DirectoryClass_error_001.phpt
ext/standard/tests/file/005_error.phpt
ext/standard/tests/file/006_error.phpt
ext/standard/tests/file/006_variation2.phpt
ext/standard/tests/file/007_error.phpt [deleted file]
ext/standard/tests/file/basename-win32.phpt
ext/standard/tests/file/basename.phpt
ext/standard/tests/file/bug39863.phpt
ext/standard/tests/file/chmod_error.phpt
ext/standard/tests/file/copy_error.phpt
ext/standard/tests/file/copy_variation4.phpt
ext/standard/tests/file/disk.phpt
ext/standard/tests/file/disk_free_space_error-win32.phpt
ext/standard/tests/file/disk_free_space_error.phpt
ext/standard/tests/file/disk_free_space_variation.phpt
ext/standard/tests/file/disk_total_space_error-win32.phpt
ext/standard/tests/file/disk_total_space_error.phpt
ext/standard/tests/file/disk_total_space_variation.phpt
ext/standard/tests/file/fgetc_variation2.phpt
ext/standard/tests/file/fgets_error.phpt
ext/standard/tests/file/fgets_variation2.phpt
ext/standard/tests/file/file_error.phpt
ext/standard/tests/file/file_get_contents_error.phpt
ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
ext/standard/tests/file/file_get_contents_variation8-win32.phpt
ext/standard/tests/file/file_get_contents_variation8.phpt
ext/standard/tests/file/file_put_contents_variation8-win32.phpt
ext/standard/tests/file/file_put_contents_variation8.phpt
ext/standard/tests/file/filegroup_error.phpt
ext/standard/tests/file/filegroup_variation2.phpt
ext/standard/tests/file/filegroup_variation3.phpt
ext/standard/tests/file/fileinode_error.phpt
ext/standard/tests/file/fileinode_variation2.phpt
ext/standard/tests/file/fileinode_variation3.phpt
ext/standard/tests/file/fileowner_error.phpt
ext/standard/tests/file/fileowner_variation2.phpt
ext/standard/tests/file/fileowner_variation3.phpt
ext/standard/tests/file/fileperms_variation2.phpt
ext/standard/tests/file/fileperms_variation3.phpt
ext/standard/tests/file/filesize_error.phpt
ext/standard/tests/file/filetype_error.phpt
ext/standard/tests/file/flock.phpt
ext/standard/tests/file/flock_error.phpt
ext/standard/tests/file/fnmatch_variation.phpt
ext/standard/tests/file/fread_error.phpt
ext/standard/tests/file/fscanf.phpt
ext/standard/tests/file/fscanf_error.phpt
ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
ext/standard/tests/file/ftruncate_error.phpt
ext/standard/tests/file/fwrite.phpt
ext/standard/tests/file/fwrite_error.phpt
ext/standard/tests/file/get_current_user.phpt
ext/standard/tests/file/glob_variation-win32-mb.phpt
ext/standard/tests/file/glob_variation-win32.phpt
ext/standard/tests/file/glob_variation.phpt
ext/standard/tests/file/is_dir_variation3.phpt
ext/standard/tests/file/is_dir_variation4.phpt
ext/standard/tests/file/is_executable_error.phpt
ext/standard/tests/file/is_executable_variation1.phpt
ext/standard/tests/file/is_executable_variation3.phpt
ext/standard/tests/file/is_file_variation3.phpt
ext/standard/tests/file/is_file_variation4.phpt
ext/standard/tests/file/is_readable_error.phpt
ext/standard/tests/file/is_readable_variation1.phpt
ext/standard/tests/file/is_readable_variation3.phpt
ext/standard/tests/file/is_uploaded_file_basic.phpt
ext/standard/tests/file/is_writable_error.phpt
ext/standard/tests/file/is_writable_variation1.phpt
ext/standard/tests/file/is_writable_variation3.phpt
ext/standard/tests/file/lchown_error.phpt
ext/standard/tests/file/lstat_stat_error.phpt
ext/standard/tests/file/mkdir_rmdir_error.phpt
ext/standard/tests/file/mkdir_rmdir_variation2.phpt
ext/standard/tests/file/move_uploaded_file_basic.phpt
ext/standard/tests/file/parse_ini_file_error.phpt
ext/standard/tests/file/pathinfo_variaton.phpt
ext/standard/tests/file/popen_pclose_error.phpt
ext/standard/tests/file/readfile_error.phpt
ext/standard/tests/file/readfile_variation10-win32.phpt
ext/standard/tests/file/readfile_variation10.phpt
ext/standard/tests/file/readlink_realpath_error.phpt
ext/standard/tests/file/readlink_variation1.phpt
ext/standard/tests/file/realpath_error-win32.phpt [deleted file]
ext/standard/tests/file/rename_variation13-win32.phpt
ext/standard/tests/file/rename_variation13.phpt
ext/standard/tests/file/stat_error-win32.phpt
ext/standard/tests/file/stream_002.phpt
ext/standard/tests/file/stream_rfc2397_002.phpt
ext/standard/tests/file/stream_rfc2397_006.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
ext/standard/tests/file/tempnam_variation3-win32.phpt
ext/standard/tests/file/tempnam_variation3.phpt
ext/standard/tests/file/tempnam_variation7-win32.phpt
ext/standard/tests/file/tempnam_variation7.phpt
ext/standard/tests/file/touch.phpt
ext/standard/tests/file/touch_error.phpt
ext/standard/tests/file/unlink_error-win32-mb.phpt
ext/standard/tests/file/unlink_error-win32.phpt
ext/standard/tests/file/unlink_error.phpt
ext/standard/tests/filters/001.phpt
ext/standard/tests/filters/stream_filter_remove_error.phpt
ext/standard/tests/general_functions/bug41970.phpt
ext/standard/tests/general_functions/callbacks_001.phpt
ext/standard/tests/general_functions/callbacks_002.phpt
ext/standard/tests/general_functions/error_get_last.phpt
ext/standard/tests/general_functions/floatval.phpt
ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
ext/standard/tests/general_functions/get_extension_funcs_error.phpt [deleted file]
ext/standard/tests/general_functions/get_include_path_basic.phpt
ext/standard/tests/general_functions/get_included_files.phpt
ext/standard/tests/general_functions/getrusage.phpt
ext/standard/tests/general_functions/getservbyport_variation1.phpt
ext/standard/tests/general_functions/gettype_settype_error.phpt
ext/standard/tests/general_functions/include_path.phpt
ext/standard/tests/general_functions/intval.phpt
ext/standard/tests/general_functions/is_array.phpt
ext/standard/tests/general_functions/is_bool.phpt
ext/standard/tests/general_functions/is_countable_with_variables.phpt
ext/standard/tests/general_functions/is_float.phpt
ext/standard/tests/general_functions/is_float_64bit.phpt
ext/standard/tests/general_functions/is_int.phpt
ext/standard/tests/general_functions/is_int_64bit.phpt
ext/standard/tests/general_functions/is_null.phpt
ext/standard/tests/general_functions/is_numeric.phpt
ext/standard/tests/general_functions/is_object.phpt
ext/standard/tests/general_functions/is_scalar.phpt
ext/standard/tests/general_functions/is_string.phpt
ext/standard/tests/general_functions/ob_get_flush_error.phpt
ext/standard/tests/general_functions/ob_get_length_basic.phpt
ext/standard/tests/general_functions/parse_ini_file.phpt
ext/standard/tests/general_functions/parse_ini_string_002.phpt
ext/standard/tests/general_functions/php_uname_error.phpt
ext/standard/tests/general_functions/phpcredits.phpt
ext/standard/tests/general_functions/phpcredits2.phpt
ext/standard/tests/general_functions/phpinfo.phpt
ext/standard/tests/general_functions/phpinfo2.phpt
ext/standard/tests/general_functions/print_r.phpt
ext/standard/tests/general_functions/print_r_64bit.phpt
ext/standard/tests/general_functions/rand.phpt
ext/standard/tests/general_functions/sleep_error.phpt
ext/standard/tests/general_functions/strval.phpt
ext/standard/tests/general_functions/sys_getloadavg.phpt
ext/standard/tests/general_functions/usleep_error.phpt
ext/standard/tests/general_functions/var_dump.phpt
ext/standard/tests/general_functions/var_dump_64bit.phpt
ext/standard/tests/general_functions/var_export-locale.phpt
ext/standard/tests/image/image_type_to_extension.phpt
ext/standard/tests/math/acos_variation.phpt
ext/standard/tests/math/acosh_variation.phpt
ext/standard/tests/math/asin_variation.phpt
ext/standard/tests/math/asinh_variation.phpt
ext/standard/tests/math/atan_variation.phpt
ext/standard/tests/math/atanh_variation.phpt
ext/standard/tests/math/base_convert_error.phpt
ext/standard/tests/math/cos_variation.phpt
ext/standard/tests/math/cosh_variation.phpt
ext/standard/tests/math/deg2rad_variation.phpt
ext/standard/tests/math/lcg_value_basic.phpt
ext/standard/tests/math/log10_variation.phpt
ext/standard/tests/math/log_error.phpt
ext/standard/tests/math/rad2deg_variation.phpt
ext/standard/tests/math/sin_variation.phpt
ext/standard/tests/math/sinh_variation.phpt
ext/standard/tests/math/sqrt_variation.phpt
ext/standard/tests/math/tan_variation.phpt
ext/standard/tests/math/tanh_variation.phpt
ext/standard/tests/misc/get_browser_error.phpt
ext/standard/tests/network/fsockopen_error.phpt
ext/standard/tests/network/gethostbyaddr_error.phpt
ext/standard/tests/network/gethostname.phpt
ext/standard/tests/network/getprotobyname_error.phpt
ext/standard/tests/network/getprotobynumber_error.phpt
ext/standard/tests/network/inet.phpt
ext/standard/tests/network/ip.phpt
ext/standard/tests/network/ip_x86_64.phpt
ext/standard/tests/password/password_hash_error.phpt
ext/standard/tests/password/password_needs_rehash_error.phpt
ext/standard/tests/password/password_verify_error.phpt
ext/standard/tests/streams/bug46426.phpt
ext/standard/tests/streams/stream_get_contents_001.phpt
ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
ext/standard/tests/streams/stream_resolve_include_path.phpt
ext/standard/tests/streams/stream_set_chunk_size.phpt
ext/standard/tests/streams/stream_set_timeout_error.phpt
ext/standard/tests/streams/stream_socket_sendto.phpt
ext/standard/tests/strings/addcslashes_001.phpt
ext/standard/tests/strings/bug54322.phpt
ext/standard/tests/strings/chr_error.phpt
ext/standard/tests/strings/chr_ord.phpt
ext/standard/tests/strings/chunk_split_variation5.phpt
ext/standard/tests/strings/chunk_split_variation8.phpt
ext/standard/tests/strings/convert_cyr_string.phpt
ext/standard/tests/strings/convert_cyr_string_error.phpt
ext/standard/tests/strings/crypt.phpt
ext/standard/tests/strings/dirname_error.phpt
ext/standard/tests/strings/explode1.phpt
ext/standard/tests/strings/fprintf_error.phpt
ext/standard/tests/strings/highlight_file.phpt
ext/standard/tests/strings/htmlentities24.phpt
ext/standard/tests/strings/htmlspecialchars.phpt
ext/standard/tests/strings/implode1.phpt
ext/standard/tests/strings/join_error.phpt
ext/standard/tests/strings/lcfirst.phpt
ext/standard/tests/strings/levenshtein.phpt
ext/standard/tests/strings/ltrim.phpt
ext/standard/tests/strings/ltrim_error.phpt
ext/standard/tests/strings/md5_file.phpt
ext/standard/tests/strings/metaphone.phpt
ext/standard/tests/strings/money_format_error.phpt
ext/standard/tests/strings/pathinfo.phpt
ext/standard/tests/strings/php_strip_whitespace.phpt
ext/standard/tests/strings/printf.phpt
ext/standard/tests/strings/printf_64bit.phpt
ext/standard/tests/strings/printf_error.phpt
ext/standard/tests/strings/quoted_printable_encode_001.phpt
ext/standard/tests/strings/rtrim.phpt
ext/standard/tests/strings/rtrim_error.phpt
ext/standard/tests/strings/setlocale_error.phpt
ext/standard/tests/strings/sha1_file.phpt
ext/standard/tests/strings/soundex.phpt
ext/standard/tests/strings/sprintf_error.phpt
ext/standard/tests/strings/sscanf_error.phpt
ext/standard/tests/strings/str_ireplace.phpt
ext/standard/tests/strings/str_pad.phpt
ext/standard/tests/strings/str_repeat.phpt
ext/standard/tests/strings/str_replace.phpt
ext/standard/tests/strings/str_split_variation6.phpt
ext/standard/tests/strings/str_split_variation7.phpt
ext/standard/tests/strings/str_word_count.phpt
ext/standard/tests/strings/strcasecmp.phpt
ext/standard/tests/strings/strcmp.phpt
ext/standard/tests/strings/stripos_error.phpt
ext/standard/tests/strings/stripos_variation10.phpt
ext/standard/tests/strings/stripos_variation11.phpt
ext/standard/tests/strings/stristr.phpt
ext/standard/tests/strings/stristr_error.phpt
ext/standard/tests/strings/stristr_variation2.phpt
ext/standard/tests/strings/strlen.phpt
ext/standard/tests/strings/strncasecmp_error.phpt
ext/standard/tests/strings/strncmp_error.phpt
ext/standard/tests/strings/strpbrk_error.phpt
ext/standard/tests/strings/strpos.phpt
ext/standard/tests/strings/strrchr_variation10.phpt
ext/standard/tests/strings/strrchr_variation11.phpt
ext/standard/tests/strings/strripos.phpt
ext/standard/tests/strings/strripos_offset.phpt
ext/standard/tests/strings/strrpos_offset.phpt
ext/standard/tests/strings/strrpos_variation10.phpt
ext/standard/tests/strings/strrpos_variation11.phpt
ext/standard/tests/strings/strstr.phpt
ext/standard/tests/strings/strtolower-win32.phpt
ext/standard/tests/strings/strtolower.phpt
ext/standard/tests/strings/strtoupper1-win32.phpt
ext/standard/tests/strings/strtoupper1.phpt
ext/standard/tests/strings/strval_error.phpt
ext/standard/tests/strings/substr.phpt
ext/standard/tests/strings/substr_compare.phpt
ext/standard/tests/strings/substr_count_error.phpt
ext/standard/tests/strings/substr_count_variation_001.phpt
ext/standard/tests/strings/substr_replace_error.phpt
ext/standard/tests/strings/trim1.phpt
ext/standard/tests/strings/trim_error.phpt
ext/standard/tests/strings/ucfirst.phpt
ext/standard/tests/strings/unpack_error.phpt
ext/standard/tests/strings/uuencode.phpt
ext/standard/tests/strings/vfprintf_error1.phpt
ext/standard/tests/strings/vfprintf_error4.phpt
ext/standard/tests/strings/vfprintf_variation1.phpt
ext/standard/tests/strings/wordwrap_error.phpt
ext/standard/tests/time/strptime_error.phpt
ext/sysvmsg/tests/005.phpt
ext/sysvshm/tests/001.phpt
ext/sysvshm/tests/002.phpt
ext/sysvshm/tests/003.phpt
ext/sysvshm/tests/004.phpt
ext/sysvshm/tests/005.phpt
ext/sysvshm/tests/006.phpt
ext/sysvshm/tests/007.phpt
ext/tidy/tests/019.phpt
ext/tokenizer/tests/001.phpt
ext/tokenizer/tests/003.phpt
ext/xmlrpc/tests/001.phpt
ext/xmlrpc/tests/002.phpt
ext/xmlwriter/tests/bug41326.phpt
ext/zip/tests/oo_getcomment.phpt
ext/zip/tests/zip_open_error.phpt
ext/zlib/tests/004-mb.phpt
ext/zlib/tests/004.phpt
ext/zlib/tests/005.phpt
ext/zlib/tests/006.phpt
ext/zlib/tests/007.phpt
ext/zlib/tests/gzcompress_error1.phpt
ext/zlib/tests/gzdeflate_error1.phpt
ext/zlib/tests/gzencode_error1.phpt
ext/zlib/tests/gzinflate_error1.phpt
ext/zlib/tests/gzopen_variation4.phpt
ext/zlib/tests/gzuncompress_error1.phpt
ext/zlib/tests/inflate_init_error.phpt
ext/zlib/tests/readgzfile_variation10.phpt [deleted file]
tests/classes/abstract_user_call.phpt
tests/classes/autoload_012.phpt
tests/classes/bug27504.phpt
tests/lang/func_get_arg_variation.phpt
tests/output/ob_014.phpt
tests/output/ob_015.phpt
tests/output/ob_start_error_001.phpt
tests/output/stream_isatty.inc
tests/output/stream_isatty_err.phpt
tests/output/stream_isatty_in-err.phpt
tests/output/stream_isatty_in-out-err.phpt
tests/output/stream_isatty_in-out.phpt
tests/output/stream_isatty_out-err.phpt
tests/output/stream_isatty_out.phpt

index 7bcab0798fc6cb8b15af5d86635983ed308466f0..d36ae80ae897684fbb990609574392e361293127 100644 (file)
@@ -23,8 +23,6 @@ class bar extends foo {
        }
 }
 
-var_dump(property_exists());
-var_dump(property_exists(""));
 var_dump(property_exists("foo","pp1"));
 var_dump(property_exists("foo","pp2"));
 var_dump(property_exists("foo","pp3"));
@@ -53,11 +51,6 @@ $bar->test();
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: property_exists() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: property_exists() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
 bool(true)
 bool(true)
 bool(true)
index 40f68e9794002d92d0f0004a81b78d3b5f5a8608..c238229066f4ec97dc0bc9c009a66ebf789d5fa7 100644 (file)
@@ -6,10 +6,8 @@ class_exists() tests
 class foo {
 }
 
-var_dump(class_exists());
 var_dump(class_exists("qwerty"));
 var_dump(class_exists(""));
-var_dump(class_exists(array()));
 var_dump(class_exists("test", false));
 var_dump(class_exists("foo", false));
 var_dump(class_exists("foo"));
@@ -18,14 +16,9 @@ var_dump(class_exists("stdClass"));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: class_exists() expects at least 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
 bool(false)
 bool(false)
-
-Warning: class_exists() expects parameter 1 to be string, array given in %s on line %d
-NULL
 bool(false)
 bool(true)
 bool(true)
index aec10e53f1b60eb8a795a95190e6c5894652340c..fd8320b5368c9e8d7e4890bdb334fb91c20d0bb9 100644 (file)
@@ -6,10 +6,8 @@ interface_exists() tests
 interface foo {
 }
 
-var_dump(interface_exists());
 var_dump(interface_exists("qwerty"));
 var_dump(interface_exists(""));
-var_dump(interface_exists(array()));
 var_dump(interface_exists("test", false));
 var_dump(interface_exists("foo", false));
 var_dump(interface_exists("foo"));
@@ -18,14 +16,9 @@ var_dump(interface_exists("stdClass"));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: interface_exists() expects at least 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
 bool(false)
 bool(false)
-
-Warning: interface_exists() expects parameter 1 to be string, array given in %s on line %d
-NULL
 bool(false)
 bool(true)
 bool(true)
index 18037a99e34ee74eba5fe4d214d4f12f0a77a916..2a5cca7c4df02bdf19b7d708f474fb55c3e2043a 100644 (file)
@@ -8,13 +8,9 @@ var_dump(get_included_files());
 include(dirname(__FILE__)."/014.inc");
 var_dump(get_included_files());
 
-var_dump(get_included_files(1,1));
-
 include_once(dirname(__FILE__)."/014.inc");
 var_dump(get_included_files());
 
-var_dump(get_included_files(1));
-
 include(dirname(__FILE__)."/014.inc");
 var_dump(get_included_files());
 
@@ -31,18 +27,12 @@ array(2) {
   [1]=>
   string(%d) "%s"
 }
-
-Warning: get_included_files() expects exactly 0 parameters, 2 given in %s on line %d
-NULL
 array(2) {
   [0]=>
   string(%d) "%s"
   [1]=>
   string(%d) "%s"
 }
-
-Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 array(2) {
   [0]=>
   string(%d) "%s"
index ccf5e4ddb09eb20d8af8eeb9c3a3f9447d9b19f4..deea89d14d87acf8f027b3e59a71f07f35ab5d4c 100644 (file)
@@ -3,9 +3,7 @@ trigger_error() tests
 --FILE--
 <?php
 
-var_dump(trigger_error());
 var_dump(trigger_error("error"));
-var_dump(trigger_error(array()));
 var_dump(trigger_error("error", -1));
 var_dump(trigger_error("error", 0));
 var_dump(trigger_error("error", E_USER_WARNING));
@@ -14,15 +12,9 @@ var_dump(trigger_error("error", E_USER_DEPRECATED));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: trigger_error() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Notice: error in %s on line %d
 bool(true)
 
-Warning: trigger_error() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
 Warning: Invalid error type specified in %s on line %d
 bool(false)
 
index ed1b2a38a5a63c7563816b2f988ef8c4ea661900..619365cbce17f095cc02c8b4389e2420ef7dc270 100644 (file)
@@ -3,8 +3,6 @@ builtin functions tests
 --FILE--
 <?php
 
-var_dump(get_resource_type());
-var_dump(get_resource_type(""));
 $fp = fopen(__FILE__, "r");
 var_dump(get_resource_type($fp));
 fclose($fp);
@@ -14,11 +12,9 @@ var_dump(gettype(get_loaded_extensions()));
 var_dump(count(get_loaded_extensions()));
 var_dump(gettype(get_loaded_extensions(true)));
 var_dump(count(get_loaded_extensions(true)));
-var_dump(get_loaded_extensions(true, true));
 
 define("USER_CONSTANT", "test");
 
-var_dump(get_defined_constants(true, true));
 var_dump(gettype(get_defined_constants(true)));
 var_dump(gettype(get_defined_constants()));
 var_dump(count(get_defined_constants()));
@@ -29,11 +25,9 @@ function test () {
 var_dump(gettype(get_defined_functions()));
 var_dump(count(get_defined_functions()));
 
-var_dump(get_declared_interfaces(true));
 var_dump(gettype(get_declared_interfaces()));
 var_dump(count(get_declared_interfaces()));
 
-var_dump(get_extension_funcs());
 var_dump(get_extension_funcs(true));
 var_dump(gettype(get_extension_funcs("standard")));
 var_dump(count(get_extension_funcs("standard")));
@@ -44,36 +38,19 @@ var_dump(count(get_extension_funcs("zend")));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line %d
-NULL
 string(6) "stream"
 string(7) "Unknown"
 string(5) "array"
 int(%d)
 string(5) "array"
 int(%d)
-
-Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
-NULL
 string(5) "array"
 string(5) "array"
 int(%d)
 string(5) "array"
 int(%d)
-
-Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 string(5) "array"
 int(%d)
-
-Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
 bool(false)
 string(5) "array"
 int(%d)
index 5ced729fce1ebe42396f61c9dac9d8177c6e8888..97e53b105008f043efffc8bec45ba85cc48cadc5 100644 (file)
@@ -3,12 +3,8 @@ constant() tests
 --FILE--
 <?php
 
-var_dump(constant());
-var_dump(constant("", ""));
 var_dump(constant(""));
 
-var_dump(constant(array()));
-
 define("TEST_CONST", 1);
 var_dump(constant("TEST_CONST"));
 
@@ -18,17 +14,8 @@ var_dump(constant("TEST_CONST2"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: constant() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: constant() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: constant(): Couldn't find constant  in %s on line %d
 NULL
-
-Warning: constant() expects parameter 1 to be string, array given in %s on line %d
-NULL
 int(1)
 string(4) "test"
 Done
index 1e2bcff387fb8ccf794f64f7860a73d76a057584..efc221cb4fb65e67047092f825b4deabccce061b 100644 (file)
@@ -3,9 +3,7 @@ func_get_arg() invalid usage
 --FILE--
 <?php
 
-var_dump(func_get_arg(1,2,3));
 var_dump(func_get_arg(1));
-var_dump(func_get_arg());
 
 function bar() {
        var_dump(func_get_arg(1));
@@ -20,15 +18,9 @@ foo(1,2);
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: func_get_arg() expects exactly 1 parameter, 3 given in %s on line %d
-NULL
-
 Warning: func_get_arg():  Called from the global scope - no function context in %s on line %d
 bool(false)
 
-Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: func_get_arg():  Argument 1 not passed to function in %s on line %d
 bool(false)
 Done
index c4680a4789e11c5d71f2e1d0016f01d1b9634e9e..9031dec030006c701b2e56913316005edd235176 100644 (file)
@@ -4,11 +4,14 @@ Bug #31720 (Invalid object callbacks not caught in array_walk())
 <?php
 $array = array('at least one element');
 
-array_walk($array, array($nonesuchvar,'show'));
+try {
+    array_walk($array, array($nonesuchvar,'show'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 ===DONE===
 --EXPECTF--
 Notice: Undefined variable: nonesuchvar in %s on line %d
-
-Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
+array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object
 ===DONE===
index 411c2ea072bcbd4a0305d2eabb916ba8705c4906..1c25a86921fdb520ed113f219111a92b26df197d 100644 (file)
@@ -31,10 +31,14 @@ $x->test();
 
 call_user_func(array('BAR','x'));
 call_user_func('BAR::www');
-call_user_func('self::y');
+try {
+    call_user_func('self::y');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
---EXPECTF--
+--EXPECT--
 __call:
 string(3) "ABC"
 __call:
@@ -50,5 +54,4 @@ string(1) "y"
 ok
 __callstatic:
 string(3) "www"
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active in %sbug45186.php on line 31
+call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active
index 7c813a909c6174fbddb91e2c485375abf9f9f325..cb098136a0183d64e06ea94b205a42fa8f5c066d 100644 (file)
@@ -26,11 +26,19 @@ $x = new bar;
 $x->test();
 
 call_user_func(array('BAR','x'));
-call_user_func('BAR::www');
-call_user_func('self::y');
+try {
+    call_user_func('BAR::www');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    call_user_func('self::y');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
---EXPECTF--
+--EXPECT--
 __call:
 string(3) "ABC"
 __call:
@@ -44,7 +52,5 @@ string(1) "y"
 __call:
 string(1) "y"
 ok
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'bar' does not have a method 'www' in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active in %sbug45186_2.php on line 27
+call_user_func() expects parameter 1 to be a valid callback, class 'bar' does not have a method 'www'
+call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active
index f18c25a6c204a462333692b6800065378354fc2f..b0e769e05a01b36faa27f4b61de2a38d1c5f470c 100644 (file)
@@ -15,8 +15,13 @@ function test($x) {
 }
 
 $x = new ReflectionFunction('str_pad');
-test($x);
+try {
+    test($x);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 DONE
 --EXPECT--
+str_pad() expects at least 2 parameters, 1 given
 DONE
index 0834749454db7b65a3edc03afd441df082c66da4..77bdc069c3067b67ebe666ca57ae588b7c19150e 100644 (file)
@@ -16,4 +16,8 @@ register_shutdown_function('exploDe');
 --EXPECTF--
 int(1)
 
-Warning: explode() expects at least 2 parameters, 0 given in Unknown on line %d
+Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 parameters, 0 given in [no active file]:0
+Stack trace:
+#0 [internal function]: explode()
+#1 {main}
+  thrown in [no active file] on line 0
index 896bf00a7b29cf3eb029ee5a86a4bde5f308e013..71ff19a0b54fb8f7a9caec8dcf8e7a4d28a8575b 100644 (file)
@@ -3,13 +3,23 @@ Bug #70895 null ptr deref and segfault with crafted callable
 --FILE--
 <?php
 
-array_map("%n", 0);
-array_map("%n %i", 0);
-array_map("%n %i aoeu %f aoeu %p", 0);
+try {
+    array_map("%n", 0);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    array_map("%n %i", 0);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    array_map("%n %i aoeu %f aoeu %p", 0);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTREGEX--
-Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n' not found or invalid function name in .+
-
-Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n %i' not found or invalid function name in .+
-
-Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name in .+bug70895.php on line \d+
+--EXPECT--
+array_map() expects parameter 1 to be a valid callback, function '%n' not found or invalid function name
+array_map() expects parameter 1 to be a valid callback, function '%n %i' not found or invalid function name
+array_map() expects parameter 1 to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name
index e31ee894bf989be5e454a27f01e206b682d044b7..fa6e96d83f3625d3bd65d5695c71b0f5000aa287 100644 (file)
@@ -2,21 +2,15 @@
 Bug #70895 null ptr deref and segfault with crafted callable
 --FILE--
 <?php
-       function m($f,$a){
-               return array_map($f,0);
-       }
+function m($f,$a){
+    return array_map($f,0);
+}
 
-       echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
+try {
+    echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
-Warning: array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name in %sbug70898.php on line %d
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
-
-Warning: implode(): Argument must be an array in %sbug70898.php on line %d
+--EXPECT--
+array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name
index df4c3b66e43929222509b5e9efb3177fa70feec4..816a5264453608f15fa1296a8bd5ac04499739c4 100644 (file)
@@ -14,5 +14,6 @@ try { (function() { call_user_func("fail"); })(); } catch (Error $e) {}
 try { [new class { static function foo() {} function __destruct () { throw new Error; } }, "foo"](); } catch (Error $e) {}
 
 ?>
---EXPECTF--
-Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
+===DONE===
+--EXPECT--
+===DONE===
index 15d0aec2637cae11ac6b6b77c7afbeccb1b85f7e..a6e43f30605a870d5bf4724d6cafd75876728fa1 100644 (file)
@@ -22,14 +22,20 @@ namespace testing {
        call_user_func(__NAMESPACE__ .'\foobar', 'foobar');
 
        $class =  __NAMESPACE__ .'\foo';
-       call_user_func(array(new $class, 'priv'), 'foobar');
-       call_user_func(array(new $class, 'prot'), 'foobar');
+    try {
+        call_user_func(array(new $class, 'priv'), 'foobar');
+    } catch (\TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
+       try {
+        call_user_func(array(new $class, 'prot'), 'foobar');
+    } catch (\TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 }
 
 ?>
---EXPECTF--
+--EXPECT--
 string(6) "foobar"
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, cannot access private method testing\foo::priv() in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, cannot access protected method testing\foo::prot() in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, cannot access private method testing\foo::priv()
+call_user_func() expects parameter 1 to be a valid callback, cannot access protected method testing\foo::prot()
index 454c6fda9661baeef4f7ad1e166a964e87f2e77d..9d007a8af35a8a09b05a6f3ed4b1932d73929864 100644 (file)
@@ -4,26 +4,38 @@ Testing call_user_func() with autoload and passing invalid params
 <?php
 
 spl_autoload_register(function ($class) {
-       var_dump($class);
+    var_dump($class);
 });
 
-call_user_func(array('foo', 'bar'));
-call_user_func(array('', 'bar'));
-call_user_func(array($foo, 'bar'));
-call_user_func(array($foo, ''));
+try {
+    call_user_func(array('foo', 'bar'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    call_user_func(array('', 'bar'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    call_user_func(array($foo, 'bar'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    call_user_func(array($foo, ''));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 --EXPECTF--
 string(3) "foo"
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'foo' not found in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class '' not found in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, class 'foo' not found
+call_user_func() expects parameter 1 to be a valid callback, class '' not found
 
 Notice: Undefined variable: foo in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
 
 Notice: Undefined variable: foo in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
index ebe04575afbef69834dc77e1bf65691deaba07df..5e5df1d37188fd93cf6c1d4486362cfe7be3e60f 100644 (file)
@@ -12,15 +12,11 @@ var_dump(class_exists(NULL));
 var_dump(class_exists('FOO'));
 var_dump(class_exists('bar'));
 var_dump(class_exists(1));
-var_dump(class_exists(new stdClass));
 
 ?>
---EXPECTF--
+--EXPECT--
 bool(false)
 bool(false)
 bool(true)
 bool(false)
 bool(false)
-
-Warning: class_exists() expects parameter 1 to be string, object given in %s on line %d
-NULL
index 231ab4081cbd7ede7511531fd2477dff26a1cc41..531ecb271a7dfae5a7190a470f52d2fa73735079 100644 (file)
@@ -25,9 +25,6 @@ $ca = $a->getIncrementor();
 $cas = $a->getStaticIncrementor();
 
 $ca->bindTo($a, array());
-$ca->bindTo(array(), 'A');
-$ca->bindTo($a, array(), "");
-$ca->bindTo();
 $cas->bindTo($a, 'A');
 
 ?>
@@ -36,10 +33,4 @@ Notice: Array to string conversion in %s on line %d
 
 Warning: Class 'Array' not found in %s on line %d
 
-Warning: Closure::bindTo() expects parameter 1 to be object, array given in %s on line 25
-
-Warning: Closure::bindTo() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: Closure::bindTo() expects at least 1 parameter, 0 given in %s on line %d
-
 Warning: Cannot bind an instance to a static closure in %s on line %d
index 8b0c7b99233a1842c91641945d9f70f6345395a7..c18c04d8f0059b9ca9081c4f06668e1919b99dde 100644 (file)
@@ -8,7 +8,6 @@ error_reporting(E_ALL);
 function make_exception()
 {
        @$blah;
-       str_replace();
        error_reporting(0);
        throw new Exception();
 }
index 69a4136b0881c7c0b657f6e86f524ec6444148fd..6552141b73c55b242c7116a83ae6f480af835061 100644 (file)
@@ -5,8 +5,6 @@ exception handler tests - 4
 
 set_exception_handler("fo");
 set_exception_handler(array("", ""));
-set_exception_handler();
-set_exception_handler("foo", "bar");
 
 echo "Done\n";
 ?>
@@ -14,8 +12,4 @@ echo "Done\n";
 Warning: set_exception_handler() expects the argument (fo) to be a valid callback in %s on line %d
 
 Warning: set_exception_handler() expects the argument (::) to be a valid callback in %s on line %d
-
-Warning: set_exception_handler() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: set_exception_handler() expects exactly 1 parameter, 2 given in %s on line %d
 Done
index a8ba71c0bfb16b00c9039219b7d1776fa05b4530..5c0770ff65e92391fffbc9e31ff537eba84c3e98 100644 (file)
@@ -2,9 +2,10 @@
 Call internal function with incorrect number of arguments
 --FILE--
 <?php
-substr("foo");
-array_diff([]);
---EXPECTF--
-Warning: substr() expects at least 2 parameters, 1 given in %s
-
-Warning: array_diff(): at least 2 parameters are required, 1 given in %s
+try {
+    substr("foo");
+} catch (ArgumentCountError $e) {
+    echo $e->getMessage(), "\n";
+}
+--EXPECT--
+substr() expects at least 2 parameters, 1 given
index ab20dd20ea1730c4aa74d62799c57d3a586f8227..84e9c6df1e42ec652d52fdc16ce5994c4ca30c69 100644 (file)
@@ -9,13 +9,9 @@ interface foo {
 var_dump(interface_exists('foo'));
 var_dump(interface_exists(1));
 var_dump(interface_exists(NULL));
-var_dump(interface_exists(new stdClass));
 
 ?>
---EXPECTF--
+--EXPECT--
 bool(true)
 bool(false)
 bool(false)
-
-Warning: interface_exists() expects parameter 1 to be string, object given in %s on line %d
-NULL
index 027aa64c2036cc8902edac22b9b4e22c3bdca29e..63884abc79222e6f068313bd4d02aaa131686526 100644 (file)
@@ -2,11 +2,12 @@
 call_user_func() in combination with "Call to a member function method() on a non-object"
 --FILE--
 <?php
-$comparator= null;
-var_dump(call_user_func([$comparator, 'compare'], 1, 2));
-echo "Alive\n";
+$comparator = null;
+try {
+    var_dump(call_user_func([$comparator, 'compare'], 1, 2));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
-Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-Alive
+--EXPECT--
+call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
index 10ce3fa0cba113ba37dae6940009ff124db9d94f..8a7c55d58608dd9756f44e3e67aba07e153ffded 100644 (file)
@@ -9,13 +9,9 @@ trait foo {
 var_dump(trait_exists('foo'));
 var_dump(trait_exists(1));
 var_dump(trait_exists(NULL));
-var_dump(trait_exists(new stdClass));
 
 ?>
---EXPECTF--
+--EXPECT--
 bool(true)
 bool(false)
 bool(false)
-
-Warning: trait_exists() expects parameter 1 to be string, object given in %s on line %d
-NULL
index ba61ee582addf5e6608cbb8527a6ea395c72e65e..c7f66f05a00f2c4b82e7b3ef55ed8dcdbe87af35 100644 (file)
@@ -2,16 +2,17 @@
 Crash when function parameter modified via unexpected reference
 --FILE--
 <?php
-function my_errorhandler($errno,$errormsg) {
-  global $my_var;
-  $my_var = 0;
-  return true;
+class Test {
+    public function __toString() {
+        global $my_var;
+        $my_var = 0;
+        return ",";
+    }
 }
-set_error_handler("my_errorhandler");
 $my_var = str_repeat("A",64);
-$data = call_user_func_array("explode",array(new StdClass(), &$my_var));
+$data = call_user_func_array("explode",array(new Test(), &$my_var));
 $my_var=array(1,2,3);
-$data = call_user_func_array("implode",array(&$my_var, new StdClass()));
+$data = call_user_func_array("implode",array(&$my_var, new Test()));
 echo "Done.\n";
 ?>
 --EXPECT--
index 5a6b2878b8087707dac107b11f864ad3ab85d269..ee1872f0efb97950bdb8af2fbba076a931d95ab1 100644 (file)
@@ -5,7 +5,6 @@ bzopen() and invalid parameters
 --FILE--
 <?php
 
-var_dump(bzopen());
 var_dump(bzopen("", ""));
 var_dump(bzopen("", "r"));
 var_dump(bzopen("", "w"));
@@ -19,9 +18,6 @@ var_dump(bzopen($fp, "r"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: bzopen() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
 Warning: bzopen(): '' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d
 bool(false)
 
index 6454d0d1823a7cc75d86a2c50100f5e67fbea716..13bc85d5e7190ba7ac17c4b214e661576184830c 100644 (file)
@@ -6,8 +6,6 @@ bzread() tests
 <?php
 
 $fd = bzopen(dirname(__FILE__)."/003私はガラスを食べられます.txt.bz2","r");
-var_dump(bzread());
-var_dump(bzread($fd, 1 ,0));
 var_dump(bzread($fd, 0));
 var_dump(bzread($fd, -10));
 var_dump(bzread($fd, 1));
@@ -17,11 +15,6 @@ var_dump(bzread($fd, 100000));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: bzread() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: bzread() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
 string(0) ""
 
 Warning: bzread(): length may not be negative in %s on line %d
index 23b005ac119b6ea466ea2014370824d2969d291a..af1a65e5b2620fe5a64561ca5685556d7fdba694 100644 (file)
@@ -6,8 +6,6 @@ bzread() tests
 <?php
 
 $fd = bzopen(dirname(__FILE__)."/003.txt.bz2","r");
-var_dump(bzread());
-var_dump(bzread($fd, 1 ,0));
 var_dump(bzread($fd, 0));
 var_dump(bzread($fd, -10));
 var_dump(bzread($fd, 1));
@@ -17,11 +15,6 @@ var_dump(bzread($fd, 100000));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: bzread() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: bzread() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
 string(0) ""
 
 Warning: bzread(): length may not be negative in %s on line %d
index da29a6d0b40795aa8a4c44502974a467f0b67628..4241513526a89a09ffdfd0b03d5f396d350745f3 100644 (file)
@@ -10,7 +10,6 @@ Drifting further everyday
 Getting lost within myself
 Nothing matters no one else";
 
-var_dump(bzcompress());
 var_dump(bzcompress(1,1,1));
 var_dump(bzcompress($string, 100));
 var_dump(bzcompress($string, 100, -1));
@@ -23,8 +22,6 @@ $data2 = bzcompress($string, 1, 10);
 $data3 = $data2;
 $data3{3} = 0;
 
-var_dump(bzdecompress());
-var_dump(bzdecompress(1,1,1));
 var_dump(bzdecompress(1,1));
 var_dump(bzdecompress($data3));
 var_dump(bzdecompress($data3,1));
@@ -38,19 +35,11 @@ var_dump(bzdecompress($data2));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: bzcompress() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 string(%d) "BZ%a"
 int(-2)
 int(-2)
 int(-2)
 int(-2)
-
-Warning: bzdecompress() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: bzdecompress() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
 int(-5)
 int(-5)
 int(-5)
index 2ad50a450e24f0d9286c929da2cafc86db494406..c7fa6cc7740382c9a33ae7f0ab4ecea19665e6d2 100644 (file)
@@ -9,7 +9,6 @@ $jd_days = Array(
     2453396,
     2440588,
     -1,
-    array(),
     10000000
     );
 
@@ -52,28 +51,6 @@ string(0) ""
 string(0) ""
 string(0) ""
 
-=== 
-Notice: Array to string conversion in %sjdtomonthname.php on line %d
-Array
-
-Warning: jdmonthname() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: jdmonthname() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: jdmonthname() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: jdmonthname() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: jdmonthname() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: jdmonthname() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
 === 10000000
 string(3) "Dec"
 string(8) "December"
index ab864d4b2da634a25e919ca98e6224fa2be5e431..0a7db7265fc3761e3ccbb7a11083f93f2277adc7 100644 (file)
@@ -9,37 +9,17 @@ Paul Sohier
 <?php
 echo "*** curl_setopt() call with incorrect parameters\n";
 $ch = curl_init();
-curl_setopt();
-curl_setopt(false);
 
-curl_setopt($ch);
-curl_setopt($ch, false);
-curl_setopt($ch, -10);
-curl_setopt($ch, '');
-curl_setopt($ch, 1, false);
+try {
+    curl_setopt($ch, '', false);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
-curl_setopt(false, false, false);
-curl_setopt($ch, '', false);
-curl_setopt($ch, 1, '');
 curl_setopt($ch, -10, 0);
 ?>
 --EXPECTF--
 *** curl_setopt() call with incorrect parameters
-
-Warning: curl_setopt() expects exactly 3 parameters, 0 given in %s on line %d
-
-Warning: curl_setopt() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: curl_setopt() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: curl_setopt() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: curl_setopt() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: curl_setopt() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: curl_setopt() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: curl_setopt() expects parameter 2 to be int, string given in %s on line %d
+curl_setopt() expects parameter 2 to be int, string given
 
 Warning: curl_setopt(): Invalid curl configuration option in %scurl_setopt_error.php on line %d
index e1075ef248c631b26e819077ac1cc7a6918fdff1..23fff3b731ad243bb052dcba9ddcc96fe1f51b52 100644 (file)
@@ -6,9 +6,6 @@ date_default_timezone_set('UTC');
 
 $t = mktime(0,0,0, 6, 27, 2006);
 
-var_dump(idate());
-var_dump(idate(1,1,1));
-
 var_dump(idate(1,1));
 var_dump(idate(""));
 var_dump(idate(0));
@@ -20,12 +17,6 @@ var_dump(idate("'"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: idate() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: idate() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
 Warning: idate(): Unrecognized date format token. in %s on line %d
 bool(false)
 
index 425430a470fb063e41fd48a7bd427189a027cdc1..5171c430e27606c7bed072266aad9046557d6507 100644 (file)
@@ -4,7 +4,6 @@ checkdate() tests
 <?php
 date_default_timezone_set('UTC');
 
-var_dump(checkdate());
 var_dump(checkdate(1,1,1));
 
 var_dump(checkdate(2,29,2006));
@@ -18,9 +17,7 @@ var_dump(checkdate(1,1,-1));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: checkdate() expects exactly 3 parameters, 0 given in %s on line %d
-bool(false)
+--EXPECT--
 bool(true)
 bool(false)
 bool(false)
index 141e2517533b6d227a62717266e03a21760f9fbc..4e0b24ce7505fc2320c06fb3bcc4b7d582c6c46f 100644 (file)
@@ -5,7 +5,6 @@ localtime() tests
 date_default_timezone_set('UTC');
 
 $t = mktime(0,0,0, 6, 27, 2006);
-var_dump(localtime(1,1,1));
 
 var_dump(localtime());
 var_dump(localtime($t));
@@ -15,8 +14,6 @@ var_dump(localtime($t, false));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: localtime() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
 array(9) {
   [0]=>
   int(%d)
index e67b4bd0a4f194a593fa1d6ca1be152d6342540e..701403d1f877180fce31e838967b2e8f811d986a 100644 (file)
@@ -5,7 +5,6 @@ getdate() tests
 date_default_timezone_set('UTC');
 
 $t = mktime(0,0,0, 6, 27, 2006);
-var_dump(getdate(1,1));
 
 var_dump(getdate($t));
 var_dump(getdate());
@@ -13,8 +12,6 @@ var_dump(getdate());
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: getdate() expects at most 1 parameter, 2 given in %s on line %d
-bool(false)
 array(11) {
   ["seconds"]=>
   int(0)
index ae8011eebd2443edf18532bb6fc51e88855f38bb..40d5c5f72b9d73acb0f6fd33a0f8fb0a9ce4a5eb 100644 (file)
@@ -11,16 +11,12 @@ date_default_timezone_set('Asia/Jerusalem');
 
 $t = mktime(0,0,0, 6, 27, 2006);
 
-var_dump(strftime());
-
 var_dump(strftime(""));
 var_dump(strftime("%a %A %b %B %c %C %d %D %e %g %G %h %H %I %j %m %M %n %p %r %R %S %t %T %u %U %V %W %w %x %X %y %Y %Z %z %%", $t));
 var_dump(strftime("%%q %%a", $t));
 var_dump(strftime("%q", $t));
 var_dump(strftime("blah", $t));
 
-var_dump(gmstrftime());
-
 var_dump(gmstrftime(""));
 var_dump(gmstrftime("%a %A %b %B %c %C %d %D %e %g %G %h %H %I %j %m %M %n %p %r %R %S %t %T %u %U %V %W %w %x %X %y %Y %Z %z %%", $t));
 var_dump(gmstrftime("%%q %%a", $t));
@@ -30,17 +26,12 @@ var_dump(gmstrftime("blah", $t));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: strftime() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 string(%d) "Tue Tuesday Jun June Tue Jun 27 00:00:00 2006 %s
 %s %"
 string(5) "%q %a"
 string(%d) "%s"
 string(4) "blah"
-
-Warning: gmstrftime() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 string(%d) "Mon Monday Jun June Mon Jun 26 21:00:00 2006 %s
 %s %"
index 3da5b35c81cab807d0ef6af1e41ec223eb334da9..63ad623b1833494d61f13327c9c26a3b4893e52a 100644 (file)
@@ -15,8 +15,6 @@ setlocale(LC_TIME, "en-us");
 
 $t = mktime(0,0,0, 6, 27, 2006);
 
-var_dump(strftime());
-
 var_dump(strftime(""));
 
 var_dump(strftime("%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y %Z %z %%", $t));
@@ -25,8 +23,6 @@ var_dump(strftime("%%q %%a", $t));
 
 var_dump(strftime("blah", $t));
 
-var_dump(gmstrftime());
-
 var_dump(gmstrftime(""));
 
 var_dump(gmstrftime("%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y %Z %z %%", $t));
@@ -40,15 +36,10 @@ echo "Done\n";
 setlocale(LC_TIME, $loc);
 ?>
 --EXPECTF--
-Warning: strftime() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 string(%d) "Tue Tuesday Jun June 6/27/2006 12:00:00 AM 27 00 12 178 06 00 AM 00 26 26 2 6/27/2006 12:00:00 AM 06 2006 %s"
 string(5) "%q %a"
 string(4) "blah"
-
-Warning: gmstrftime() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 string(%d) "Mon Monday Jun June 6/26/2006 9:00:00 PM 26 21 09 177 06 00 PM 00 26 26 1 6/26/2006 9:00:00 PM 06 2006 %s"
 string(5) "%q %a"
index 092a4b7758ffad2f0c7756d8ef2e2e9c22137664..ca9820c4ef5676191af6d10af0f1fc109f88f6da 100644 (file)
@@ -4,7 +4,6 @@ timezone_name_from_abbr() tests
 <?php
 date_default_timezone_set('UTC');
 
-var_dump(timezone_name_from_abbr());
 var_dump(timezone_name_from_abbr("CET"));
 var_dump(timezone_name_from_abbr("AXST"));
 var_dump(timezone_name_from_abbr("", 3600));
@@ -12,9 +11,7 @@ var_dump(timezone_name_from_abbr("", 3600, 0));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: timezone_name_from_abbr() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
+--EXPECT--
 string(13) "Europe/Berlin"
 bool(false)
 bool(false)
index be7e4e32afaada67489926f15bbbcafab1e7de7f..ee8faf1c002ec9110aa3ee6fcb8f191bfb404931 100644 (file)
@@ -7,15 +7,10 @@ date_default_timezone_set('UTC');
 $dto = date_create("2006-12-12");
 var_dump(date_isodate_set($dto, 2006, 2, 15));
 var_dump($dto->format("Y/m/d H:i:s"));
-var_dump(date_isodate_set($dto, 2006));
-var_dump($dto->format("Y/m/d H:i:s"));
 var_dump(date_isodate_set($dto, 2006, 5));
 var_dump($dto->format("Y/m/d H:i:s"));
 var_dump(date_isodate_set($dto, 2006, 100, 15));
 var_dump($dto->format("Y/m/d H:i:s"));
-var_dump(date_isodate_set($dto, 2006, 100, 15, 10));
-var_dump($dto->format("Y/m/d H:i:s"));
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -28,10 +23,6 @@ object(DateTime)#1 (3) {
   string(3) "UTC"
 }
 string(19) "2006/01/23 00:00:00"
-
-Warning: date_isodate_set() expects at least 3 parameters, 2 given in %s on line %d
-bool(false)
-string(19) "2006/01/23 00:00:00"
 object(DateTime)#1 (3) {
   ["date"]=>
   string(26) "2006-01-30 00:00:00.000000"
@@ -50,8 +41,4 @@ object(DateTime)#1 (3) {
   string(3) "UTC"
 }
 string(19) "2007/12/10 00:00:00"
-
-Warning: date_isodate_set() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-string(19) "2007/12/10 00:00:00"
 Done
index 266dafe06a5beb0b76cb093c08c479a2028a7f66..6010071be6b5d07835dfd1e8f7bd612d535c48ed 100644 (file)
@@ -7,10 +7,6 @@ date_default_timezone_set('UTC');
 $dto = date_create("2006-12-12");
 var_dump($dto);
 var_dump($dto->format("Y.m.d H:i:s"));
-var_dump(date_date_set());
-var_dump($dto->format("Y.m.d H:i:s"));
-var_dump(date_date_set($dto, 2006, 5));
-var_dump($dto->format("Y.m.d H:i:s"));
 var_dump(date_date_set($dto, 2006, 2, 15));
 var_dump($dto->format("Y.m.d H:i:s"));
 var_dump(date_date_set($dto, 2006, 24, 60));
@@ -28,14 +24,6 @@ object(DateTime)#%d (3) {
   string(3) "UTC"
 }
 string(19) "2006.12.12 00:00:00"
-
-Warning: date_date_set() expects exactly 4 parameters, 0 given in %s on line %d
-bool(false)
-string(19) "2006.12.12 00:00:00"
-
-Warning: date_date_set() expects exactly 4 parameters, 3 given in %s on line %d
-bool(false)
-string(19) "2006.12.12 00:00:00"
 object(DateTime)#1 (3) {
   ["date"]=>
   string(26) "2006-02-15 00:00:00.000000"
index 2e72bdabe073e02e736eebd844f89afcd744f429..5c1c061e756e663c5007f14bdf984331a3da7d7a 100644 (file)
@@ -10,7 +10,6 @@ var_dump($dto);
 $dtz = date_timezone_get($dto);
 var_dump($dtz);
 
-var_dump(timezone_offset_get());
 var_dump(timezone_offset_get($dtz, $dto));
 var_dump(timezone_offset_get($dto, $dtz));
 
@@ -32,9 +31,6 @@ object(DateTimeZone)#%d (2) {
   ["timezone"]=>
   string(3) "UTC"
 }
-
-Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
 int(0)
 
 Fatal error: Uncaught TypeError: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d
index 6b1e16ae6713d18715147027d49df3ef45db7b54..1270382158a8a7fa0ab66003b26ece1c44cea55e 100644 (file)
@@ -6,8 +6,12 @@ DateTimeZone::getOffset() accepts a DateTimeInterface object
 $tz = new DateTimeZone('Europe/London');
 $dt = new DateTimeImmutable('2014-09-20', $tz);
 
-echo $tz->getOffset($dt);
-echo $tz->getOffset(1);
---EXPECTF--
+echo $tz->getOffset($dt), "\n";
+try {
+    echo $tz->getOffset(1);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+--EXPECT--
 3600
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s
+DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given
index ac92fb4bb47800af26b4ec52576abf2a81389296..671afc12296e6f5cf516fc0c8fa25434d5c580e5 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Tests for DateTimeImmutable::createFromMutable.
+Tests for DateTimeImmutable::createFromMutable
 --INI--
 date.timezone=Europe/London
 --FILE--
@@ -9,8 +9,11 @@ $current = "2014-03-02 16:24:08";
 $i = DateTimeImmutable::createFromMutable( date_create( $current ) );
 var_dump( $i );
 
-$i = DateTimeImmutable::createFromMutable( date_create_immutable( $current ) );
-var_dump( $i );
+try {
+    DateTimeImmutable::createFromMutable( date_create_immutable( $current ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 --EXPECTF--
 object(DateTimeImmutable)#%d (3) {
@@ -21,6 +24,4 @@ object(DateTimeImmutable)#%d (3) {
   ["timezone"]=>
   string(13) "Europe/London"
 }
-
-Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in %stests%eDateTimeImmutable_createFromMutable.php on line %d
-NULL
+DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given
index ee7731855a6302373f3e1f98785cdc5e0bd8ff00..841a3d4d33be00bdfff74d3a6c5852af13afc674 100644 (file)
@@ -14,8 +14,11 @@ $m->modify('+ 1 hour');
 
 var_dump( $i->format('Y-m-d H:i:s') === $current );
 
-$m = DateTime::createFromImmutable( date_create( $current ) );
-var_dump( $m );
+try {
+    DateTime::createFromImmutable( date_create( $current ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 --EXPECTF--
 object(DateTime)#%d (3) {
@@ -27,6 +30,4 @@ object(DateTime)#%d (3) {
   string(13) "Europe/London"
 }
 bool(true)
-
-Warning: DateTime::createFromImmutable() expects parameter 1 to be DateTimeImmutable, object given in %stests%eDateTime_createFromImmutable.php on line %d
-NULL
+DateTime::createFromImmutable() expects parameter 1 to be DateTimeImmutable, object given
index ab0f3a3c8a7d554a6080bc168e2a92f3f066cf87..691bb4a7e24d7480c7707fea02b6504a48b1212b 100644 (file)
@@ -6,7 +6,11 @@ Bug #36988 (mktime freezes on long numbers)
 <?php
 date_default_timezone_set('GMT');
 $start = microtime(true);
-$a = mktime(1, 1, 1, 1, 1, 11111111111);
+try {
+    $a = mktime(1, 1, 1, 1, 1, 11111111111);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
-Warning: mktime() expects parameter 6 to be int, float given in %s on line %d
+--EXPECT--
+mktime() expects parameter 6 to be int, float given
index cbcccf84b90bd2fccdc87a9cf0b316ed27260e9d..b1f7f25d7bc7b533ffab5ccad730bfbf4d448438 100644 (file)
@@ -13,7 +13,11 @@ var_dump($d->format('Y-m-d H:i:s U'));
 var_dump($d->getTimestamp());
 var_dump($d->format('U'));
 
-$d->setTimestamp(100000000000);
+try {
+    $d->setTimestamp(100000000000);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($d->format('Y-m-d H:i:s U'));
 var_dump($d->getTimestamp());
 
@@ -24,8 +28,7 @@ var_dump($i->format('%s'));
 string(32) "5138-11-16 09:46:40 100000000000"
 bool(false)
 string(12) "100000000000"
-
-Warning: DateTime::setTimestamp() expects parameter 1 to be int, float given in %s on line %d
+DateTime::setTimestamp() expects parameter 1 to be int, float given
 string(32) "5138-11-16 09:46:40 100000000000"
 bool(false)
 string(10) "1215752192"
index f754bf65a1770946b1ad5b8969eb061d0c1b91d8..b480192326b75ca20d03316b7ef20e5256160f75 100644 (file)
@@ -3,8 +3,11 @@ Bug #70245 (strtotime does not emit warning when 2nd parameter is object or stri
 --FILE--
 <?php
 $d = new DateTime('2011-01-15 00:00:00');
-var_dump(strtotime('-1 month', $d));
+try {
+    var_dump(strtotime('-1 month', $d));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 --EXPECTF--
-Warning: strtotime() expects parameter 2 to be int, object given in %sbug70245.php on line %d
-bool(false)
+strtotime() expects parameter 2 to be int, object given
index 15c6aa6fedc6da0b5a84d660a6eb8702dfde9335..24a851ff012b2d5c47eda9cdf1520edaae50dc2f 100644 (file)
@@ -9,13 +9,6 @@ Test date_default_timezone_set() function : error variations
 
 echo "*** Testing date_default_timezone_set() : error variations ***\n";
 
-echo "\n-- Testing date_default_timezone_set() function with less than expected no. of arguments --\n";
-var_dump( date_default_timezone_set() );
-
-echo "\n-- Testing date_default_timezone_set() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( date_default_timezone_set("GMT", $extra_arg) );
-
 echo "\n-- Testing date_default_timezone_set() function with invalid timezone identifier  --\n";
 var_dump( date_default_timezone_set("foo") );
 
@@ -24,16 +17,6 @@ var_dump( date_default_timezone_set("foo") );
 --EXPECTF--
 *** Testing date_default_timezone_set() : error variations ***
 
--- Testing date_default_timezone_set() function with less than expected no. of arguments --
-
-Warning: date_default_timezone_set() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing date_default_timezone_set() function with more than expected no. of arguments --
-
-Warning: date_default_timezone_set() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing date_default_timezone_set() function with invalid timezone identifier  --
 
 Notice: date_default_timezone_set(): Timezone ID 'foo' is invalid in %s on line %d
index b5c5ac0f48feb7f967ebdafabfee80a264326d2b..0d58c1f8e964b24234e716719d6d827fe6b8228c 100644 (file)
@@ -12,7 +12,6 @@ Test basic date_parse()
     var_dump(date_parse("03-03"));
     var_dump(date_parse("0-0"));
     var_dump(date_parse(""));
-    var_dump(date_parse(array()));
     echo "Done\n";
 ?>
 --EXPECTF--
@@ -298,7 +297,4 @@ array(12) {
   ["is_localtime"]=>
   bool(false)
 }
-
-Warning: date_parse() expects parameter 1 to be string, array given in %sdate_parse_001.php on line %d
-bool(false)
 Done
index 9f444bb435056a7b0642741854c3e170ae2b42f4..dc03944004b52a727f7bd41cf04348de35a2d2e0 100644 (file)
@@ -12,14 +12,6 @@ date_default_timezone_set("Europe/London");
 
 echo "*** Testing date_parse() : error conditions ***\n";
 
-echo "\n-- Testing date_parse() function with zero arguments --\n";
-var_dump( date_parse() );
-
-echo "\n-- Testing date_parse() function with more than expected no. of arguments --\n";
-$date = "2009-02-27 10:00:00.5";
-$extra_arg = 10;
-var_dump( date_parse($date, $extra_arg) );
-
 echo "\n-- Testing date_parse() function with unexpected characters in \$date argument --\n";
 $invalid_date = "2OO9-02--27 10:00?00.5";
 var_dump( date_parse($invalid_date) );
@@ -29,16 +21,6 @@ var_dump( date_parse($invalid_date) );
 --EXPECTF--
 *** Testing date_parse() : error conditions ***
 
--- Testing date_parse() function with zero arguments --
-
-Warning: date_parse() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing date_parse() function with more than expected no. of arguments --
-
-Warning: date_parse() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing date_parse() function with unexpected characters in $date argument --
 array(13) {
   ["year"]=>
diff --git a/ext/date/tests/date_sunrise_variation9.phpt b/ext/date/tests/date_sunrise_variation9.phpt
deleted file mode 100644 (file)
index 75794cc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation -  Passing high positive and negative float values to time argument.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
- * Description: Returns time of sunrise for a given day and location
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing date_sunrise() : usage variation ***\n";
-
-// GMT is zero for the timezone
-date_default_timezone_set("Asia/Calcutta");
-//Initialise the variables
-$latitude = 38.4;
-$longitude = -9;
-$zenith = 90;
-$gmt_offset = 1;
-
-echo "\n-- Testing date_sunrise() function by passing float 12.3456789000e10 value to time --\n";
-$time = 12.3456789000e10;
-var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
-
-echo "\n-- Testing date_sunrise() function by passing float -12.3456789000e10 value to time --\n";
-$time = -12.3456789000e10;
-var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
--- Testing date_sunrise() function by passing float 12.3456789000e10 value to time --
-
-Warning: date_sunrise() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
--- Testing date_sunrise() function by passing float -12.3456789000e10 value to time --
-
-Warning: date_sunrise() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation9.phpt b/ext/date/tests/date_sunset_variation9.phpt
deleted file mode 100644 (file)
index 4f897e1..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing high positive and negative float values to time argument.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
- * Description: Returns time of sunset for a given day and location
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing date_sunset() : usage variation ***\n";
-
-// GMT is zero for the timezone
-date_default_timezone_set("Asia/Calcutta");
-//Initialise the variables
-$latitude = 38.4;
-$longitude = -9;
-$zenith = 90;
-$gmt_offset = 1;
-
-echo "\n-- Testing date_sunset() function by passing float 12.3456789000e10 value to time --\n";
-$time = 12.3456789000e10;
-var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
-
-echo "\n-- Testing date_sunset() function by passing float -12.3456789000e10 value to time --\n";
-$time = -12.3456789000e10;
-var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
-var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
--- Testing date_sunset() function by passing float 12.3456789000e10 value to time --
-
-Warning: date_sunset() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
--- Testing date_sunset() function by passing float -12.3456789000e10 value to time --
-
-Warning: date_sunset() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/getdate_variation7.phpt b/ext/date/tests/getdate_variation7.phpt
deleted file mode 100644 (file)
index e24f3e6..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-Test getdate() function : usage variation - Passing high positive and negative float values to timestamp.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : array getdate([int timestamp])
- * Description: Get date/time information
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing getdate() : usage variation ***\n";
-date_default_timezone_set("Asia/Calcutta");
-
-echo "\n-- Testing getdate() function by passing float 12.3456789000e10 value to timestamp --\n";
-$timestamp = 12.3456789000e10;
-var_dump( getdate($timestamp) );
-
-echo "\n-- Testing getdate() function by passing float -12.3456789000e10 value to timestamp --\n";
-$timestamp = -12.3456789000e10;
-var_dump( getdate($timestamp) );
-?>
-===DONE===
---EXPECTF--
-*** Testing getdate() : usage variation ***
-
--- Testing getdate() function by passing float 12.3456789000e10 value to timestamp --
-
-Warning: getdate() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
--- Testing getdate() function by passing float -12.3456789000e10 value to timestamp --
-
-Warning: getdate() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/gmdate_variation14.phpt b/ext/date/tests/gmdate_variation14.phpt
deleted file mode 100644 (file)
index 5b6c48f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-Test gmdate() function : usage variation - Passing high positive and negetive float values to timestamp.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : string gmdate(string format [, long timestamp])
- * Description: Format a GMT date/time
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing gmdate() : usage variation ***\n";
-
-// Initialise all required variables
-date_default_timezone_set('UTC');
-$format = DATE_ISO8601;
-
-echo "\n-- Testing gmdate() function with float 12.3456789000e10 to timestamp --\n";
-$timestamp = 12.3456789000e10;
-var_dump( gmdate($format, $timestamp) );
-
-echo "\n-- Testing gmdate() function with float -12.3456789000e10 to timestamp --\n";
-$timestamp = -12.3456789000e10;
-var_dump( gmdate($format, $timestamp) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmdate() : usage variation ***
-
--- Testing gmdate() function with float 12.3456789000e10 to timestamp --
-
-Warning: gmdate() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Testing gmdate() function with float -12.3456789000e10 to timestamp --
-
-Warning: gmdate() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-===DONE===
index c125e353c4d113b18348a3be1c4d4d62dfb1c715..dca6675e6c267c283bcec567457c2bce1dc5d980 100644 (file)
@@ -21,15 +21,9 @@ $year = 2008;
 // Calling gmmktime() with all possible arguments
 var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
 
-// Calling gmmktime() with mandatory arguments
-var_dump( gmmktime() );
-
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing gmmktime() : basic functionality ***
 int(1218182888)
-
-Warning: gmmktime() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
 ===DONE===
diff --git a/ext/date/tests/idate_variation3.phpt b/ext/date/tests/idate_variation3.phpt
deleted file mode 100644 (file)
index 9b6bc56..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test idate() function : usage variation - Passing higher positive and negetive float values to timestamp.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : int idate(string format [, int timestamp])
- * Description: Format a local time/date as integer
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing idate() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$format = 'Y';
-date_default_timezone_set("Asia/Calcutta");
-
-echo "\n-- Testing idate() function with float 12.3456789000e10 to timestamp --\n";
-$timestamp = 12.3456789000e10;
-var_dump( idate($format, $timestamp) );
-
-echo "\n-- Testing idate() function with float -12.3456789000e10 to timestamp --\n";
-$timestamp = -12.3456789000e10;
-var_dump( idate($format, $timestamp) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing idate() : usage variation ***
-
--- Testing idate() function with float 12.3456789000e10 to timestamp --
-
-Warning: idate() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Testing idate() function with float -12.3456789000e10 to timestamp --
-
-Warning: idate() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/localtime_variation3.phpt b/ext/date/tests/localtime_variation3.phpt
deleted file mode 100644 (file)
index 42731dc..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-Test localtime() function : usage variation - Passing higher positive and negetive float values to timestamp.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : array localtime([int timestamp [, bool associative_array]])
- * Description: Returns the results of the C system call localtime as an associative array
- * if the associative_array argument is set to 1 other wise it is a regular array
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing localtime() : usage variation ***\n";
-
-date_default_timezone_set("UTC");
-// Initialise function arguments not being substituted (if any)
-$is_associative = true;
-
-echo "\n-- Testing localtime() function with 'float 12.3456789000e10' to timestamp --\n";
-$timestamp = 12.3456789000e10;
-var_dump( localtime($timestamp) );
-var_dump( localtime($timestamp, $is_associative) );
-
-echo "\n-- Testing localtime() function with 'float -12.3456789000e10' to timestamp --\n";
-$timestamp = -12.3456789000e10;
-var_dump( localtime($timestamp) );
-var_dump( localtime($timestamp, $is_associative) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing localtime() : usage variation ***
-
--- Testing localtime() function with 'float 12.3456789000e10' to timestamp --
-
-Warning: localtime() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
--- Testing localtime() function with 'float -12.3456789000e10' to timestamp --
-
-Warning: localtime() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-===DONE===
index 699416d3826b9cf10702bf19bf7d1d6783c2d19d..0e4b5d5a359d4b4ecf07ee0578b1ca39ff79c99b 100644 (file)
@@ -7,13 +7,6 @@ Test wrong number of arguments for microtime()
  * Function is implemented in ext/standard/microtime.c
 */
 
-$opt_arg_0 = true;
-$extra_arg = 1;
-
-echo "\n-- Too many arguments --\n";
-var_dump(microtime($opt_arg_0, $extra_arg));
-
-
 echo "\n-- Bad Arg types --\n";
 
 $bad_args = array(null,
@@ -25,17 +18,16 @@ $bad_args = array(null,
 foreach ($bad_args as $bad_arg) {
        echo "\n--> bad arg: ";
        var_dump($bad_arg);
-       var_dump(microtime($bad_arg));
+       try {
+               var_dump(microtime($bad_arg));
+       } catch (TypeError $e) {
+               echo $e->getMessage(), "\n";
+       }
 }
 
 ?>
 ===DONE===
 --EXPECTF--
--- Too many arguments --
-
-Warning: microtime() expects at most 1 parameter, 2 given in %s on line 11
-NULL
-
 -- Bad Arg types --
 
 --> bad arg: NULL
@@ -56,15 +48,11 @@ float(%s)
     int(0)
   }
 }
-
-Warning: microtime() expects parameter 1 to be bool, array given in %s on line 25
-NULL
+microtime() expects parameter 1 to be bool, array given
 
 --> bad arg: object(stdClass)#%d (0) {
 }
-
-Warning: microtime() expects parameter 1 to be bool, object given in %s on line 25
-NULL
+microtime() expects parameter 1 to be bool, object given
 
 --> bad arg: int(1)
 float(%s)
index 02e94a7d4d95d399a7cd2e44d7e835e6633181d7..c507ecf78b1575d01065bc47663b4f7ae7a6bc22 100644 (file)
@@ -14,7 +14,11 @@ date_default_timezone_set("Europe/London");
 echo "*** Testing mktime() : error conditions ***\n";
 
 echo "\n-- Testing mktime() function with Zero arguments --\n";
-var_dump( mktime() );
+try {
+    var_dump( mktime() );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "\n-- Testing mktime() function with more than expected no. of arguments --\n";
 $hour = 10;
@@ -24,7 +28,11 @@ $month = 7;
 $day = 2;
 $year = 1963;
 $extra_arg = 10;
-var_dump( mktime($hour, $minute, $sec, $month, $day, $year, $extra_arg) );
+try {
+    var_dump( mktime($hour, $minute, $sec, $month, $day, $year, $extra_arg) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 ===DONE===
@@ -32,12 +40,8 @@ var_dump( mktime($hour, $minute, $sec, $month, $day, $year, $extra_arg) );
 *** Testing mktime() : error conditions ***
 
 -- Testing mktime() function with Zero arguments --
-
-Warning: mktime() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
+mktime() expects at least 1 parameter, 0 given
 
 -- Testing mktime() function with more than expected no. of arguments --
-
-Warning: mktime() expects at most 6 parameters, 7 given in %s on line %d
-bool(false)
+mktime() expects at most 6 parameters, 7 given
 ===DONE===
diff --git a/ext/date/tests/strftime_variation23.phpt b/ext/date/tests/strftime_variation23.phpt
deleted file mode 100644 (file)
index 22f0797..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-Test strftime() function : usage variation - Checking large positive and negative float values to timestamp.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
---FILE--
-<?php
-/* Prototype  : string strftime(string format [, int timestamp])
- * Description: Format a local time/date according to locale settings
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing strftime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
-date_default_timezone_set("UTC");
-$format = '%b %d %Y %H:%M:%S';
-
-echo "\n-- Testing strftime() function with float 12.3456789000e10 to timestamp --\n";
-$timestamp = 12.3456789000e10;
-var_dump( strftime($format, $timestamp) );
-
-echo "\n-- Testing strftime() function with float -12.3456789000e10 to timestamp --\n";
-$timestamp = -12.3456789000e10;
-var_dump( strftime($format, $timestamp) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strftime() : usage variation ***
-
--- Testing strftime() function with float 12.3456789000e10 to timestamp --
-
-Warning: strftime() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Testing strftime() function with float -12.3456789000e10 to timestamp --
-
-Warning: strftime() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-===DONE===
index 413755ac72bf8211cf318b0616ae2c7b4e178540..f77836c8ef8c9b6ef15c83b7c51636dbcdac6d5b 100644 (file)
@@ -15,31 +15,6 @@ $date = date_create("GMT");
 
 echo "*** Testing timezone_offset_get() : error conditions ***\n";
 
-echo "\n-- Testing timezone_offset_get() function with zero arguments --\n";
-try {
-       var_dump( timezone_offset_get() );
-} catch (Error $ex) {
-       var_dump($ex->getMessage());
-       echo "\n";
-}
-
-echo "\n-- Testing timezone_offset_get() function with less than expected no. of arguments --\n";
-try {
-       var_dump( timezone_offset_get($tz) );
-} catch (Error $ex) {
-       var_dump($ex->getMessage());
-       echo "\n";
-}
-
-echo "\n-- Testing timezone_offset_get() function with more than expected no. of arguments --\n";
-$extra_arg = 99;
-try {
-       var_dump( timezone_offset_get($tz, $date, $extra_arg) );
-} catch (Error $ex) {
-       var_dump($ex->getMessage());
-       echo "\n";
-}
-
 echo "\n-- Testing timezone_offset_get() function with an invalid values for \$object argument --\n";
 $invalid_obj = new stdClass();
 try {
@@ -90,21 +65,6 @@ try {
 --EXPECTF--
 *** Testing timezone_offset_get() : error conditions ***
 
--- Testing timezone_offset_get() function with zero arguments --
-
-Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
--- Testing timezone_offset_get() function with less than expected no. of arguments --
-
-Warning: timezone_offset_get() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-
--- Testing timezone_offset_get() function with more than expected no. of arguments --
-
-Warning: timezone_offset_get() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-
 -- Testing timezone_offset_get() function with an invalid values for $object argument --
 string(%d) "Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of stdClass given"
 
index 0891a30f4823e6f139b119814fd2840a967262a7..1642587a4331b2fea7ad1a1ebaef249abd576098 100644 (file)
@@ -9,7 +9,6 @@ die("info $HND handler used");
 <?php
 require_once(dirname(__FILE__) .'/test.inc');
 echo "database handler: $handler\n";
-var_dump(dba_open($db_file));
 var_dump(dba_open($db_file, 'n'));
 var_dump(dba_open($db_file, 'n', 'bogus'));
 var_dump(dba_open($db_file, 'q', $handler));
@@ -22,9 +21,6 @@ require(dirname(__FILE__) .'/clean.inc');
 ?>
 --EXPECTF--
 database handler: flatfile
-
-Warning: Wrong parameter count for dba_open() in %sdba011.php on line %d
-NULL
 resource(%d) of type (dba)
 
 Warning: dba_open(%stest0.dbm,n): No such handler: bogus in %sdba011.php on line %d
index 41c23b5cf6f82f0f9c84ac9019570b5fd3e376ee..3c9d1745147f78d5047d2664003bc1fc6d1440ff 100644 (file)
@@ -35,13 +35,9 @@ check(dba_handlers(null));
 
 echo "Test 3\n";
 
-check(dba_handlers(1, 2));
-
-echo "Test 4\n";
-
 check(dba_handlers(0));
 
-echo "Test 5 - full info\n";
+echo "Test 4 - full info\n";
 $h = dba_handlers(1);
 foreach ($h as $key => $val) {
     if ($key === "flatfile") {
@@ -61,9 +57,6 @@ Success: flatfile enabled
 Test 2
 Success: flatfile enabled
 Test 3
-
-Warning: dba_handlers() expects at most 1 parameter, 2 given in %sdba_handlers.php on line %d
-Test 4
 Success: flatfile enabled
-Test 5 - full info
+Test 4 - full info
 Success: flatfile enabled
index 6347d4983ca3041774aad7db303e67a3b4abda5d..21e135de81b01c7a0e5b7a9ddae1e75c1ce5b8b7 100644 (file)
@@ -23,8 +23,6 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
         echo dba_exists("key$i", $db_file) ? "Y" : "N";
     }
     echo "\n";
-    var_dump(dba_optimize());
-    var_dump(dba_optimize(""));
     var_dump(dba_optimize($db_file));
     dba_close($db_file);
 } else {
@@ -41,11 +39,5 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
 --EXPECTF--
 database handler: flatfile
 2YY
-
-Warning: dba_optimize() expects exactly 1 parameter, 0 given in %sdba_optimize.php on line %d
-NULL
-
-Warning: dba_optimize() expects parameter 1 to be resource, string given in %sdba_optimize.php on line %d
-NULL
 bool(true)
 ===DONE===
index 0989f09feb9d6fdda5fe9cffddcadc334c126a56..1f660daf096f1503864d3e702b927d2f744d6083 100644 (file)
@@ -7,7 +7,6 @@ DBA Split Test
 ?>
 --FILE--
 <?php
-var_dump(dba_key_split("key1", "name"));
 var_dump(dba_key_split(1));
 var_dump(dba_key_split(null));
 var_dump(dba_key_split(""));
@@ -23,8 +22,6 @@ var_dump(dba_key_split("[key1]name1"));
 ===DONE===
 <?php exit(0); ?>
 --EXPECTF--
-Warning: Wrong parameter count for dba_key_split() in %sdba_split.php on line %d
-NULL
 array(2) {
   [0]=>
   string(0) ""
index 0e64ea2905c1c801c3434021fc5d312fed679135..5b2ae5bb764702e865adb390fd3f0052ee4b12f5 100644 (file)
@@ -23,8 +23,6 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
         echo dba_exists("key$i", $db_file) ? "Y" : "N";
     }
     echo "\n";
-    var_dump(dba_sync());
-    var_dump(dba_sync(""));
     var_dump(dba_sync($db_file));
     dba_close($db_file);
 } else {
@@ -41,11 +39,5 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
 --EXPECTF--
 database handler: flatfile
 2YY
-
-Warning: dba_sync() expects exactly 1 parameter, 0 given in %sdba_sync.php on line %d
-NULL
-
-Warning: dba_sync() expects parameter 1 to be resource, string given in %sdba_sync.php on line %d
-NULL
 bool(true)
 ===DONE===
index 3627ad969d812b77919974536a45fe25f94765f9..2098b2d2735f3a0dd2e2dbbacf014ef33c2c78c2 100644 (file)
@@ -12,13 +12,6 @@ Test exif_imagetype() function : error conditions
 
 echo "*** Testing exif_imagetype() : error conditions ***\n";
 
-echo "\n-- Testing exif_imagetype() function with no arguments --\n";
-var_dump( exif_imagetype() );
-
-echo "\n-- Testing exif_imagetype() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( exif_imagetype(dirname(__FILE__).'/test2.jpg', $extra_arg) );
-
 echo "\n-- Testing exif_imagetype() function with an unknown file  --\n";
 var_dump( exif_imagetype(dirname(__FILE__).'/foo.jpg') );
 
@@ -28,16 +21,6 @@ var_dump( exif_imagetype(dirname(__FILE__).'/foo.jpg') );
 --EXPECTF--
 *** Testing exif_imagetype() : error conditions ***
 
--- Testing exif_imagetype() function with no arguments --
-
-Warning: exif_imagetype() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing exif_imagetype() function with more than expected no. of arguments --
-
-Warning: exif_imagetype() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 -- Testing exif_imagetype() function with an unknown file  --
 
 Warning: exif_imagetype(%s/foo.jpg): failed to open stream: No such file or directory in %s on line %d
index 60af049f4fd7a7b8c80a788ba08531df6e4a033a..1f56b679f87afeca12953220602af90c89f1b154 100644 (file)
@@ -9,11 +9,8 @@ USE_ZEND_ALLOC=0
 --FILE--
 <?php
        $finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527私はガラスを食べられます.magic");
-       $info = finfo_file($finfo, __FILE__);
-       var_dump($info);
+    var_dump($finfo);
 ?>
 --EXPECTF--
 Warning: finfo_open(): Failed to load magic database at '%sbug71527私はガラスを食べられます.magic'. in %sbug71527-mb.php on line %d
-
-Warning: finfo_file() expects parameter 1 to be resource, bool given in %sbug71527-mb.php on line %d
 bool(false)
index 1feb29dd736b7af3b66555eea873c1a611aef2b4..a670a79b51e5883e48de4fbf35d616e8580617b8 100644 (file)
@@ -9,11 +9,8 @@ USE_ZEND_ALLOC=0
 --FILE--
 <?php
        $finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527.magic");
-       $info = finfo_file($finfo, __FILE__);
-       var_dump($info);
+    var_dump($finfo);
 ?>
 --EXPECTF--
 Warning: finfo_open(): Failed to load magic database at '%sbug71527.magic'. in %sbug71527.php on line %d
-
-Warning: finfo_file() expects parameter 1 to be resource, bool given in %sbug71527.php on line %d
 bool(false)
index 374787aa55de6f49471e631507d4b58a41e2f3f8..acd26896f0fd541d345cc1ca48ffaebbed4afc41 100644 (file)
@@ -12,17 +12,8 @@ Test finfo_close() function : error conditions
 
 echo "*** Testing finfo_close() : error conditions ***\n";
 
-$magicFile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'magic';
-$finfo = finfo_open( FILEINFO_MIME, $magicFile );
-$fp = fopen( __FILE__, 'r' );
-
-echo "\n-- Testing finfo_close() function with Zero arguments --\n";
-var_dump( finfo_close() );
-
-echo "\n-- Testing finfo_close() function with more than expected no. of arguments --\n";
-var_dump( finfo_close( $finfo, '10') );
-
 echo "\n-- Testing finfo_close() function with wrong resource type --\n";
+$fp = fopen( __FILE__, 'r' );
 var_dump( finfo_close( $fp ) );
 
 ?>
@@ -30,16 +21,6 @@ var_dump( finfo_close( $fp ) );
 --EXPECTF--
 *** Testing finfo_close() : error conditions ***
 
--- Testing finfo_close() function with Zero arguments --
-
-Warning: finfo_close() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing finfo_close() function with more than expected no. of arguments --
-
-Warning: finfo_close() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing finfo_close() function with wrong resource type --
 
 Warning: finfo_close(): supplied resource is not a valid file_info resource in %s on line %d
index 17935c367602be78391435246da52d38ae2a02df..98901f3a8efc86025de61898438bea8564d1295d 100644 (file)
@@ -5,7 +5,12 @@ finfo_open(): Testing magic_file names
 --FILE--
 <?php
 
-var_dump(finfo_open(FILEINFO_MIME, "\0"));
+try {
+    var_dump(finfo_open(FILEINFO_MIME, "\0"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+
 var_dump(finfo_open(FILEINFO_MIME, NULL));
 var_dump(finfo_open(FILEINFO_MIME, ''));
 var_dump(finfo_open(FILEINFO_MIME, 123));
@@ -14,8 +19,7 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent'));
 
 ?>
 --EXPECTF--
-Warning: finfo_open() expects parameter 2 to be a valid path, string given in %s on line %d
-bool(false)
+finfo_open() expects parameter 2 to be a valid path, string given
 resource(%d) of type (file_info)
 resource(%d) of type (file_info)
 
index 6a0ef96a4e49b8ff4b2a90eeb887b15c3f23d459..60fcbce9c2fb69fae269e8f88e9606b87be50208 100644 (file)
@@ -15,10 +15,13 @@ $magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
 echo "*** Testing finfo_open() : error functionality ***\n";
 
 var_dump( finfo_open( FILEINFO_MIME, 'foobarfile' ) );
-var_dump( finfo_open( array(), $magicFile ) );
-var_dump( finfo_open( FILEINFO_MIME, $magicFile, 'extraArg' ) );
 var_dump( finfo_open( PHP_INT_MAX - 1, $magicFile ) );
-var_dump( finfo_open( 'foobar' ) );
+
+try {
+    var_dump( finfo_open( 'foobar' ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 try {
     var_dump( new finfo('foobar') );
@@ -31,23 +34,15 @@ try {
 --EXPECTF--
 *** Testing finfo_open() : error functionality ***
 
-Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error.php on line 12
+Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error.php on line %d
 
-Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error.php on line 12
+Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error.php on line %d
 
-Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error.php on line 12
+Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error.php on line %d
 bool(false)
 
-Warning: finfo_open() expects parameter 1 to be int, array given in %sfinfo_open_error.php on line 13
-bool(false)
-
-Warning: finfo_open() expects at most 2 parameters, 3 given in %sfinfo_open_error.php on line 14
-bool(false)
-
-Notice: finfo_open(): Warning: using regular magic file `%smagic' in %sfinfo_open_error.php on line 15
+Notice: finfo_open(): Warning: using regular magic file `%smagic' in %sfinfo_open_error.php on line %d
 resource(6) of type (file_info)
-
-Warning: finfo_open() expects parameter 1 to be int, string given in %sfinfo_open_error.php on line 16
-bool(false)
+finfo_open() expects parameter 1 to be int, string given
 finfo::__construct() expects parameter 1 to be int, string given
 ===DONE===
index 615afd40f8e16ba6ab9235c5a9d76e5cbde9f599..2641e7eb113583d5b69546eecf2b7d98e77989d0 100644 (file)
@@ -17,14 +17,12 @@ echo "*** Testing finfo_set_flags() : basic functionality ***\n";
 
 var_dump( finfo_set_flags( $finfo, FILEINFO_NONE ) );
 var_dump( finfo_set_flags( $finfo, FILEINFO_SYMLINK ) );
-var_dump( finfo_set_flags() );
 
 finfo_close( $finfo );
 
 // OO way
 $finfo = new finfo( FILEINFO_NONE, $magicFile );
 var_dump( $finfo->set_flags( FILEINFO_MIME ) );
-var_dump( $finfo->set_flags() );
 
 ?>
 ===DONE===
@@ -32,11 +30,5 @@ var_dump( $finfo->set_flags() );
 *** Testing finfo_set_flags() : basic functionality ***
 bool(true)
 bool(true)
-
-Warning: finfo_set_flags() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
 bool(true)
-
-Warning: finfo::set_flags() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
 ===DONE===
index 3b7168a6845c3e4ff77095d05848fa1aa46f2c50..12748c385f46dc451c59f422f915486a7d22baf0 100644 (file)
@@ -17,14 +17,12 @@ echo "*** Testing finfo_set_flags() : basic functionality ***\n";
 
 var_dump( finfo_set_flags( $finfo, FILEINFO_NONE ) );
 var_dump( finfo_set_flags( $finfo, FILEINFO_SYMLINK ) );
-var_dump( finfo_set_flags() );
 
 finfo_close( $finfo );
 
 // OO way
 $finfo = new finfo( FILEINFO_NONE, $magicFile );
 var_dump( $finfo->set_flags( FILEINFO_MIME ) );
-var_dump( $finfo->set_flags() );
 
 ?>
 ===DONE===
@@ -32,11 +30,5 @@ var_dump( $finfo->set_flags() );
 *** Testing finfo_set_flags() : basic functionality ***
 bool(true)
 bool(true)
-
-Warning: finfo_set_flags() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
 bool(true)
-
-Warning: finfo::set_flags() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
 ===DONE===
index 87f9a77a1208546a70a804fcb347f6ca341c0230..dc966b8cc9a210b41b15c9ddce70b3344aefabcc 100644 (file)
@@ -14,20 +14,12 @@ var_dump(filter_has_var(INPUT_GET, "abc"));
 var_dump(filter_has_var(INPUT_GET, "nonex"));
 var_dump(filter_has_var(INPUT_GET, " "));
 var_dump(filter_has_var(INPUT_GET, ""));
-var_dump(filter_has_var(INPUT_GET, array()));
 
 var_dump(filter_has_var(INPUT_POST, "b"));
 var_dump(filter_has_var(INPUT_POST, "bbc"));
 var_dump(filter_has_var(INPUT_POST, "nonex"));
 var_dump(filter_has_var(INPUT_POST, " "));
 var_dump(filter_has_var(INPUT_POST, ""));
-var_dump(filter_has_var(INPUT_POST, array()));
-
-var_dump(filter_has_var(-1, ""));
-var_dump(filter_has_var("", ""));
-var_dump(filter_has_var(array(), array()));
-var_dump(filter_has_var(array(), ""));
-var_dump(filter_has_var("", array()));
 
 echo "Done\n";
 ?>
@@ -37,28 +29,9 @@ bool(true)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: filter_has_var() expects parameter 2 to be string, array given in %s007.php on line %d
-bool(false)
 bool(true)
 bool(true)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: filter_has_var() expects parameter 2 to be string, array given in %s007.php on line %d
-bool(false)
-bool(false)
-
-Warning: filter_has_var() expects parameter 1 to be int, string given in %s007.php on line %d
-bool(false)
-
-Warning: filter_has_var() expects parameter 1 to be int, array given in %s007.php on line %d
-bool(false)
-
-Warning: filter_has_var() expects parameter 1 to be int, array given in %s007.php on line %d
-bool(false)
-
-Warning: filter_has_var() expects parameter 1 to be int, string given in %s007.php on line %d
-bool(false)
 Done
index a3cb7172ff5339a3aef00f10c9445c6f71689aac..b34c977425f6a419173759bdba0743123022996e 100644 (file)
@@ -6,7 +6,6 @@ filter_list()
 <?php
 
 var_dump(filter_list());
-var_dump(filter_list(array()));
 
 echo "Done\n";
 ?>
@@ -57,7 +56,4 @@ array(22) {
   [21]=>
   string(8) "callback"
 }
-
-Warning: filter_list() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 Done
index 5c38e5603a8ce5f3c535a7beeac8bc39af2ada6c..f456dc6dc1750a7bb9171852c7b7b56216b50e2a 100644 (file)
@@ -10,23 +10,15 @@ var_dump(filter_id("string"));
 var_dump(filter_id("url"));
 var_dump(filter_id("int"));
 var_dump(filter_id("none"));
-var_dump(filter_id(array()));
 var_dump(filter_id(-1));
-var_dump(filter_id(0,0,0));
 
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 int(513)
 int(513)
 int(518)
 int(257)
 bool(false)
-
-Warning: filter_id() expects parameter 1 to be string, array given in %s on line %d
-NULL
 bool(false)
-
-Warning: filter_id() expects exactly 1 parameter, 3 given in %s on line %d
-NULL
 Done
index 3e71d331bd6b047e8d3e352d9a9df2d0da4b7c49..14f8db01af8a5b7c3c84b50b7895d53396feb0e8 100644 (file)
@@ -9,7 +9,6 @@ precision=14
 
 var_dump(filter_var(array(1,"1","", "-23234", "text", "asdf234asdfgs", array()), FILTER_VALIDATE_INT, FILTER_REQUIRE_ARRAY));
 var_dump(filter_var(array(1.2,"1.7","", "-23234.123", "text", "asdf234.2asdfgs", array()), FILTER_VALIDATE_FLOAT, FILTER_REQUIRE_ARRAY));
-var_dump(filter_var(1, array()));
 var_dump(filter_var(1, FILTER_SANITIZE_STRING, 1));
 var_dump(filter_var(1, FILTER_SANITIZE_STRING, 0));
 var_dump(filter_var(1, FILTER_SANITIZE_STRING, array()));
@@ -53,9 +52,6 @@ array(7) {
   array(0) {
   }
 }
-
-Warning: filter_var() expects parameter 2 to be int, array given in %s on line %d
-NULL
 string(1) "1"
 string(1) "1"
 string(1) "1"
index b5075d182128c4063de15082accec38531959cf1..1b2a2ec3574ca588254e98c65d95bcecf2cdba5f 100644 (file)
@@ -20,12 +20,6 @@ var_dump(filter_input(INPUT_POST, "d", FILTER_VALIDATE_FLOAT));
 var_dump(filter_input(INPUT_POST, "c", FILTER_SANITIZE_SPECIAL_CHARS));
 var_dump(filter_input(INPUT_POST, "d", FILTER_VALIDATE_INT));
 
-var_dump(filter_var(new stdClass, "d"));
-
-var_dump(filter_input(INPUT_POST, "c", "", ""));
-var_dump(filter_var("", "", "", "", ""));
-var_dump(filter_var(0, 0, 0, 0, 0));
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -39,16 +33,4 @@ string(6) "string"
 float(12345.7)
 string(29) "&#60;p&#62;string&#60;/p&#62;"
 bool(false)
-
-Warning: filter_var() expects parameter 2 to be int, string given in %s011.php on line %d
-NULL
-
-Warning: filter_input() expects parameter 3 to be int, string given in %s011.php on line %d
-NULL
-
-Warning: filter_var() expects at most 3 parameters, 5 given in %s011.php on line %d
-NULL
-
-Warning: filter_var() expects at most 3 parameters, 5 given in %s011.php on line %d
-NULL
 Done
index 501414deee7c3de9bd8d42451e9b0e8b23fa4453..bdd090ae86f8e0f894c2e762589802254bf39c73 100644 (file)
@@ -6,7 +6,6 @@ filter_var_array() and different arguments
 <?php
 
 echo "-- (1)\n";
-var_dump(filter_var_array(NULL));
 var_dump(filter_var_array(array()));
 var_dump(filter_var_array(array(1,"blah"=>"hoho")));
 var_dump(filter_var_array(array(), -1));
@@ -51,9 +50,6 @@ echo "Done\n";
 ?>
 --EXPECTF--
 -- (1)
-
-Warning: filter_var_array() expects parameter 1 to be array, null given in %s on line %d
-NULL
 array(0) {
 }
 array(2) {
index d77b33135e8da695dcfd47adbf567465a082d70c..2ef6839405b80ab3785a330ea42ed1d4385fa946 100644 (file)
@@ -9,9 +9,7 @@ ap[]=1&bp=test&cp=
 --FILE--
 <?php
 
-var_dump(filter_has_var());
 var_dump(filter_has_var(INPUT_GET,""));
-var_dump(filter_has_var(INPUT_GET,array()));
 var_dump(filter_has_var(INPUT_POST, "ap"));
 var_dump(filter_has_var(INPUT_POST, "cp"));
 var_dump(filter_has_var(INPUT_GET, "a"));
@@ -20,16 +18,10 @@ var_dump(filter_has_var(INPUT_GET, "abc"));
 var_dump(filter_has_var(INPUT_GET, "cc"));
 var_dump(filter_has_var(-1, "cc"));
 var_dump(filter_has_var(0, "cc"));
-var_dump(filter_has_var("", "cc"));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: filter_has_var() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-bool(false)
-
-Warning: filter_has_var() expects parameter 2 to be string, array given in %s on line %d
+--EXPECT--
 bool(false)
 bool(true)
 bool(true)
@@ -39,7 +31,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: filter_has_var() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
 Done
index 3fcf272e3b1cc156efd9de22fce6fbc0226a57f8..b95c12c518d380d112bb7b1e95f7bfcbfa486395 100644 (file)
@@ -8,68 +8,22 @@ require 'skipif.inc';
 <?php
 require 'server.inc';
 
+// Negative timeout
+var_dump(ftp_connect('127.0.0.1', 0, -3));
+
 $ftp = ftp_connect('127.0.0.1', $port);
 if (!$ftp) die("Couldn't connect to the server");
 
 var_dump(ftp_login($ftp, 'user', 'pass'));
-
-var_dump(ftp_systype($ftp));
-
-/* some bogus usage */
-var_dump(ftp_alloc($ftp, array()));
-var_dump(ftp_cdup($ftp, 0));
-var_dump(ftp_chdir($ftp, array()));
-var_dump(ftp_chmod($ftp, 0666));
-var_dump(ftp_close());
-var_dump(ftp_connect('sfjkfjaksfjkasjf'));
-var_dump(ftp_delete($ftp, array()));
-var_dump(ftp_exec($ftp, array()));
-
-var_dump(ftp_systype($ftp, 0));
-var_dump(ftp_pwd($ftp, array()));
-
-var_dump(ftp_login($ftp));
 var_dump(ftp_login($ftp, 'user', 'bogus'));
 
 var_dump(ftp_quit($ftp));
 ?>
 --EXPECTF--
-bool(true)
-string(4) "UNIX"
-
-Warning: ftp_alloc() expects parameter 2 to be int, array given in %s004.php on line 12
-bool(false)
-
-Warning: ftp_cdup() expects exactly 1 parameter, 2 given in %s004.php on line 13
-NULL
-
-Warning: ftp_chdir() expects parameter 2 to be string, array given in %s004.php on line 14
-NULL
-
-Warning: ftp_chmod() expects exactly 3 parameters, 2 given in %s on line %d
+Warning: ftp_connect(): Timeout has to be greater than 0 in %s on line %d
 bool(false)
+bool(true)
 
-Warning: ftp_close() expects exactly 1 parameter, 0 given in %s004.php on line 16
-NULL
-
-Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed: %s in %s004.php on line 17
-bool(false)
-
-Warning: ftp_delete() expects parameter 2 to be string, array given in %s004.php on line 18
-NULL
-
-Warning: ftp_exec() expects parameter 2 to be string, array given in %s004.php on line 19
-NULL
-
-Warning: ftp_systype() expects exactly 1 parameter, 2 given in %s004.php on line 21
-NULL
-
-Warning: ftp_pwd() expects exactly 1 parameter, 2 given in %s004.php on line 22
-NULL
-
-Warning: ftp_login() expects exactly 3 parameters, 1 given in %s004.php on line 24
-NULL
-
-Warning: ftp_login(): Not logged in. in %s004.php on line 25
+Warning: ftp_login(): Not logged in. in %s on line %d
 bool(false)
 bool(true)
diff --git a/ext/ftp/tests/006.phpt b/ext/ftp/tests/006.phpt
deleted file mode 100644 (file)
index ff0d258..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
---TEST--
-FTP with bogus parameters
---SKIPIF--
-<?php
-require 'skipif.inc';
-?>
---FILE--
-<?php
-$ftp=null;
-
-var_dump(ftp_connect(array()));
-var_dump(ftp_connect('127.0.0.1', 0, -3));
-var_dump(ftp_raw($ftp));
-var_dump(ftp_mkdir($ftp));
-var_dump(ftp_rmdir($ftp));
-var_dump(ftp_nlist($ftp));
-var_dump(ftp_rawlist($ftp));
-var_dump(ftp_fget($ftp));
-var_dump(ftp_nb_fget($ftp));
-var_dump(ftp_nb_get($ftp));
-var_dump(ftp_pasv($ftp));
-var_dump(ftp_nb_continue());
-var_dump(ftp_fput());
-var_dump(ftp_nb_fput($ftp));
-var_dump(ftp_put($ftp));
-var_dump(ftp_nb_put($ftp));
-var_dump(ftp_size($ftp));
-var_dump(ftp_mdtm($ftp));
-var_dump(ftp_rename($ftp));
-var_dump(ftp_site($ftp));
-var_dump(ftp_set_option($ftp));
-var_dump(ftp_get_option($ftp));
-var_dump(ftp_mlsd($ftp));
-var_dump(ftp_append($ftp));
-
-?>
---EXPECTF--
-Warning: ftp_connect() expects parameter 1 to be string, array given in %s006.php on line 4
-NULL
-
-Warning: ftp_connect(): Timeout has to be greater than 0 in %s006.php on line 5
-bool(false)
-
-Warning: ftp_raw() expects exactly 2 parameters, 1 given in %s006.php on line 6
-NULL
-
-Warning: ftp_mkdir() expects exactly 2 parameters, 1 given in %s006.php on line 7
-NULL
-
-Warning: ftp_rmdir() expects exactly 2 parameters, 1 given in %s006.php on line 8
-NULL
-
-Warning: ftp_nlist() expects exactly 2 parameters, 1 given in %s006.php on line 9
-NULL
-
-Warning: ftp_rawlist() expects at least 2 parameters, 1 given in %s006.php on line 10
-NULL
-
-Warning: ftp_fget() expects at least 3 parameters, 1 given in %s006.php on line 11
-NULL
-
-Warning: ftp_nb_fget() expects at least 3 parameters, 1 given in %s006.php on line 12
-NULL
-
-Warning: ftp_nb_get() expects at least 3 parameters, 1 given in %s006.php on line 13
-NULL
-
-Warning: ftp_pasv() expects exactly 2 parameters, 1 given in %s006.php on line 14
-NULL
-
-Warning: ftp_nb_continue() expects exactly 1 parameter, 0 given in %s006.php on line 15
-NULL
-
-Warning: ftp_fput() expects at least 3 parameters, 0 given in %s006.php on line 16
-NULL
-
-Warning: ftp_nb_fput() expects at least 3 parameters, 1 given in %s006.php on line 17
-NULL
-
-Warning: ftp_put() expects at least 3 parameters, 1 given in %s006.php on line 18
-NULL
-
-Warning: ftp_nb_put() expects at least 3 parameters, 1 given in %s006.php on line 19
-NULL
-
-Warning: ftp_size() expects exactly 2 parameters, 1 given in %s006.php on line 20
-NULL
-
-Warning: ftp_mdtm() expects exactly 2 parameters, 1 given in %s006.php on line 21
-NULL
-
-Warning: ftp_rename() expects exactly 3 parameters, 1 given in %s006.php on line 22
-NULL
-
-Warning: ftp_site() expects exactly 2 parameters, 1 given in %s006.php on line 23
-NULL
-
-Warning: ftp_set_option() expects exactly 3 parameters, 1 given in %s006.php on line 24
-NULL
-
-Warning: ftp_get_option() expects exactly 2 parameters, 1 given in %s006.php on line 25
-NULL
-
-Warning: ftp_mlsd() expects exactly 2 parameters, 1 given in %s006.php on line 26
-NULL
-
-Warning: ftp_append() expects at least 3 parameters, 1 given in %s006.php on line 27
-NULL
index 60f1b1de79bc5606f89b7159bc557645ae69eac3..43022cde45cb0590e61fc451bec3173e537d4bb4 100644 (file)
@@ -29,9 +29,6 @@ unlink($tmpfname);
 
 //test non-existent file request
 ftp_get($ftp, $tmpfname ,'a warning.txt', FTP_ASCII);
-
-//test invalid ftp_get params
-var_dump(ftp_get('foo', 'bar', 'baz'));
 ?>
 --EXPECTF--
 bool(true)
@@ -41,6 +38,3 @@ bool(true)
 string(21) "BINARYFoo%00Bar%0D%0A"
 
 Warning: ftp_get(): a warning: No such file or directory  in %sftp_get_basic.php on line %d
-
-Warning: ftp_get() expects parameter 1 to be resource, string given in %s on line %d
-NULL
index b0ece5d63b87714604d9286e5786514833defdc4..13c8f9e9c02cb14930a02b11b9218a7e3cd8f409 100644 (file)
@@ -12,14 +12,6 @@ echo "*** Testing ftp_ssl_connect() function : error conditions ***\n";
 echo "\n-- Testing ftp_ssl_connect() function on failure --\n";
 var_dump(ftp_ssl_connect('totes.invalid'));
 
-echo "\n-- Testing ftp_ssl_connect() function invalid argument type --\n";
-ftp_ssl_connect([]);
-ftp_ssl_connect('totes.invalid', []);
-ftp_ssl_connect('totes.invalid', 21, []);
-
-echo "\n-- Testing ftp_ssl_connect() function with more than expected no. of arguments --\n";
-ftp_ssl_connect('totes.invalid', 21, 1, []);
-
 echo "\n-- Testing ftp_ssl_connect() function timeout warning for value 0 --\n";
 ftp_ssl_connect('totes.invalid', 21, 0);
 
@@ -32,18 +24,6 @@ echo "===DONE===\n";
 Warning: ftp_ssl_connect(): php_network_getaddresses: getaddrinfo failed: %s in %s on line %d
 bool(false)
 
--- Testing ftp_ssl_connect() function invalid argument type --
-
-Warning: ftp_ssl_connect() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: ftp_ssl_connect() expects parameter 2 to be int, array given in %s on line %d
-
-Warning: ftp_ssl_connect() expects parameter 3 to be int, array given in %s on line %d
-
--- Testing ftp_ssl_connect() function with more than expected no. of arguments --
-
-Warning: ftp_ssl_connect() expects at most 3 parameters, 4 given in %s on line %d
-
 -- Testing ftp_ssl_connect() function timeout warning for value 0 --
 
 Warning: ftp_ssl_connect(): Timeout has to be greater than 0 in %s on line %d
index 793c02d106df9f26739015c20cfac8ab0307d67a..cdc83d8479dcaf289295ccc8fa2a91c513cab24f 100644 (file)
@@ -9,17 +9,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com>
 --FILE--
 <?php
 $resource = tmpfile();
-
 imagecolorallocatealpha($resource, 255, 255, 255, 50);
-imagecolorallocatealpha('string', 255, 255, 255, 50);
-imagecolorallocatealpha(array(), 255, 255, 255, 50);
-imagecolorallocatealpha(null, 255, 255, 255, 50);
 ?>
 --EXPECTF--
 Warning: imagecolorallocatealpha(): supplied resource is not a valid Image resource in %s on line %d
-
-Warning: imagecolorallocatealpha() expects parameter 1 to be resource, %s given in %s on line %d
-
-Warning: imagecolorallocatealpha() expects parameter 1 to be resource, array given in %s on line %d
-
-Warning: imagecolorallocatealpha() expects parameter 1 to be resource, null given in %s on line %d
index 59999423ca56c00c0473cb98e5e9f116c5536014..328cf12e7c765fe60d106e12476887dad75d2cd5 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test imagecolorstotal() function : error conditions  - Pass incorrect number of arguments
+Test imagecolorstotal() function : error conditions - Pass invalid resource type
 --SKIPIF--
 <?php
 if(!extension_loaded('gd')) {
@@ -21,13 +21,6 @@ echo "*** Testing imagecolorstotal() : error conditions ***\n";
 // Get a resource
 $im = fopen(__FILE__, 'r');
 
-echo "\n-- Testing imagecolorstotal() function with Zero arguments --\n";
-var_dump( imagecolorstotal() );
-
-echo "\n-- Testing imagecolorstotal() function with more than expected no. of arguments --\n";
-$extra_arg = false;
-var_dump( imagecolorstotal($im, $extra_arg) );
-
 echo "\n-- Testing imagecolorstotal() function with a invalid resource\n";
 var_dump( imagecolorstotal($im) );
 
@@ -37,16 +30,6 @@ fclose($im);
 --EXPECTF--
 *** Testing imagecolorstotal() : error conditions ***
 
--- Testing imagecolorstotal() function with Zero arguments --
-
-Warning: imagecolorstotal() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing imagecolorstotal() function with more than expected no. of arguments --
-
-Warning: imagecolorstotal() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 -- Testing imagecolorstotal() function with a invalid resource
 
 Warning: imagecolorstotal(): supplied resource is not a valid Image resource in %s on line %d
index 3ab4cf1e1fa30c4e7441534aca832718a1c1a641..88473337226c805701f78414a8c0b250047419dc 100644 (file)
@@ -11,14 +11,8 @@ Rafael Dohms <rdohms [at] gmail [dot] com>
 <?php
 $image = imagecreatetruecolor(-1, 30);
 $image = imagecreatetruecolor(30, -1);
-$image = imagecreatetruecolor(999999999999999999999999999, 30);
-$image = imagecreatetruecolor(30, 999999999999999999999999999);
 ?>
 --EXPECTF--
 Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d
 
 Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d
-
-Warning: imagecreatetruecolor() expects parameter 1 to be int, float given in %s on line %d
-
-Warning: imagecreatetruecolor() expects parameter 2 to be int, float given in %s on line %d
index 41637994b46c0caa142d9f4bcd2c58f2b9ad3745..407944d899fb10b97f375d76566a4c9b37d97f22 100644 (file)
@@ -11,8 +11,11 @@ if (!extension_loaded("gd")) die("skip GD not present");
 <?php
 $image = imagecreatetruecolor(180, 30);
 
-var_dump(imagefilter($image));
+try {
+    var_dump(imagefilter($image));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
-Warning: Wrong parameter count for imagefilter() in %s on line %d
-NULL
+--EXPECT--
+Wrong parameter count for imagefilter()
index 2370d5036efd5d5b5291523bad7b5c2d8d58011a..5eae5c719ca4f9e60e3506992a4580d25707a872 100644 (file)
@@ -22,13 +22,16 @@ $userinput = "1\0"; // from post or get data
 $temp = $tempdir. "/test" . $userinput .".tmp";
 
 echo "\nimagegd2 TEST\n";
-imagegd2($image, $temp);
+try {
+    imagegd2($image, $temp);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(file_exists($tempdir. "/test1"));
 var_dump(file_exists($tempdir. "/test1.tmp"));
 foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
---EXPECTF--
+--EXPECT--
 imagegd2 TEST
-
-Warning: imagegd2() expects parameter 2 to be a valid path, string given in %s on line %d
+imagegd2() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(false)
index 25e54fe36c6df641ac7b771d10f14504199b7053..235bd4680c87e39ad8fad076576fdc462e2d0e5c 100644 (file)
@@ -22,13 +22,16 @@ $userinput = "1\0"; // from post or get data
 $temp = $tempdir. "/test" . $userinput .".tmp";
 
 echo "\nimagegd TEST\n";
-imagegd($image, $temp);
+try {
+    imagegd($image, $temp);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(file_exists($tempdir. "/test1"));
 var_dump(file_exists($tempdir. "/test1.tmp"));
 foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
---EXPECTF--
+--EXPECT--
 imagegd TEST
-
-Warning: imagegd() expects parameter 2 to be a valid path, string given in %s on line %d
+imagegd() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(false)
index ab0a9fe653045ce62e72cd9739c49d04b2e5df54..e2364bcec68d3f82e47a88cec2835c13906ab53f 100644 (file)
@@ -9,16 +9,8 @@ Rafael Dohms <rdohms [at] gmail [dot] com>
 ?>
 --FILE--
 <?php
-$image = imagecreatetruecolor(180, 30);
 $resource = tmpfile();
-
-imageistruecolor('string');
 imageistruecolor($resource);
-imageistruecolor(array());
 ?>
 --EXPECTF--
-Warning: imageistruecolor() expects parameter 1 to be resource, string given in %s on line %d
-
 Warning: imageistruecolor(): supplied resource is not a valid Image resource in %s on line %d
-
-Warning: imageistruecolor() expects parameter 1 to be resource, array given in %s on line %d
index f54270afbc1be1b7a231cc11dea67838b7b95ac0..2542444c876aecd10643dcca1a0d1b5c99f86255 100644 (file)
@@ -9,14 +9,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com>
 --FILE--
 <?php
 $resource = tmpfile();
-
-imagesetthickness('string', 5);
-imagesetthickness(array(), 5);
 imagesetthickness($resource, 5);
 ?>
 --EXPECTF--
-Warning: imagesetthickness() expects parameter 1 to be resource, %s given in %s on line %d
-
-Warning: imagesetthickness() expects parameter 1 to be resource, array given in %s on line %d
-
 Warning: imagesetthickness(): supplied resource is not a valid Image resource in %s on line %d
index 3418449c0180f9ea39234f9694a122e9cbbb1d2c..a4d3bdfc168e95b18f2254f825f2fa1ca1849f4f 100644 (file)
@@ -10,17 +10,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com>
 --FILE--
 <?php
 $resource = tmpfile();
-
 imagetruecolortopalette($resource, true, 2);
-imagetruecolortopalette('string', true, 2);
-imagetruecolortopalette(array(), true, 2);
-imagetruecolortopalette(null, true, 2);
 ?>
 --EXPECTF--
 Warning: imagetruecolortopalette(): supplied resource is not a valid Image resource in %s on line %d
-
-Warning: imagetruecolortopalette() expects parameter 1 to be resource, %s given in %s on line %d
-
-Warning: imagetruecolortopalette() expects parameter 1 to be resource, array given in %s on line %d
-
-Warning: imagetruecolortopalette() expects parameter 1 to be resource, null given in %s on line %d
index d89bbcb31bb7fd131b38fa37872bb7c65f0375dc..2a256ba957574e526dd476e0a23c7b04307d71f0 100644 (file)
@@ -10,19 +10,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com>
 --FILE--
 <?php
 $image = imagecreatetruecolor(50, 50);
-$resource = tmpfile();
-
-imagetruecolortopalette($image, true, 'string');
-imagetruecolortopalette($image, true, $resource);
-imagetruecolortopalette($image, true, array());
 imagetruecolortopalette($image, true, null);
-
 ?>
 --EXPECTF--
-Warning: imagetruecolortopalette() expects parameter 3 to be int, string given in %s on line %d
-
-Warning: imagetruecolortopalette() expects parameter 3 to be int, resource given in %s on line %d
-
-Warning: imagetruecolortopalette() expects parameter 3 to be int, array given in %s on line %d
-
 Warning: imagetruecolortopalette(): Number of colors has to be greater than zero and no more than %d in %s on line %d
index dda8497222de4820e72b6b370d9a69802e604cbe..9401b6c82d204c0bb95d7e0a71aa0eb46680673f 100644 (file)
@@ -9,10 +9,6 @@ imageline no AA
 $im = imagecreatetruecolor(6,6);
 imagefill($im, 0,0, 0xffffff);
 
-// Wrong argument count
-imageline($im, 0,0, 5,5);
-
-
 // Horizontal line
 imageline($im, 0,5, 5,5, 0x00ff00);
 
@@ -105,7 +101,6 @@ if ($p3) {
 
 ?>
 --EXPECTF--
-Warning: imageline() expects exactly 6 parameters, 5 given in %s on line %d
 Horizontal: ok
 Vertical: ok
 Diagonal: ok
index 4bf493507b9a7b013d591882401d8639fb04d95e..f004febcb6236a9d8fc4162f0394369d01723d42 100644 (file)
@@ -8,7 +8,6 @@ if (!function_exists("dcngettext")) die("skip dcngettext() doesn't exist");
 --FILE--
 <?php
 
-var_dump(dcngettext(1,1,1,1));
 var_dump(dcngettext(1,1,1,1,1));
 var_dump(dcngettext("test","test","test",1,1));
 var_dump(dcngettext("test","test","test",0,0));
@@ -18,9 +17,7 @@ var_dump(dcngettext("","","",0,0));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: dcngettext() expects exactly 5 parameters, 4 given in %s on line %d
-bool(false)
+--EXPECT--
 string(1) "1"
 string(4) "test"
 string(4) "test"
index 811ab3d5eee09b66b44973f32ed6b2a47fdd2429..236acc46842ba48613007247db7c9d4a719a36ee 100644 (file)
@@ -15,8 +15,6 @@ var_dump(gmp_strval(gmp_abs("0000")));
 var_dump(gmp_strval(gmp_abs("09876543")));
 var_dump(gmp_strval(gmp_abs("-099987654")));
 
-var_dump(gmp_abs());
-var_dump(gmp_abs(1,2));
 var_dump(gmp_abs(array()));
 
 echo "Done\n";
@@ -39,12 +37,6 @@ string(1) "0"
 Warning: gmp_abs(): Unable to convert variable to GMP - string is not an integer in %s on line %d
 string(1) "0"
 
-Warning: gmp_abs() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: gmp_abs() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: gmp_abs(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 Done
index 2fb27c3e7021f63d4466fa250e207cc9d474e223..b582a6b480f20b23999b8fd2137431d547c8a6d7 100644 (file)
@@ -17,8 +17,6 @@ var_dump(gmp_strval(gmp_and($n, "34332")));
 $n1 = gmp_init("987657878765436543456");
 var_dump(gmp_strval(gmp_and($n, $n1)));
 
-var_dump(gmp_and($n, $n1, 1));
-var_dump(gmp_and(1));
 var_dump(gmp_and(array(), 1));
 var_dump(gmp_and(1, array()));
 var_dump(gmp_and(array(), array()));
@@ -37,12 +35,6 @@ string(1) "0"
 string(4) "1536"
 string(15) "424703623692768"
 
-Warning: gmp_and() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_and() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
index 0aab89dd37aeff4b292736e6e0897f91557dbbf2..255b9947b90d2d0566fd4a3e06cd393e84c6310a 100644 (file)
@@ -28,10 +28,11 @@ gmp_clrbit($n, 20);
 var_dump(gmp_strval($n));
 
 $n = array();
-gmp_clrbit($n, 3);
-gmp_clrbit($n, 3, 1);
-gmp_clrbit($n);
-gmp_clrbit();
+try {
+    gmp_clrbit($n, 3);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
@@ -46,12 +47,5 @@ Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line
 string(7) "1000000"
 string(7) "1000000"
 string(30) "238462734628347239571822592658"
-
-Warning: gmp_clrbit() expects parameter 1 to be GMP, array given in %s on line %d
-
-Warning: gmp_clrbit() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: gmp_clrbit() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: gmp_clrbit() expects exactly 2 parameters, 0 given in %s on line %d
+gmp_clrbit() expects parameter 1 to be GMP, array given
 Done
index 2e48d3b83b91c04bf8d01dbe6a4239ee27f14190..4748e7db877fbc20905f7d1b653061c1ab37669b 100644 (file)
@@ -17,10 +17,7 @@ var_dump(gmp_cmp(0,$n) < 0);
 $n1 = gmp_init("827278512385463739");
 var_dump(gmp_cmp($n1,$n));
 
-var_dump(gmp_cmp($n1,$n,1));
 var_dump(gmp_cmp(array(),array()));
-var_dump(gmp_cmp(array()));
-var_dump(gmp_cmp());
 
 echo "Done\n";
 ?>
@@ -34,15 +31,6 @@ int(-1)
 bool(true)
 int(0)
 
-Warning: gmp_cmp() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: gmp_cmp(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_cmp() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_cmp() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index ae6ec59200acc4726b4c1d67e1518268383df7ac..97299dd064a80f86e43e70be4366e5569bf9f9f1 100644 (file)
@@ -19,7 +19,6 @@ $n = gmp_init("98765463337");
 var_dump(gmp_strval(gmp_com($n)));
 
 var_dump(gmp_strval(gmp_com(array())));
-var_dump(gmp_strval(gmp_com()));
 
 echo "Done\n";
 ?>
@@ -38,9 +37,4 @@ string(12) "-98765463338"
 
 Warning: gmp_com(): Unable to convert variable to GMP - wrong type in %s on line %d
 string(1) "0"
-
-Warning: gmp_com() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
-bool(false)
 Done
index afc64c3547e9b06d6b194a11f51abf457e0e0883..9fd94efdac8972a0d9cb598aa36216a221934d45 100644 (file)
@@ -5,9 +5,6 @@ gmp_div_q() tests
 --FILE--
 <?php
 
-var_dump(gmp_div_q());
-var_dump(gmp_div_q(""));
-
 var_dump(gmp_div_q(0,1));
 var_dump(gmp_div_q(1,0));
 var_dump(gmp_div_q(12653,23482734));
@@ -27,11 +24,6 @@ var_dump(gmp_div_q(array(), array()));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_div_q() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_div_q() expects at least 2 parameters, 1 given in %s on line %d
-NULL
 object(GMP)#%d (1) {
   ["num"]=>
   string(1) "0"
index 936fbc6ef1b469db82d29d7ca097926366bffe36..373beb570111c6d951ef830440cc602fbcfa0a6e 100644 (file)
@@ -5,9 +5,6 @@ gmp_div_qr() tests
 --FILE--
 <?php
 
-var_dump(gmp_div_qr());
-var_dump(gmp_div_qr(""));
-
 var_dump(gmp_div_qr(0,1));
 var_dump(gmp_div_qr(1,0));
 var_dump(gmp_div_qr(gmp_init(1), gmp_init(0)));
@@ -29,11 +26,6 @@ var_dump(gmp_div_qr(array(), array()));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_div_qr() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_div_qr() expects at least 2 parameters, 1 given in %s on line %d
-NULL
 array(2) {
   [0]=>
   object(GMP)#%d (1) {
index bab243e465872e05bb6745d9d7b9183ae824581f..2b19ed1f48b26cf106e1f6eeb22abccce9f63a7c 100644 (file)
@@ -5,9 +5,6 @@ gmp_div_r() tests
 --FILE--
 <?php
 
-var_dump(gmp_div_r());
-var_dump(gmp_div_r(""));
-
 var_dump($r = gmp_div_r(0,1));
 var_dump($r = gmp_div_r(1,0));
 var_dump($r = gmp_div_r(12653,23482734));
@@ -27,11 +24,6 @@ var_dump(gmp_div_r(array(), array()));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_div_r() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_div_r() expects at least 2 parameters, 1 given in %s on line %d
-NULL
 object(GMP)#%d (1) {
   ["num"]=>
   string(1) "0"
index 53f0c677ab74310c8babb9ff19c939deed9ea48b..c6183cb734ef3ffddf694c69eed305adfa923766 100644 (file)
@@ -10,9 +10,6 @@ if (!defined('GMP_VERSION') || version_compare("4.2.1", GMP_VERSION, ">=")) {
 --FILE--
 <?php
 
-var_dump(gmp_divexact(1, 1, 1));
-var_dump(gmp_divexact());
-
 $r = gmp_divexact("233", "23345555555555555555555555");
 var_dump(gmp_strval($r));
 
@@ -39,11 +36,6 @@ var_dump(gmp_strval($r));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_divexact() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_divexact() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 string(1) "0"
 
 Warning: gmp_divexact(): Zero operand not allowed in %s on line %d
index 52449ecf0aff1700809b55ca1fdb0462b1fbb6cf..bbc26d086cfd90f50e1f9cd92424ea70ffd9e69b 100644 (file)
@@ -50,9 +50,6 @@ foreach ($export as $k => $test) {
 
 var_dump($passed);
 
-// Invalid arguments (zpp failure)
-var_dump(gmp_export());
-
 // Invalid word sizes
 var_dump(gmp_export(123, -1));
 var_dump(gmp_export(123, 0));
@@ -63,9 +60,6 @@ var_dump(gmp_export(123, 1, GMP_BIG_ENDIAN | GMP_LITTLE_ENDIAN));
 --EXPECTF--
 bool(true)
 
-Warning: gmp_export() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_export(): Word size must be positive, -1 given in %s on line %d
 bool(false)
 
index 032f73543553f85236d5d7e4f2cabff750bbb261..d861fae40ede17400359ea5d0f801f2cbb30c51a 100644 (file)
@@ -21,8 +21,6 @@ var_dump(gmp_strval(gmp_fact($n)));
 $n = gmp_init(-10);
 var_dump(gmp_strval(gmp_fact($n)));
 
-var_dump(gmp_fact());
-var_dump(gmp_fact(1,1));
 var_dump(gmp_fact(array()));
 var_dump(gmp_strval(gmp_fact(array())));
 
@@ -50,12 +48,6 @@ string(9) "479001600"
 Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d
 string(1) "0"
 
-Warning: gmp_fact() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: gmp_fact() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: gmp_fact(): Number has to be an integer in %s on line %d
 object(GMP)#%d (1) {
   ["num"]=>
index cf4eac9e92f277a3d1dd3ec67e41016e09a7594b..4e130a1fd90f53eabf35417286cf5d24c67b330e 100644 (file)
@@ -21,13 +21,10 @@ $n = gmp_init("8127346234");
 var_dump(gmp_strval(gmp_gcd($n,$n)));
 $n = gmp_init("8127346234");
 var_dump(gmp_strval(gmp_gcd($n,0)));
-var_dump(gmp_gcd($n,$n,1));
-var_dump(gmp_gcd($n,array(),1));
-var_dump(gmp_gcd(array(),$n,1));
 
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 string(1) "3"
 string(5) "12387"
 string(3) "224"
@@ -39,13 +36,4 @@ string(1) "2"
 string(1) "1"
 string(10) "8127346234"
 string(10) "8127346234"
-
-Warning: gmp_gcd() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_gcd() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_gcd() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
 Done
index 4adecf25d26b8d9b4b61dc9838fd793583bf5e6c..d02f341129c374a5d65b2a422f35c7fd3a65a2ef 100644 (file)
@@ -31,9 +31,6 @@ foreach ($a as $val) {
 
 var_dump(gmp_gcdext($val[0],array()));
 var_dump(gmp_gcdext(array(),array()));
-var_dump(gmp_gcdext(array(),array(),1));
-var_dump(gmp_gcdext(array()));
-var_dump(gmp_gcdext());
 
 echo "Done\n";
 ?>
@@ -64,13 +61,4 @@ bool(false)
 
 Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_gcdext() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_gcdext() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_gcdext() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index 60ef89f84dfaff054249b5918ed55b62935e001d..7057c5f32ac01e873dd85c9edf43885157373603 100644 (file)
@@ -16,11 +16,9 @@ var_dump(gmp_hamdist($n, "8333765434567897654333334567"));
 var_dump(gmp_hamdist($n, $n));
 var_dump(gmp_hamdist($n, $n1));
 
-var_dump(gmp_hamdist($n, $n1, 1));
 var_dump(gmp_hamdist($n, array()));
 var_dump(gmp_hamdist(array(), $n));
 var_dump(gmp_hamdist(array(), array()));
-var_dump(gmp_hamdist());
 
 echo "Done\n";
 ?>
@@ -33,9 +31,6 @@ int(43)
 int(0)
 int(26)
 
-Warning: gmp_hamdist() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: gmp_hamdist(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
@@ -44,7 +39,4 @@ bool(false)
 
 Warning: gmp_hamdist(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_hamdist() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index a9e931448340d0e025fd8c6c3c216f13356fcd89..b3c4e0154a60e30ad0943ddfa1c67d0bc9adb1cf 100644 (file)
@@ -47,9 +47,6 @@ foreach ($import as $k => $test) {
 
 var_dump($passed);
 
-// Invalid arguments (zpp failure)
-var_dump(gmp_import());
-
 // Invalid word sizes
 var_dump(gmp_import('a', -1));
 var_dump(gmp_import('a', 0));
@@ -65,9 +62,6 @@ var_dump(gmp_import('a', 1, GMP_BIG_ENDIAN | GMP_LITTLE_ENDIAN));
 --EXPECTF--
 bool(true)
 
-Warning: gmp_import() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_import(): Word size must be positive, -1 given in %s on line %d
 bool(false)
 
index a35f12345cfa852fc70db70cae906b3b54d689ef..7da7c8e55eb7c2c76fca27a5eee232e4ea1b172c 100644 (file)
@@ -7,9 +7,6 @@ gmp_init() basic tests
 
 var_dump(gmp_init("98765678"));
 var_dump(gmp_strval(gmp_init("98765678")));
-var_dump(gmp_strval(gmp_init()));
-var_dump(gmp_init());
-var_dump(gmp_init(1,2,3,4));
 var_dump(gmp_init(1,-1));
 var_dump(gmp_init("",36));
 var_dump(gmp_init("foo",3));
@@ -24,17 +21,6 @@ object(GMP)#%d (1) {
 }
 string(8) "98765678"
 
-Warning: gmp_init() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
-bool(false)
-
-Warning: gmp_init() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: gmp_init() expects at most 2 parameters, 4 given in %s on line %d
-NULL
-
 Warning: gmp_init(): Bad base for conversion: -1 (should be between 2 and %d) in %s on line %d
 bool(false)
 
index f30b39157355332de49bab506cd8e8443fb25e90..019ab3d070c0e060fe112d75f039dc102855bd36 100644 (file)
@@ -5,7 +5,6 @@ gmp_intval() tests
 --FILE--
 <?php
 
-var_dump(gmp_intval(1,1));
 var_dump(gmp_intval(""));
 var_dump(gmp_intval(1.0001));
 var_dump(gmp_intval("1.0001"));
@@ -25,8 +24,6 @@ var_dump(gmp_intval($g));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_intval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 int(0)
 int(1)
 int(1)
index 8c1d7c577cbb6e72ed16c6eb82e1238bb8a4a0f1..40793afd5351d1f0e4f810064e62341d35a68aa6 100644 (file)
@@ -19,8 +19,6 @@ $n1 = gmp_init("3498273496234234523451");
 var_dump(gmp_strval(gmp_invert($n, $n1)));
 var_dump(gmp_strval(gmp_invert($n1, $n)));
 
-var_dump(gmp_invert($n1, $n, 10));
-var_dump(gmp_invert($n1));
 var_dump(gmp_invert(array(), 1));
 var_dump(gmp_invert(1, array()));
 var_dump(gmp_invert(array(), array()));
@@ -38,12 +36,6 @@ string(1) "0"
 string(22) "3498273496234234523441"
 string(1) "1"
 
-Warning: gmp_invert() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_invert() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
index da92b8740127046c3d7c1c059bf87120ad545a5b..2040b666f6a3b5ec908112955b5e72a87a099b11 100644 (file)
@@ -24,10 +24,6 @@ var_dump(gmp_jacobi(3, array()));
 var_dump(gmp_jacobi(array(), 3));
 var_dump(gmp_jacobi(array(), array()));
 
-var_dump(gmp_jacobi(array(), array(), 1));
-var_dump(gmp_jacobi(array()));
-var_dump(gmp_jacobi());
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -57,13 +53,4 @@ bool(false)
 
 Warning: gmp_jacobi(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_jacobi() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_jacobi() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_jacobi() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index 71191e133d629b417d54b1b4ae1e6798cb5aad15..6b6197f25aa16a31a2e736c100c4c08577de9457 100644 (file)
@@ -24,10 +24,6 @@ var_dump(gmp_legendre(3, array()));
 var_dump(gmp_legendre(array(), 3));
 var_dump(gmp_legendre(array(), array()));
 
-var_dump(gmp_legendre(array(), array(), 1));
-var_dump(gmp_legendre(array()));
-var_dump(gmp_legendre());
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -57,13 +53,4 @@ bool(false)
 
 Warning: gmp_legendre(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_legendre() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_legendre() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_legendre() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index 4f216965c96d6a151be33df18302d6ca1b60d75d..135c2ca11cb6751b66bd9bde31ff36a0c0488d75 100644 (file)
@@ -5,8 +5,6 @@ gmp_mod tests()
 --FILE--
 <?php
 
-var_dump(gmp_mod());
-var_dump(gmp_mod(""));
 var_dump(gmp_mod("",""));
 var_dump(gmp_mod(0,1));
 var_dump(gmp_mod(0,-1));
@@ -22,12 +20,6 @@ var_dump(gmp_mod($a, $b));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_mod() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_mod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_mod(): Unable to convert variable to GMP - string is not an integer in %s on line %d
 bool(false)
 object(GMP)#%d (1) {
index c457fa6574ae540400569ac70ea62cb226b6d60a..777de6910564dc055f1c5e83c2f014797886c755 100644 (file)
@@ -17,8 +17,6 @@ var_dump(gmp_intval(gmp_neg($n)));
 $n = gmp_init("12345678901234567890");
 var_dump(gmp_strval(gmp_neg($n)));
 
-var_dump(gmp_neg(1,1));
-var_dump(gmp_neg());
 var_dump(gmp_neg(array()));
 
 echo "Done\n";
@@ -35,12 +33,6 @@ int(0)
 int(0)
 string(21) "-12345678901234567890"
 
-Warning: gmp_neg() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: gmp_neg() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_neg(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 Done
index ef486df8e9ed65df286ab23a274b28beba078b9d..affd6ae5b8232da79168633495af4f3541d0877c 100644 (file)
@@ -17,8 +17,6 @@ var_dump(gmp_strval(gmp_or($n, "34332")));
 $n1 = gmp_init("987657878765436543456");
 var_dump(gmp_strval(gmp_or($n, $n1)));
 
-var_dump(gmp_or($n, $n1, 1));
-var_dump(gmp_or(1));
 var_dump(gmp_or(array(), 1));
 var_dump(gmp_or(1, array()));
 var_dump(gmp_or(array(), array()));
@@ -37,12 +35,6 @@ string(1) "0"
 string(15) "987657876576252"
 string(21) "987658441719689394144"
 
-Warning: gmp_or() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_or() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
index 0f519c7b79c0d616c0ef24840e6073396eafcbbc..b47791037843d5294358b2303aaaec8337db8745 100644 (file)
@@ -21,7 +21,6 @@ var_dump(gmp_perfect_square($n));
 $n = gmp_init(-5);
 var_dump(gmp_perfect_square($n));
 
-var_dump(gmp_perfect_square());
 var_dump(gmp_perfect_square(array()));
 
 echo "Done\n";
@@ -39,9 +38,6 @@ bool(false)
 bool(true)
 bool(false)
 
-Warning: gmp_perfect_square() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_perfect_square(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 Done
index 26a7b5af8db13e33974242bc199f6d466729d4e7..76dc2a89c0c5649c5caedc81f06989c8e39ad38c 100644 (file)
@@ -13,7 +13,6 @@ var_dump(gmp_popcount("-23476123423433"));
 $n = gmp_init("9876546789222");
 var_dump(gmp_popcount($n));
 var_dump(gmp_popcount(array()));
-var_dump(gmp_popcount());
 
 echo "Done\n";
 ?>
@@ -27,7 +26,4 @@ int(20)
 
 Warning: gmp_popcount(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_popcount() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
 Done
index 5424d410a073c5ad062efcfec27ddf7813ef9b3d..e9525867e150f62fb72d98c7abbe28dfa572c0d3 100644 (file)
@@ -21,11 +21,11 @@ var_dump(gmp_strval(gmp_pow($n,10)));
 $n = gmp_init("-20");
 var_dump(gmp_strval(gmp_pow($n,10)));
 
-var_dump(gmp_pow(2,10,1));
-var_dump(gmp_pow(2));
-var_dump(gmp_pow());
-var_dump(gmp_pow(array(), array()));
-var_dump(gmp_pow(2,array()));
+try {
+    var_dump(gmp_pow(2,array()));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(gmp_pow(array(),10));
 
 echo "Done\n";
@@ -47,21 +47,7 @@ Warning: gmp_pow(): Negative exponent not supported in %s on line %d
 string(1) "0"
 string(14) "10240000000000"
 string(14) "10240000000000"
-
-Warning: gmp_pow() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_pow() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_pow() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_pow() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: gmp_pow() expects parameter 2 to be int, array given in %s on line %d
-NULL
+gmp_pow() expects parameter 2 to be int, array given
 
 Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
index b732aa331fcc1f1cdf868375ca38f6ddad10c07f..9a5b5deb11298013dcf009fe719ad6b7c5758651 100644 (file)
@@ -26,9 +26,6 @@ var_dump(gmp_powm(array(),$e,$m));
 var_dump(gmp_powm($n,array(),$m));
 var_dump(gmp_powm($n,$e,array()));
 var_dump(gmp_powm(array(),array(),array()));
-var_dump(gmp_powm(array(),array()));
-var_dump(gmp_powm(array()));
-var_dump(gmp_powm());
 
 $n = gmp_init("-5");
 var_dump(gmp_powm(10, $n, 10));
@@ -67,15 +64,6 @@ bool(false)
 Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
-Warning: gmp_powm() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: gmp_powm() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_powm() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
 Warning: gmp_powm(): Second parameter cannot be less than 0 in %s on line %d
 bool(false)
 object(GMP)#%d (1) {
index 99735bd7c009d6f8390eecb039e1e38fb3022550..2872e01d840d0ab6bfe0b9c22bf33a7500b1170c 100644 (file)
@@ -28,7 +28,6 @@ var_dump(gmp_prob_prime($n));
 $n = gmp_init(0);
 var_dump(gmp_prob_prime($n));
 
-var_dump(gmp_prob_prime());
 var_dump(gmp_prob_prime(array()));
 
 echo "Done\n";
@@ -73,9 +72,6 @@ int(0)
 int(0)
 int(0)
 
-Warning: gmp_prob_prime() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_prob_prime(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 Done
index b4aa5d7b732b273ba946d5bd38aa457ec4ce1e6b..42b90d6fe34787d2d83d6772a2aa13f231c96367 100644 (file)
@@ -5,7 +5,6 @@ gmp_random_bits() basic tests
 --FILE--
 <?php
 
-var_dump(gmp_random_bits());
 var_dump(gmp_random_bits(0));
 var_dump(gmp_random_bits(-1));
 
@@ -34,9 +33,6 @@ while (1) {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_random_bits() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_random_bits(): The number of bits must be positive in %s on line %d
 bool(false)
 
index 654ffbefb369a4d86cc1452e7e6a4c1678f7c9e4..fec82741674fac1dfb37f12ef8bad56ab142b7dd 100644 (file)
@@ -9,8 +9,6 @@ $minusTen = gmp_init(-10);
 $plusTen = gmp_init(10);
 $zero = gmp_init(0);
 
-var_dump(gmp_random_range());
-var_dump(gmp_random_range(10));
 var_dump(gmp_random_range(10, -10));
 
 var_dump(gmp_random_range($plusTen, $minusTen));
@@ -64,12 +62,6 @@ while (1) {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_random_range() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_random_range() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_random_range(): The minimum value must be less than the maximum value in %s on line %d
 bool(false)
 
index acd8f84925fe5321f960b13bb7bf5e323387e668..1316d7651c7196881e59875b0bcc2acbfed81ee9 100644 (file)
@@ -5,8 +5,6 @@ gmp_rootrem() basic tests
 --FILE--
 <?php
 
-var_dump(gmp_rootrem());
-
 var_dump(gmp_rootrem(1000, 3));
 var_dump(gmp_rootrem(100, 3));
 var_dump(gmp_rootrem(-100, 3));
@@ -21,8 +19,6 @@ var_dump(gmp_rootrem(100, -3));
 
 ?>
 --EXPECTF--
-Warning: gmp_rootrem() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 array(2) {
   [0]=>
   object(GMP)#%d (1) {
index 654e2ffeb62bc7368609f46dfc25fad30fd43f4b..47c1fcc6081570217609629f5bf1f0e539847b21 100644 (file)
@@ -5,8 +5,6 @@ gmp_root() basic tests
 --FILE--
 <?php
 
-var_dump(gmp_root());
-
 var_dump(gmp_root(1000, 3));
 var_dump(gmp_root(100, 3));
 var_dump(gmp_root(-100, 3));
@@ -21,8 +19,6 @@ var_dump(gmp_root(100, -3));
 
 ?>
 --EXPECTF--
-Warning: gmp_root() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 object(GMP)#%d (1) {
   ["num"]=>
   string(2) "10"
index fb70cf8b25b22f338f3f7c6f7817f7687ab8101f..c06f91f7dda6355b8fecd52bad9c6afa761afb88 100644 (file)
@@ -15,8 +15,6 @@ $n = gmp_init("24234527465274");
 var_dump(gmp_scan0($n, 10));
 
 var_dump(gmp_scan0(array(), 200));
-var_dump(gmp_scan0(array()));
-var_dump(gmp_scan0());
 
 echo "Done\n";
 ?>
@@ -31,10 +29,4 @@ int(13)
 
 Warning: gmp_scan0(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_scan0() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_scan0() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index a89a9195b0582b81859392451c9f050a5539bf07..43a2fdfa1baea1c7999af6f798bf9c10ea841f93 100644 (file)
@@ -15,8 +15,6 @@ $n = gmp_init("24234527465274");
 var_dump(gmp_scan1($n, 10));
 
 var_dump(gmp_scan1(array(), 200));
-var_dump(gmp_scan1(array()));
-var_dump(gmp_scan1());
 
 echo "Done\n";
 ?>
@@ -31,10 +29,4 @@ int(10)
 
 Warning: gmp_scan1(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_scan1() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: gmp_scan1() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
 Done
index 2eac23db0edf8af104c14f9e4f6c02976855f4ce..15270eaf7bf567af8ca071369047eb48c9f38577 100644 (file)
@@ -32,12 +32,17 @@ gmp_setbit($n, 3);
 var_dump(gmp_strval($n));
 
 $b = "";
-gmp_setbit($b, 23);
-gmp_setbit($b);
-gmp_setbit($b, 23,1,1);
-gmp_setbit($b,array());
+try {
+    gmp_setbit($b, 23);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 $a = array();
-gmp_setbit($a,array());
+try {
+    gmp_setbit($a, array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
@@ -52,14 +57,6 @@ string(1) "7"
 string(12) "100008388608"
 string(12) "100000000000"
 string(12) "100000000008"
-
-Warning: gmp_setbit() expects parameter 1 to be GMP, string given in %s on line %d
-
-Warning: gmp_setbit() expects at least 2 parameters, 1 given in %s on line %d
-
-Warning: gmp_setbit() expects at most 3 parameters, 4 given in %s on line %d
-
-Warning: gmp_setbit() expects parameter 1 to be GMP, string given in %s on line %d
-
-Warning: gmp_setbit() expects parameter 1 to be GMP, array given in %s on line %d
+gmp_setbit() expects parameter 1 to be GMP, string given
+gmp_setbit() expects parameter 1 to be GMP, array given
 Done
index 7ac03013d4a903565e46a888038ce214d3217782..ac01845395fe1827242dcddd43501de42a6122a3 100644 (file)
@@ -13,9 +13,7 @@ var_dump(gmp_sign("-34535345345"));
 var_dump(gmp_sign("+34534573457345"));
 $n = gmp_init("098909878976786545");
 var_dump(gmp_sign($n));
-var_dump(gmp_sign($n, $n));
 var_dump(gmp_sign(array()));
-var_dump(gmp_sign());
 
 echo "Done\n";
 ?>
@@ -32,12 +30,6 @@ bool(false)
 Warning: gmp_init(): Unable to convert variable to GMP - string is not an integer in %s on line %d
 int(0)
 
-Warning: gmp_sign() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: gmp_sign(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_sign() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
 Done
index e824de3706ee825f70a97a459150f54757410d46..03c460b79a932e8e9159d7a43522b862d2e1b28f 100644 (file)
@@ -18,8 +18,6 @@ var_dump(gmp_strval(gmp_sqrt($n)));
 $n = gmp_init(777);
 var_dump(gmp_strval(gmp_sqrt($n)));
 
-var_dump(gmp_sqrt($n, 1));
-var_dump(gmp_sqrt());
 var_dump(gmp_sqrt(array()));
 
 echo "Done\n";
@@ -39,12 +37,6 @@ Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %
 string(1) "0"
 string(2) "27"
 
-Warning: gmp_sqrt() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: gmp_sqrt() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_sqrt(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 Done
index 595a1dc45ae7eff32216542241bc7030f8a29e46..c19969158e3630f20a1263f690887f9023809310 100644 (file)
@@ -51,7 +51,6 @@ var_dump(gmp_strval($r[0]));
 var_dump(gmp_strval($r[1]));
 
 var_dump(gmp_sqrtrem(array()));
-var_dump(gmp_sqrtrem());
 
 echo "Done\n";
 ?>
@@ -82,7 +81,4 @@ string(1) "1"
 
 Warning: gmp_sqrtrem(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
-
-Warning: gmp_sqrtrem() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
 Done
index cfa7335667b0c56b9a8ce0a256881274bf214138..b349d31699c9a2a0cb1dd2478818e5b1b7246128 100644 (file)
@@ -5,11 +5,8 @@ gmp_strval() tests
 --FILE--
 <?php
 
-var_dump(gmp_strval());
 var_dump(gmp_strval(""));
-var_dump(gmp_strval("", ""));
 var_dump(gmp_strval("", -1));
-var_dump(gmp_strval(-1, ""));
 
 $fp = fopen(__FILE__, "r");
 var_dump(gmp_strval($fp));
@@ -26,29 +23,18 @@ var_dump(gmp_strval($g, -1));
 var_dump(gmp_strval($g, 100000));
 var_dump(gmp_strval($g, 10));
 
-var_dump(gmp_strval(array(1,2), array(1,2)));
-var_dump(gmp_strval(new stdclass, new stdclass));
 var_dump(gmp_strval(array(1,2)));
 var_dump(gmp_strval(new stdclass));
 
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_strval() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gmp_strval(): Unable to convert variable to GMP - string is not an integer in %s on line %d
 bool(false)
 
-Warning: gmp_strval() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
 Warning: gmp_strval(): Bad base for conversion: -1 (should be between 2 and %d or -2 and -%d) in %s on line %d
 bool(false)
 
-Warning: gmp_strval() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
 Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 string(7) "9765456"
@@ -68,12 +54,6 @@ Warning: gmp_strval(): Bad base for conversion: 100000 (should be between 2 and
 bool(false)
 string(8) "-3373333"
 
-Warning: gmp_strval() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: gmp_strval() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
 Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
index fabc0c0ebbeaa09a273d3c2695b89e860b58e695..b8dce49774e0478673e52d653f8509e33c503bc1 100644 (file)
@@ -5,10 +5,7 @@ gmp_sub() tests
 --FILE--
 <?php
 
-var_dump(gmp_sub());
-var_dump(gmp_sub(""));
 var_dump(gmp_sub("", ""));
-var_dump(gmp_sub("", "", ""));
 var_dump(gmp_sub(array(), array()));
 
 var_dump($g = gmp_sub(10000, 10001));
@@ -23,18 +20,9 @@ var_dump(gmp_strval($g));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_sub() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: gmp_sub() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_sub(): Unable to convert variable to GMP - string is not an integer in %s on line %d
 bool(false)
 
-Warning: gmp_sub() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: gmp_sub(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 object(GMP)#%d (1) {
index bdabe3d84186645828fc3e8455bfd5c5e5a16b01..f18af5d44da21a8ee435090d587fac58ed502c70 100644 (file)
@@ -5,8 +5,6 @@ gmp_testbit() basic tests
 --FILE--
 <?php
 
-var_dump(gmp_testbit());
-
 $n = gmp_init(0);
 var_dump(gmp_testbit($n, -10));
 var_dump(gmp_testbit($n, 0));
@@ -40,9 +38,6 @@ var_dump(gmp_strval($n));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gmp_testbit() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
 Warning: gmp_testbit(): Index must be greater than or equal to zero in %s on line %d
 bool(false)
 bool(false)
index 9bf31f02f41555a2a15d9cc624c44421a4930573..cc508907aa0230a0ef4ec1af93230b1e11801e0c 100644 (file)
@@ -17,8 +17,6 @@ var_dump(gmp_strval(gmp_xor($n, "34332")));
 $n1 = gmp_init("987657878765436543456");
 var_dump(gmp_strval(gmp_xor($n, $n1)));
 
-var_dump(gmp_xor($n, $n1, 1));
-var_dump(gmp_xor(1));
 var_dump(gmp_xor(array(), 1));
 var_dump(gmp_xor(1, array()));
 var_dump(gmp_xor(array(), array()));
@@ -37,12 +35,6 @@ string(1) "0"
 string(15) "987657876574716"
 string(21) "987658017016065701376"
 
-Warning: gmp_xor() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: gmp_xor() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d
 bool(false)
 
index e760819e69aaf510dd7bf87b4889b437b9194a09..f879d491d79a85d07a3cda142f0549d8296603be 100644 (file)
@@ -10,14 +10,6 @@ Hash: hash() function : error conditions
 */
 echo "*** Testing hash() : error conditions ***\n";
 
-echo "\n-- Testing hash() function with less than expected no. of arguments --\n";
-var_dump(hash());
-var_dump(hash('adler32'));
-
-echo "\n-- Testing hash() function with more than expected no. of arguments --\n";
-$extra_arg= 10;
-var_dump(hash('adler32', '', false, $extra_arg));
-
 echo "\n-- Testing hash() function with invalid hash algorithm --\n";
 var_dump(hash('foo', ''));
 
@@ -26,19 +18,6 @@ var_dump(hash('foo', ''));
 --EXPECTF--
 *** Testing hash() : error conditions ***
 
--- Testing hash() function with less than expected no. of arguments --
-
-Warning: hash() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: hash() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing hash() function with more than expected no. of arguments --
-
-Warning: hash() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing hash() function with invalid hash algorithm --
 
 Warning: hash(): Unknown hashing algorithm: foo in %s on line %d
index a634070de5b32e1bd82327d8ebc97fc36258dc1b..b001001861aadbe450af2536d1c6a6b4a2daf0ec 100644 (file)
@@ -24,13 +24,6 @@ var_dump( hash_file( 'foobar', $filename ) );
 echo "\n-- Testing hash_file() function with a non-existent file --\n";
 var_dump( hash_file( 'md5', 'nonexistent.txt' ) );
 
-echo "\n-- Testing hash_file() function with less than expected no. of arguments --\n";
-var_dump( hash_file( 'md5' ) );
-
-echo "\n-- Testing hash_file() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( hash_file( 'md5', $filename, false, $extra_arg ) );
-
 ?>
 ===DONE===
 --CLEAN--
@@ -52,14 +45,4 @@ bool(false)
 
 Warning: hash_file(%s): failed to open stream: No such file or directory in %s on line %d
 bool(false)
-
--- Testing hash_file() function with less than expected no. of arguments --
-
-Warning: hash_file() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing hash_file() function with more than expected no. of arguments --
-
-Warning: hash_file() expects at most 3 parameters, 4 given in %s on line %d
-NULL
 ===DONE===
index b833054e8095447abebda9fcc8998a7427c6601f..e5903f126a48ff70864fe2a92e596d580a895293 100644 (file)
@@ -12,13 +12,6 @@ $ikm = 'input key material';
 
 echo "*** Testing hash_hkdf(): error conditions ***\n";
 
-echo "\n-- Testing hash_hkdf() function with less than expected no. of arguments --\n";
-var_dump(hash_hkdf());
-var_dump(hash_hkdf('sha1'));
-
-echo "\n-- Testing hash_hkdf() function with more than expected no. of arguments --\n";
-var_dump(hash_hkdf('sha1', $ikm, 20, '', '', 'extra parameter'));
-
 echo "\n-- Testing hash_hkdf() function with invalid hash algorithm --\n";
 var_dump(hash_hkdf('foo', $ikm));
 
@@ -41,19 +34,6 @@ var_dump(hash_hkdf('sha1', $ikm, 20 * 255 + 1)); // Length can't be more than 25
 --EXPECTF--
 *** Testing hash_hkdf(): error conditions ***
 
--- Testing hash_hkdf() function with less than expected no. of arguments --
-
-Warning: hash_hkdf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: hash_hkdf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing hash_hkdf() function with more than expected no. of arguments --
-
-Warning: hash_hkdf() expects at most 5 parameters, 6 given in %s on line %d
-NULL
-
 -- Testing hash_hkdf() function with invalid hash algorithm --
 
 Warning: hash_hkdf(): Unknown hashing algorithm: foo in %s on line %d
index 89d29b8df8bc0bd17d40e89cc68a883ed2cd9c6e..1ed3e54127416df7f4e1d5d84458b4bc3606bf97 100644 (file)
@@ -12,15 +12,6 @@ echo "*** Testing hash_hmac() : error conditions ***\n";
 $data = "This is a sample string used to test the hash_hmac function with various hashing algorithms";
 $key = 'secret';
 
-echo "\n-- Testing hash_hmac() function with less than expected no. of arguments --\n";
-var_dump(hash_hmac());
-var_dump(hash_hmac('md5'));
-var_dump(hash_hmac('md5', $data));
-
-echo "\n-- Testing hash_hmac() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump(hash_hmac('md5', $data, $key, TRUE, $extra_arg));
-
 echo "\n-- Testing hash_hmac() function with invalid hash algorithm --\n";
 var_dump(hash_hmac('foo', $data, $key));
 
@@ -32,22 +23,6 @@ var_dump(hash_hmac('crc32', $data, $key));
 --EXPECTF--
 *** Testing hash_hmac() : error conditions ***
 
--- Testing hash_hmac() function with less than expected no. of arguments --
-
-Warning: hash_hmac() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: hash_hmac() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: hash_hmac() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing hash_hmac() function with more than expected no. of arguments --
-
-Warning: hash_hmac() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
 -- Testing hash_hmac() function with invalid hash algorithm --
 
 Warning: hash_hmac(): Unknown hashing algorithm: foo in %s on line %d
index 913582500823a7b850a46e7b21ef5c7ac84cd0ef..7ad271b00b1734fa0e48b4fe2b2bfe49dd1171ca 100644 (file)
@@ -54,11 +54,6 @@ echo "whirlpool: " . hash_hmac_file('whirlpool', $file, $key) . "\n";
 echo "md5(raw): " . bin2hex(hash_hmac_file('md5', $file, $key, TRUE)). "\n";
 echo "sha256(raw): " . bin2hex(hash_hmac_file('sha256', $file, $key, TRUE)). "\n";
 
-echo "Error cases:\n";
-hash_hmac_file();
-hash_hmac_file('foo', $file);
-hash_hmac_file('foo', $file, $key, TRUE, 10);
-
 unlink($file);
 
 ?>
@@ -83,11 +78,4 @@ tiger192,3: ca89badf843ba68e3fae5832635aa848a72a4bc11676edd4
 whirlpool: 37a0fbb90547690d5e5e11c046f6654ffdb7bab15e16d9d79c7d85765cc4bdcbfd9df8db7a3ce9558f3f244fead00ca29cf05297f75596555195a0683f15d69f
 md5(raw): 8bddf39dd1c566c27acc7fa85ec36acf
 sha256(raw): 9135286ca4c84dec711e4b831f6cd39e672e5ff93d011321274eb76733cc1e40
-Error cases:
-
-Warning: hash_hmac_file() expects at least 3 parameters, 0 given in %s on line %d
-
-Warning: hash_hmac_file() expects at least 3 parameters, 2 given in %s on line %d
-
-Warning: hash_hmac_file() expects at most 4 parameters, 5 given in %s on line %d
 ===Done===
index 5b82c288ec18ad7e3ffc7138a83947da05b195c9..505d52fef90fbbde39bdd0e9287ab97be0649319 100644 (file)
@@ -14,15 +14,6 @@ echo "*** Testing hash() : error conditions ***\n";
 $file = dirname(__FILE__) . "hash_file.txt";
 $key = 'secret';
 
-echo "\n-- Testing hash_hmac_file() function with less than expected no. of arguments --\n";
-var_dump(hash_hmac_file());
-var_dump(hash_hmac_file('crc32'));
-var_dump(hash_hmac_file('crc32', $file));
-
-echo "\n-- Testing hash_hmac_file() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-hash_hmac_file('crc32', $file, $key, TRUE, $extra_arg);
-
 echo "\n-- Testing hash_hmac_file() function with invalid hash algorithm --\n";
 hash_hmac_file('foo', $file, $key, TRUE);
 
@@ -37,21 +28,6 @@ hash_hmac_file('md5', $file.chr(0).$file, $key, TRUE);
 --EXPECTF--
 *** Testing hash() : error conditions ***
 
--- Testing hash_hmac_file() function with less than expected no. of arguments --
-
-Warning: hash_hmac_file() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: hash_hmac_file() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: hash_hmac_file() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing hash_hmac_file() function with more than expected no. of arguments --
-
-Warning: hash_hmac_file() expects at most 4 parameters, 5 given in %s on line %d
-
 -- Testing hash_hmac_file() function with invalid hash algorithm --
 
 Warning: hash_hmac_file(): Unknown hashing algorithm: foo in %s on line %d
index e941aabca5854c005e66f71e5e783eff608ef763..9105b96801ad19cd68fc8ade1647afdd8daf3af0 100644 (file)
@@ -4,9 +4,6 @@ Hash: hash_init() function - errors test
 <?php
 echo "*** Testing hash_init(): error conditions ***\n";
 
-echo "-- Testing hash_init() function with no parameters --\n";
-var_dump(hash_init());
-
 echo "-- Testing hash_init() function with unknown algorithms --\n";
 var_dump(hash_init('dummy'));
 
@@ -19,10 +16,6 @@ var_dump(hash_init('md5', HASH_HMAC, null));
 ?>
 --EXPECTF--
 *** Testing hash_init(): error conditions ***
--- Testing hash_init() function with no parameters --
-
-Warning: hash_init() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 -- Testing hash_init() function with unknown algorithms --
 
 Warning: hash_init(): Unknown hashing algorithm: dummy in %s on line %d
index c0a76e17b4b6ea8be9bf98952d06f0e4124e5702..a7fd08649bb43b9615a6120001a45063ef4d54bc 100644 (file)
@@ -12,15 +12,6 @@ echo "*** Testing hash_pbkdf2() : error conditions ***\n";
 $password = 'password';
 $salt = 'salt';
 
-echo "\n-- Testing hash_pbkdf2() function with less than expected no. of arguments --\n";
-var_dump(hash_pbkdf2());
-var_dump(hash_pbkdf2('md5'));
-var_dump(hash_pbkdf2('md5', $password));
-var_dump(hash_pbkdf2('md5', $password, $salt));
-
-echo "\n-- Testing hash_pbkdf2() function with more than expected no. of arguments --\n";
-var_dump(hash_pbkdf2('md5', $password, $salt, 10, 10, true, 'extra arg'));
-
 echo "\n-- Testing hash_pbkdf2() function with invalid hash algorithm --\n";
 var_dump(hash_pbkdf2('foo', $password, $salt, 1));
 
@@ -39,25 +30,6 @@ var_dump(hash_pbkdf2('md5', $password, $salt, 1, -1));
 --EXPECTF--
 *** Testing hash_pbkdf2() : error conditions ***
 
--- Testing hash_pbkdf2() function with less than expected no. of arguments --
-
-Warning: hash_pbkdf2() expects at least 4 parameters, 0 given in %s on line %d
-NULL
-
-Warning: hash_pbkdf2() expects at least 4 parameters, 1 given in %s on line %d
-NULL
-
-Warning: hash_pbkdf2() expects at least 4 parameters, 2 given in %s on line %d
-NULL
-
-Warning: hash_pbkdf2() expects at least 4 parameters, 3 given in %s on line %d
-NULL
-
--- Testing hash_pbkdf2() function with more than expected no. of arguments --
-
-Warning: hash_pbkdf2() expects at most 6 parameters, 7 given in %s on line %d
-NULL
-
 -- Testing hash_pbkdf2() function with invalid hash algorithm --
 
 Warning: hash_pbkdf2(): Unknown hashing algorithm: foo in %s on line %d
diff --git a/ext/intl/tests/breakiter_createCodePointInstance_error.phpt b/ext/intl/tests/breakiter_createCodePointInstance_error.phpt
deleted file mode 100644 (file)
index 13adc53..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlBreakIterator::createCodePointInstance(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlBreakIterator::createCodePointInstance(array()));
---EXPECTF--
-Warning: IntlBreakIterator::createCodePointInstance() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::createCodePointInstance(): breakiter_create_code_point_instance: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/breakiter_factories_error.phpt b/ext/intl/tests/breakiter_factories_error.phpt
deleted file mode 100644 (file)
index 4f3a912..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-IntlBreakIterator factory methods: argument errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlBreakIterator::createWordInstance(array()));
-var_dump(IntlBreakIterator::createSentenceInstance(NULL, 2));
-var_dump(IntlBreakIterator::createCharacterInstance(NULL, 2));
-var_dump(IntlBreakIterator::createTitleInstance(NULL, 2));
-var_dump(IntlBreakIterator::createLineInstance(NULL, 2));
---EXPECTF--
-Warning: IntlBreakIterator::createWordInstance() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlBreakIterator::createWordInstance(): breakiter_create_word_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createSentenceInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createSentenceInstance(): breakiter_create_sentence_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createCharacterInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createCharacterInstance(): breakiter_create_character_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createTitleInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createTitleInstance(): breakiter_create_title_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createLineInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createLineInstance(): breakiter_create_line_instance: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/breakiter_first_last_previous_current_error.phpt b/ext/intl/tests/breakiter_first_last_previous_current_error.phpt
deleted file mode 100644 (file)
index da37ffe..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-IntlBreakIterator::first()/last()/previous()/current(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->first(1));
-var_dump($bi->last(1));
-var_dump($bi->previous(1));
-var_dump($bi->current(1));
---EXPECTF--
-Warning: IntlBreakIterator::first() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::first(): breakiter_first: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::last() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::last(): breakiter_last: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::previous() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::previous(): breakiter_previous: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::current() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::current(): breakiter_current: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt b/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
deleted file mode 100644 (file)
index 56ed60f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-IntlBreakIterator::following()/preceding()/isBoundary(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->following(1, 2));
-var_dump($bi->following(array()));
-var_dump($bi->preceding(1, 2));
-var_dump($bi->preceding(array()));
-var_dump($bi->isBoundary(1, 2));
-var_dump($bi->isBoundary(array()));
---EXPECTF--
-Warning: IntlBreakIterator::following() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::following(): breakiter_following: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::following() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::following(): breakiter_following: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::preceding() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::preceding() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::isBoundary() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::isBoundary() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_getLocale_error.phpt b/ext/intl/tests/breakiter_getLocale_error.phpt
deleted file mode 100644 (file)
index f318743..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-IntlBreakIterator::getLocale(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->getLocale(1, 2));
-var_dump($bi->getLocale(array()));
-var_dump($bi->getLocale());
---EXPECTF--
-Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::getLocale() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
-bool(false)
index b7565405785574ba0273a688f3f7c88f8e4df309..506b376c1901b7c456022c0cf20ddc8a5b058d93 100644 (file)
@@ -10,23 +10,11 @@ ini_set("intl.error_level", E_WARNING);
 ini_set("intl.default_locale", "pt_PT");
 
 $it = IntlBreakIterator::createWordInstance(NULL);
-var_dump($it->getPartsIterator(array()));
-var_dump($it->getPartsIterator(1, 2));
 var_dump($it->getPartsIterator(-1));
 
 ?>
 ==DONE==
 --EXPECTF--
-Warning: IntlBreakIterator::getPartsIterator() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::getPartsIterator() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad key type in %s on line %d
 bool(false)
 ==DONE==
diff --git a/ext/intl/tests/breakiter_getText_error.phpt b/ext/intl/tests/breakiter_getText_error.phpt
deleted file mode 100644 (file)
index d66b4bb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-IntlBreakIterator::getText(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}]+;');
-var_dump($bi->getText(array()));
---EXPECTF--
-Warning: IntlBreakIterator::getText() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::getText(): breakiter_get_text: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_next_error.phpt b/ext/intl/tests/breakiter_next_error.phpt
deleted file mode 100644 (file)
index eb46643..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-IntlBreakIterator::next(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->next(1, 2));
-var_dump($bi->next(array()));
---EXPECTF--
-Warning: IntlBreakIterator::next() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::next(): breakiter_next: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::next() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::next(): breakiter_next: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_setText_error.phpt b/ext/intl/tests/breakiter_setText_error.phpt
deleted file mode 100644 (file)
index c94a843..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-IntlBreakIterator::setText(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}]+;');
-var_dump($bi->setText());
-var_dump($bi->setText(array()));
-var_dump($bi->setText(1,2));
-
-class A {
-function __destruct() { var_dump('destructed'); throw new Exception('e'); }
-function __tostring() { return 'foo'; }
-}
-
-try {
-var_dump($bi->setText(new A));
-} catch (Exception $e) {
-var_dump($e->getMessage());
-}
---EXPECTF--
-Warning: IntlBreakIterator::setText() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::setText() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::setText() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
-bool(false)
-string(10) "destructed"
-string(1) "e"
index 017551821d3eb9f3760d0e401fb3c0274538aa65..1fc12828e13d09aca41665b7ceb3067dc88ea47e 100644 (file)
@@ -10,33 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->add(1, 2, 3));
-var_dump($c->add(-1, 2));
-var_dump($c->add(1));
-
-var_dump(intlcal_add($c, 1, 2, 3));
 var_dump(intlcal_add(1, 2, 3));
 --EXPECTF--
-Warning: IntlCalendar::add() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::add(): intlcal_add: invalid field in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::add() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d
-
-Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_add(1, 2, 3)
index 279e3d816e3832431f5c444e476dd442e99c43d2..805f0648417a226ee6a4b5ed6e9a051cc986da9a 100644 (file)
@@ -61,25 +61,18 @@ try {
        echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
 }
 --EXPECT--
-error: 2, IntlCalendar::after() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, IntlCalendar::before() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
-bool(false)
+error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given
+
+error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given
+
 error: 0, Argument 1 passed to IntlCalendar::after() must be an instance of IntlCalendar, int given
 
 error: 0, Argument 1 passed to IntlCalendar::before() must be an instance of IntlCalendar, int given
 
-error: 2, IntlCalendar::after() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, IntlCalendar::before() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, intlcal_after() expects exactly 2 parameters, 1 given
-error: 2, intlcal_after(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, intlcal_before() expects exactly 2 parameters, 1 given
-error: 2, intlcal_before(): intlcal_before/after: bad arguments
-bool(false)
+error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given
+
+error: 0, IntlCalendar::before() expects exactly 1 parameter, 2 given
+
+error: 0, intlcal_after() expects exactly 2 parameters, 1 given
+
+error: 0, intlcal_before() expects exactly 2 parameters, 1 given
index bffa103eac7b5d14e5a8d171b96a5504644185fe..e91b7a6326aa6776f54ef889564b87adc6eea0e4 100644 (file)
@@ -12,17 +12,11 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->clear(1, 2));
 var_dump($c->clear(-1));
 
 var_dump(intlcal_clear($c, -1));
 var_dump(intlcal_clear(1, 2));
 --EXPECTF--
-Warning: IntlCalendar::clear() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::clear(): intlcal_clear: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d
 bool(false)
 
index 5cb9fa1c63487ff2b99238e6ad29fd36d9202b5f..516cc9260eae59a6b0d43b004f11a76fbbf20be1 100644 (file)
@@ -12,25 +12,7 @@ class X extends IntlTimeZone {
 function __construct() {}
 }
 
-var_dump(IntlCalendar::createInstance(1, 2, 3));
-var_dump(intlcal_create_instance(1, 2, 3));
 var_dump(intlcal_create_instance(new X, NULL));
-var_dump(intlcal_create_instance(NULL, array()));
 --EXPECTF--
-Warning: IntlCalendar::createInstance() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::createInstance(): intlcal_create_calendar: bad arguments in %s on line %d
-NULL
-
-Warning: intlcal_create_instance() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: intlcal_create_instance(): intlcal_create_calendar: bad arguments in %s on line %d
-NULL
-
 Warning: intlcal_create_instance(): intlcal_create_instance: passed IntlTimeZone is not properly constructed in %s on line %d
 NULL
-
-Warning: intlcal_create_instance() expects parameter 2 to be string, array given in %s on line %d
-
-Warning: intlcal_create_instance(): intlcal_create_calendar: bad arguments in %s on line %d
-NULL
index 4c585a6018bef2b6c8cd86861dab7f82946a1fc8..d716c1a698d33c491795fba61eb5568f4fa9b1b1 100644 (file)
@@ -45,9 +45,8 @@ try {
        echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
 }
 --EXPECT--
-error: 2, IntlCalendar::equals() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
-bool(false)
+error: 0, IntlCalendar::equals() expects exactly 1 parameter, 0 given
+
 error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given
 
 error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, int given
index 4f3fc351cb1d203db382faac453639ed2773abb2..fa8860534874ec5d86ea3cd781d6a0d84e930ba9 100644 (file)
@@ -12,30 +12,25 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->fieldDifference($c, 2, 3));
+try {
+    var_dump($c->fieldDifference($c, 2, 3));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($c->fieldDifference(INF, 2));
-var_dump($c->fieldDifference(1));
 
-var_dump(intlcal_field_difference($c, 0, 1, 2));
+try {
+    var_dump(intlcal_field_difference($c, 0, 1, 2));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(intlcal_field_difference(1, 0, 1));
 --EXPECTF--
-Warning: IntlCalendar::fieldDifference() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: bad arguments in %s on line %d
-bool(false)
+IntlCalendar::fieldDifference() expects exactly 2 parameters, 3 given
 
 Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in %s on line %d
 bool(false)
-
-Warning: IntlCalendar::fieldDifference() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_field_difference() expects exactly 3 parameters, 4 given in %s on line %d
-
-Warning: intlcal_field_difference(): intlcal_field_difference: bad arguments in %s on line %d
-bool(false)
+intlcal_field_difference() expects exactly 3 parameters, 4 given
 
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
index 1074159687bb6521a0b378a08ea719c409a6653d..6fbaeb57f89a646cc146df0e4a1f54382149c41d 100644 (file)
@@ -10,13 +10,10 @@ ini_set("intl.error_level", E_WARNING);
 ini_set("intl.default_locale", "nl");
 date_default_timezone_set('Europe/Lisbon');
 
-var_dump(IntlCalendar::fromDateTime());
-var_dump(IntlCalendar::fromDateTime(0,1,2));
-
 try {
-IntlCalendar::fromDateTime("foobar");
+    IntlCalendar::fromDateTime("foobar");
 } catch (Exception $e) {
-       echo "threw exception, OK";
+    echo "threw exception, OK";
 }
 class A extends DateTime {
 function __construct() {}
@@ -29,18 +26,7 @@ var_dump(IntlCalendar::fromDateTime($date));
 
 $date = new DateTime('2012-01-01 00:00:00 WEST');
 var_dump(IntlCalendar::fromDateTime($date));
-
-var_dump(intlcal_from_date_time());
 --EXPECTF--
-Warning: IntlCalendar::fromDateTime() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: bad arguments in %s on line %d
-NULL
-
-Warning: IntlCalendar::fromDateTime() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: bad arguments in %s on line %d
-NULL
 threw exception, OK
 Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: DateTime object is unconstructed in %s on line %d
 NULL
@@ -50,8 +36,3 @@ NULL
 
 Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
 NULL
-
-Warning: intlcal_from_date_time() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: intlcal_from_date_time(): intlcal_from_date_time: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/calendar_getAvailableLocales_error.phpt b/ext/intl/tests/calendar_getAvailableLocales_error.phpt
deleted file mode 100644 (file)
index 3aee500..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-IntlCalendar::getAvailableLocales(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(intlcal_get_available_locales(1));
-var_dump(IntlCalendar::getAvailableLocales(2));
---EXPECTF--
-Warning: intlcal_get_available_locales() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_available_locales(): intlcal_get_available_locales: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getAvailableLocales() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getAvailableLocales(): intlcal_get_available_locales: bad arguments in %s on line %d
-bool(false)
index 46fe17d9cdf649e78fc2258c175d27b3d56e94c6..2722f540521f7a136c898104febf2bc98839094f 100644 (file)
@@ -12,31 +12,13 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->getDayOfWeekType(1, 2));
 var_dump($c->getDayOfWeekType(0));
-var_dump($c->getDayOfWeekType());
 
-var_dump(intlcal_get_day_of_week_type($c, "foo"));
 var_dump(intlcal_get_day_of_week_type(1, 1));
 --EXPECTF--
-Warning: IntlCalendar::getDayOfWeekType() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: invalid day of week in %s on line %d
 bool(false)
 
-Warning: IntlCalendar::getDayOfWeekType() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_day_of_week_type() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: intlcal_get_day_of_week_type(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_day_of_week_type(1, 1)
index fd999fbbbf4cff21e8573e2069dea874a2ca59db..56e748fa129083d94bb190138f93a5912ef53815 100644 (file)
@@ -10,17 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getErrorCode(array()));
-
 var_dump(intlcal_get_error_code(null));
 --EXPECTF--
-Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_error_code(NULL)
index cc52449d9431f0b866652376b4390267a8784bb5..8cdbb1f34b13bebbc146dfb710c9ce355387566e 100644 (file)
@@ -10,17 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getErrorMessage(array()));
-
 var_dump(intlcal_get_error_message(null));
 --EXPECTF--
-Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_error_message(NULL)
index ca2dc4a9f23e969f4ae88c9ba74fa1c6cbc23faf..68e0fd9074842c7b742228c6ec8b9a579b82314f 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getFirstDayOfWeek(1));
-
-var_dump(intlcal_get_first_day_of_week($c, 1));
 var_dump(intlcal_get_first_day_of_week(1));
 --EXPECTF--
-Warning: IntlCalendar::getFirstDayOfWeek() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getFirstDayOfWeek(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_first_day_of_week() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_first_day_of_week(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_first_day_of_week(1)
diff --git a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt b/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
deleted file mode 100644 (file)
index 717c435..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-IntlCalendar::getKeywordValuesForLocale(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(intlcal_get_keyword_values_for_locale(1, 2));
-var_dump(IntlCalendar::getKeywordValuesForLocale(1, 2, array()));
---EXPECTF--
-Warning: intlcal_get_keyword_values_for_locale() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: intlcal_get_keyword_values_for_locale(): intlcal_get_keyword_values_for_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getKeywordValuesForLocale() expects parameter 3 to be bool, array given in %s on line %d
-
-Warning: IntlCalendar::getKeywordValuesForLocale(): intlcal_get_keyword_values_for_locale: bad arguments in %s on line %d
-bool(false)
index 008e1b756e6d4a675c50015d661afad77cd8a51b..c033d82cf348968f8f570f81ba3bb96a45bcab26 100644 (file)
@@ -10,33 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getLocale());
-var_dump($c->getLocale(2));
-var_dump($c->getLocale(2, 3));
-
-var_dump(intlcal_get_locale($c));
 var_dump(intlcal_get_locale(1));
 --EXPECTF--
-Warning: IntlCalendar::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getLocale(): intlcal_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getLocale(): intlcal_get_locale: invalid locale type in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getLocale(): intlcal_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_locale(): intlcal_get_locale: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_locale(1)
index a1190e5ce04171797ff417e91c5fa2f82ceccfdf..fe3825ad6846e3823cbd92b63ba855baa57e7c88 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getMinimalDaysInFirstWeek(1));
-
-var_dump(intlcal_get_minimal_days_in_first_week($c, 1));
 var_dump(intlcal_get_minimal_days_in_first_week(1));
 --EXPECTF--
-Warning: IntlCalendar::getMinimalDaysInFirstWeek() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getMinimalDaysInFirstWeek(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_minimal_days_in_first_week() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_minimal_days_in_first_week(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_minimal_days_in_first_week(1)
diff --git a/ext/intl/tests/calendar_getNow_error.phpt b/ext/intl/tests/calendar_getNow_error.phpt
deleted file mode 100644 (file)
index 712e210..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-IntlCalendar::getNow(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(intlcal_get_now(1));
-var_dump(IntlCalendar::getNow(2));
---EXPECTF--
-Warning: intlcal_get_now() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_now(): intlcal_get_now: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getNow() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getNow(): intlcal_get_now: bad arguments in %s on line %d
-bool(false)
index 06aa679c5ae61c871b7b90e8efd602d15a06c567..57eca0996e85aa87ef0746f92035b878611e3880 100644 (file)
@@ -10,36 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getSkippedWallTimeOption(1));
-var_dump($c->getRepeatedWallTimeOption(1));
-
-var_dump(intlcal_get_skipped_wall_time_option($c, 1));
-var_dump(intlcal_get_repeated_wall_time_option($c, 1));
-
 var_dump(intlcal_get_skipped_wall_time_option(1));
 --EXPECTF--
-Warning: IntlCalendar::getSkippedWallTimeOption() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getSkippedWallTimeOption(): intlcal_get_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getRepeatedWallTimeOption() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getRepeatedWallTimeOption(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_skipped_wall_time_option() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_skipped_wall_time_option(): intlcal_get_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_repeated_wall_time_option() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_repeated_wall_time_option(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_skipped_wall_time_option(1)
index ea7e85db4c106ed2922ca684e6a2ad07b2f99973..f78d93f454a689e609b074d60bdd8c7c5aab2d7a 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getTimeZone(1));
-
-var_dump(intlcal_get_time_zone($c, 1));
 var_dump(intlcal_get_time_zone(1));
 --EXPECTF--
-Warning: IntlCalendar::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getTimeZone(): intlcal_get_time_zone: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_time_zone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_time_zone(): intlcal_get_time_zone: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_time_zone(1)
index 61eaea97dc0cdcdb1e26a072eef1114253390594..51cb0cfe7e8bef03f0927a4213b52f6840fad89a 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getTime(1));
-
-var_dump(intlcal_get_time($c, 1));
 var_dump(intlcal_get_time(1));
 --EXPECTF--
-Warning: IntlCalendar::getTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getTime(): intlcal_get_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_time() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_time(): intlcal_get_time: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_time(1)
index c124151893d27e78a27ebb42df37b27d0c6f0132..abc5f17fdd89971ef351743c39808362d47d5f7b 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getType(1));
-
-var_dump(intlcal_get_type($c, 1));
 var_dump(intlcal_get_type(1));
 --EXPECTF--
-Warning: IntlCalendar::getType() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getType(): intlcal_get_type: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_type() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_type(): intlcal_get_type: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_type(1)
index d61c9d5a25233e8d88964c5a8af02da957003f20..f6a4a71c18c143acc84e8fcb242d63004c6519a8 100644 (file)
@@ -11,32 +11,13 @@ if (!extension_loaded('intl'))
 ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getWeekendTransition());
-var_dump($c->getWeekendTransition(1, 2));
 var_dump($c->getWeekendTransition(0));
 
-var_dump(intlcal_get_weekend_transition($c));
 var_dump(intlcal_get_weekend_transition(1, 1));
 --EXPECTF--
-Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d
 bool(false)
 
-Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_get_weekend_transition(1, 1)
index 6c6f67f95397ed9fb3447f976674339a495a19e9..9612862119118dcafc0099a5f0747b591d073de6 100644 (file)
@@ -12,11 +12,6 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->getLeastMaximum());
-var_dump($c->getMaximum());
-var_dump($c->getGreatestMinimum());
-var_dump($c->getMinimum());
-
 var_dump($c->getLeastMaximum(-1));
 var_dump($c->getMaximum(-1));
 var_dump($c->getGreatestMinimum(-1));
@@ -53,26 +48,6 @@ try {
        echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
 }
 --EXPECTF--
-Warning: IntlCalendar::getLeastMaximum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getLeastMaximum(): intlcal_get_least_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getMaximum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getMaximum(): intlcal_get_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getGreatestMinimum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getGreatestMinimum(): intlcal_get_greatest_minimum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getMinimum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getMinimum(): intlcal_get_minimum: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::getLeastMaximum(): intlcal_get_least_maximum: invalid field in %s on line %d
 bool(false)
 
index d7d20ed6cd9e803b6f47842eb8e527ee05af63cc..3853d612a3358873cdcece823d63a6af685437cb 100644 (file)
@@ -12,37 +12,12 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->get());
-var_dump($c->getActualMaximum());
-var_dump($c->getActualMinimum());
-
 var_dump($c->get(-1));
 var_dump($c->getActualMaximum(-1));
 var_dump($c->getActualMinimum(-1));
 
-var_dump($c->get("s"));
-var_dump($c->getActualMaximum("s"));
-var_dump($c->getActualMinimum("s"));
-
-var_dump($c->get(1, 2));
-var_dump($c->getActualMaximum(1, 2));
-var_dump($c->getActualMinimum(1, 2));
+?>
 --EXPECTF--
-Warning: IntlCalendar::get() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMaximum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMinimum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::get(): intlcal_get: invalid field in %s on line %d
 bool(false)
 
@@ -51,33 +26,3 @@ bool(false)
 
 Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: invalid field in %s on line %d
 bool(false)
-
-Warning: IntlCalendar::get() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMaximum() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMinimum() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::get() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMaximum() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMinimum() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
-bool(false)
index 37e3816fefcf9da20bfb8908100aee5209057882..98408a4327259faf107da465c764938bea3182ac 100644 (file)
@@ -81,30 +81,24 @@ try {
        echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
 }
 --EXPECT--
-error: 2, intlcal_get() expects exactly 2 parameters, 1 given
-error: 2, intlcal_get(): intlcal_get: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given
-error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given
-error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
-bool(false)
+error: 0, intlcal_get() expects exactly 2 parameters, 1 given
+
+error: 0, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given
+
+error: 0, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given
+
 error: 2, intlcal_get(): intlcal_get: invalid field
 bool(false)
 error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: invalid field
 bool(false)
 error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: invalid field
 bool(false)
-error: 2, intlcal_get() expects parameter 2 to be int, string given
-error: 2, intlcal_get(): intlcal_get: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_maximum() expects parameter 2 to be int, string given
-error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_minimum() expects parameter 2 to be int, string given
-error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
-bool(false)
+error: 0, intlcal_get() expects parameter 2 to be int, string given
+
+error: 0, intlcal_get_actual_maximum() expects parameter 2 to be int, string given
+
+error: 0, intlcal_get_actual_minimum() expects parameter 2 to be int, string given
+
 error: 0, Argument 1 passed to intlcal_get() must be an instance of IntlCalendar, int given
 
 error: 0, Argument 1 passed to intlcal_get_actual_maximum() must be an instance of IntlCalendar, int given
index 6644f477ea12946993750ca048e0caa770a04e74..bbcfcaabb1b5ce52f7e8771775ddc2a884203870 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->inDaylightTime(1));
-
-var_dump(intlcal_in_daylight_time($c, 1));
 var_dump(intlcal_in_daylight_time(1));
 --EXPECTF--
-Warning: IntlCalendar::inDaylightTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::inDaylightTime(): intlcal_in_daylight_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_in_daylight_time() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_in_daylight_time(): intlcal_in_daylight_time: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_in_daylight_time(1)
index c7e30fd64561bb2ce5728beb00a28deb93797433..254d1dab84639e14eef6bc570c6f3481b0a0a757 100644 (file)
@@ -51,14 +51,12 @@ try {
 --EXPECT--
 error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, int given
 
-error: 2, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::isEquivalentTo(): intlcal_is_equivalent_to: bad arguments
-bool(false)
+error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given
+
 error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, int given
 
-error: 2, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given
-error: 2, intlcal_is_equivalent_to(): intlcal_is_equivalent_to: bad arguments
-bool(false)
+error: 0, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given
+
 error: 0, Argument 2 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, int given
 
 error: 0, Argument 1 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, int given
index 263d82bb376df753b651b4c2f216e04824723739..6fec30734990a072776f189c3549fb9bd949b7cd 100644 (file)
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->isLenient(1));
-
-var_dump(intlcal_is_lenient($c, 1));
 var_dump(intlcal_is_lenient(1));
 --EXPECTF--
-Warning: IntlCalendar::isLenient() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::isLenient(): intlcal_is_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_is_lenient() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_is_lenient(): intlcal_is_lenient: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_is_lenient(1)
index 7e5b2beaa6b1bc5ec7bd46e3c6f929512a9eeab9..9cb266f7422627bb3e7a4365f71b15c363bd8c63 100644 (file)
@@ -12,31 +12,13 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->isSet());
-var_dump($c->isSet(1, 2));
 var_dump($c->isSet(-1));
 
-var_dump(intlcal_is_set($c));
 var_dump(intlcal_is_set(1, 2));
 --EXPECTF--
-Warning: IntlCalendar::isSet() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::isSet(): intlcal_is_set: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::isSet() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::isSet(): intlcal_is_set: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::isSet(): intlcal_is_set: invalid field in %s on line %d
 bool(false)
 
-Warning: intlcal_is_set() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_is_set(): intlcal_is_set: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_is_set(1, 2)
index c1f8180fa3339c25f0438cf860b35c81a10ea017..de40b2aee691d070ecfeb30e53fef8117e632e20 100644 (file)
@@ -10,29 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->isWeekend(1, 2));
-var_dump($c->isWeekend("jhhk"));
-
-var_dump(intlcal_is_weekend($c, "jj"));
 var_dump(intlcal_is_weekend(1));
 --EXPECTF--
-Warning: IntlCalendar::isWeekend() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::isWeekend() expects parameter 1 to be float, string given in %s on line %d
-
-Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_is_weekend() expects parameter 2 to be float, string given in %s on line %d
-
-Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_is_weekend(1)
index 27160ee8ca5f2620e10500c5321e4e981b4205ae..bc00896d8b8f202b3199eff967acd363c1f695c2 100644 (file)
@@ -12,27 +12,13 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->roll(1, 2, 3));
 var_dump($c->roll(-1, 2));
-var_dump($c->roll(1));
 
-var_dump(intlcal_roll($c, 1, 2, 3));
 var_dump(intlcal_roll(1, 2, 3));
 --EXPECTF--
-Warning: IntlCalendar::roll(): intlcal_set: too many arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::roll(): intlcal_roll: invalid field in %s on line %d
 bool(false)
 
-Warning: IntlCalendar::roll() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::roll(): intlcal_roll: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_roll(): intlcal_set: too many arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_roll(1, 2, 3)
index a22c3b28427dbbe5bb22daf602e3db5cb04dcd08..6dcff918a782cbf6e70ca5909dc88daf98fd8aba 100644 (file)
@@ -12,23 +12,11 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->setFirstDayOfWeek());
-var_dump($c->setFirstDayOfWeek(1, 2));
 var_dump($c->setFirstDayOfWeek(0));
 
 var_dump(intlcal_set_first_day_of_week($c, 0));
 var_dump(intlcal_set_first_day_of_week(1, 2));
 --EXPECTF--
-Warning: IntlCalendar::setFirstDayOfWeek() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setFirstDayOfWeek() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d
 bool(false)
 
index b2a6f25d5d66b326bb77068187240d1b417106e0..2d73857c2b404013f60ee69a8d996f5ad954f738 100644 (file)
@@ -10,35 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->setLenient());
-var_dump($c->setLenient(array()));
-var_dump($c->setLenient(1, 2));
-
-var_dump(intlcal_set_lenient($c, array()));
 var_dump(intlcal_set_lenient(1, false));
 --EXPECTF--
-Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setLenient() expects parameter 1 to be bool, array given in %s on line %d
-
-Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_set_lenient() expects parameter 2 to be bool, array given in %s on line %d
-
-Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_set_lenient(1, false)
index 48d18bf28dce67fb98c230c4a438f5be5a86a7b2..430fc953bd759202b88c436ed975512c242e92aa 100644 (file)
@@ -12,23 +12,11 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->setMinimalDaysInFirstWeek());
-var_dump($c->setMinimalDaysInFirstWeek(1, 2));
 var_dump($c->setMinimalDaysInFirstWeek(0));
 
 var_dump(intlcal_set_minimal_days_in_first_week($c, 0));
 var_dump(intlcal_set_minimal_days_in_first_week(1, 2));
 --EXPECTF--
-Warning: IntlCalendar::setMinimalDaysInFirstWeek() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setMinimalDaysInFirstWeek(): intlcal_set_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setMinimalDaysInFirstWeek() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setMinimalDaysInFirstWeek(): intlcal_set_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::setMinimalDaysInFirstWeek(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d
 bool(false)
 
index 776cb8b8250be4a73df3f2ea9e7ba2cf4a08db86..e3d03815dc9feda8ffc0575d39c3ec1ba136cf51 100644 (file)
@@ -12,69 +12,17 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->setSkippedWallTimeOption());
-var_dump($c->setRepeatedWallTimeOption());
-
-var_dump($c->setSkippedWallTimeOption(1, 2));
-var_dump($c->setRepeatedWallTimeOption(1, 2));
-
-var_dump($c->setSkippedWallTimeOption(array()));
-var_dump($c->setRepeatedWallTimeOption(array()));
-
 var_dump($c->setSkippedWallTimeOption(3));
 var_dump($c->setRepeatedWallTimeOption(2));
 
-var_dump(intlcal_set_skipped_wall_time_option($c));
-var_dump(intlcal_set_repeated_wall_time_option($c));
-
 var_dump(intlcal_set_repeated_wall_time_option(1, 1));
 --EXPECTF--
-Warning: IntlCalendar::setSkippedWallTimeOption() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setRepeatedWallTimeOption() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setSkippedWallTimeOption() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setRepeatedWallTimeOption() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setSkippedWallTimeOption() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setRepeatedWallTimeOption() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: invalid option in %s on line %d
 bool(false)
 
 Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: invalid option in %s on line %d
 bool(false)
 
-Warning: intlcal_set_skipped_wall_time_option() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_set_skipped_wall_time_option(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_set_repeated_wall_time_option() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_set_repeated_wall_time_option(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1)
index dee773d377e0da7f90516943248c1fad0a3500f0..1cace3b4eaa4436a6ac108685d7b036429140877 100644 (file)
@@ -41,13 +41,10 @@ try{
        echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
 }
 --EXPECT--
-error: 2, IntlCalendar::setTimeZone() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::setTimeZone(): intlcal_set_time_zone: bad arguments
-bool(false)
-error: 2, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::setTimeZone(): intlcal_set_time_zone: bad arguments
-bool(false)
-error: 2, intlcal_set_time_zone() expects exactly 2 parameters, 3 given
-error: 2, intlcal_set_time_zone(): intlcal_set_time_zone: bad arguments
-bool(false)
+error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 2 given
+
+error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given
+
+error: 0, intlcal_set_time_zone() expects exactly 2 parameters, 3 given
+
 error: 0, Argument 1 passed to intlcal_set_time_zone() must be an instance of IntlCalendar, int given
index d3fa46c5919b8948189e7451bd8d523a171a2eda..6ecbd698bf96dc70ccdd810bb64df6dbf24bdb15 100644 (file)
@@ -10,29 +10,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->setTime(1, 2));
-var_dump($c->setTime("jjj"));
-
-var_dump(intlcal_set_time($c, 1, 2));
 var_dump(intlcal_set_time(1));
 --EXPECTF--
-Warning: IntlCalendar::setTime() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setTime() expects parameter 1 to be float, string given in %s on line %d
-
-Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlcal_set_time(1)
index 5827ad41ec4a99edb2c9285a83332a1711f18490..2116786d322b0108599d06926e0d02589eb11c67 100644 (file)
@@ -12,22 +12,12 @@ ini_set("intl.error_level", E_WARNING);
 
 $c = new IntlGregorianCalendar(NULL, 'pt_PT');
 
-var_dump($c->set(1));
-var_dump($c->set(1, 2, 3, 4));
 var_dump($c->set(1, 2, 3, 4, 5, 6, 7));
 var_dump($c->set(-1, 2));
 
 var_dump(intlcal_set($c, -1, 2));
 var_dump(intlcal_set(1, 2, 3));
 --EXPECTF--
-Warning: IntlCalendar::set() expects at least 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::set(): intlcal_set: too many arguments in %s on line %d
 bool(false)
 
index 584bd28f65ea361bc04d2bcedc42a43c14088058..e251c501b6084254c0cb440faf4c371b54468cce 100644 (file)
@@ -9,11 +9,6 @@ if (!extension_loaded('intl'))
 ini_set("intl.error_level", E_WARNING);
 ini_set('date.timezone', 'Europe/Lisbon');
 
-$cal = new IntlGregorianCalendar();
-var_dump($cal->toDateTime(3));
-
-var_dump(intlcal_to_date_time($cal, 3));
-
 $cal = new IntlGregorianCalendar("Etc/Unknown");
 try {
 var_dump($cal->toDateTime());
@@ -23,16 +18,6 @@ var_dump("exception: {$e->getMessage()}");
 
 var_dump(intlcal_to_date_time(3));
 --EXPECTF--
-Warning: IntlCalendar::toDateTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_to_date_time() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_to_date_time(): intlcal_to_date_time: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d
 string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
 
diff --git a/ext/intl/tests/cpbi_getLastCodePoint_error.phpt b/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
deleted file mode 100644 (file)
index 505a076..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-IntlBreakIterator::getLastCodePoint(): bad args
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$it = IntlBreakIterator::createCodePointInstance();
-var_dump($it->getLastCodePoint(array()));
---EXPECTF--
-Warning: IntlCodePointBreakIterator::getLastCodePoint() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCodePointBreakIterator::getLastCodePoint(): cpbi_get_last_code_point: bad arguments in %s on line %d
-bool(false)
index bfcc951b73c8e679f916baeb62b47c9040bbc9f0..24be090035841c06b84a4e041afb3ec53a790b07 100644 (file)
@@ -10,8 +10,6 @@ ini_set("intl.error_level", E_WARNING);
 ini_set("intl.default_locale", "pt_PT");
 ini_set("date.timezone", "Europe/Lisbon");
 
-var_dump(IntlDateFormatter::formatObject());
-var_dump(IntlDateFormatter::formatObject(1));
 var_dump(IntlDateFormatter::formatObject(new stdclass));
 
 class A extends IntlCalendar {function __construct(){}}
@@ -26,17 +24,10 @@ var_dump(IntlDateFormatter::formatObject($cal, array(1,2,3)));
 var_dump(IntlDateFormatter::formatObject($cal, array(array(), 1)));
 var_dump(IntlDateFormatter::formatObject($cal, array(1, -2)));
 var_dump(IntlDateFormatter::formatObject($cal, ""));
-var_dump(IntlDateFormatter::formatObject($cal, "YYYY", array()));
 
 ?>
 ==DONE==
 --EXPECTF--
-Warning: IntlDateFormatter::formatObject() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: IntlDateFormatter::formatObject() expects parameter 1 to be object, int given in %s on line %d
-bool(false)
-
 Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTime in %s on line %d
 bool(false)
 
@@ -65,7 +56,4 @@ bool(false)
 
 Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the format is empty in %s on line %d
 bool(false)
-
-Warning: IntlDateFormatter::formatObject() expects parameter 3 to be string, array given in %s on line %d
-bool(false)
 ==DONE==
diff --git a/ext/intl/tests/dateformat_getCalendarObject_error.phpt b/ext/intl/tests/dateformat_getCalendarObject_error.phpt
deleted file mode 100644 (file)
index d5a7833..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-IntlDateFormatter::getCalendarObject(): bad args
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-ini_set("intl.default_locale", "pt_PT");
-ini_set("date.timezone", 'Atlantic/Azores');
-
-$df = new IntlDateFormatter(NULL, 0, 0);
-
-var_dump($df->getCalendarObject(9));
-var_dump(datefmt_get_calendar_object($df, 9));
-var_dump(datefmt_get_calendar_object($df, 9));
-var_dump(datefmt_get_calendar_object(new stdclass));
-
-?>
-==DONE==
---EXPECTF--
-Warning: IntlDateFormatter::getCalendarObject() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlDateFormatter::getCalendarObject(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_calendar_object() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
-
-Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-==DONE==
diff --git a/ext/intl/tests/dateformat_getTimeZone_error.phpt b/ext/intl/tests/dateformat_getTimeZone_error.phpt
deleted file mode 100644 (file)
index d2ab92d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-IntlDateFormatter::getTimeZone(): bad args
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-ini_set("intl.default_locale", "pt_PT");
-ini_set("date.timezone", 'Atlantic/Azores');
-
-$df = new IntlDateFormatter(NULL, 0, 0);
-
-var_dump($df->getTimeZone(9));
-var_dump(datefmt_get_timezone($df, 9));
-var_dump(datefmt_get_timezone($df, 9));
-var_dump(datefmt_get_timezone(new stdclass));
-
-?>
-==DONE==
---EXPECTF--
-Warning: IntlDateFormatter::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlDateFormatter::getTimeZone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
-
-Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-==DONE==
index b58d1590889581380737d2076d2aa1a790a2b66d..e5ba5509108021a5a0524e928846434fbcf38486 100644 (file)
@@ -12,41 +12,17 @@ ini_set("date.timezone", 'Atlantic/Azores');
 
 $df = new IntlDateFormatter(NULL, 0, 0);
 
-var_dump($df->setTimeZone());
-var_dump(datefmt_set_timezone());
 var_dump($df->setTimeZone(array()));
-var_dump($df->setTimeZone(1, 2));
 var_dump($df->setTimeZone('non existing timezone'));
-var_dump(datefmt_set_timezone(new stdclass, 'UTC'));
 
 ?>
 ==DONE==
 --EXPECTF--
-Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_set_timezone() expects exactly 2 parameters, 0 given in %s on line %d
-
-Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
-
 Notice: Array to string conversion in %s on line %d
 
 Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'Array' in %s on line %d
 bool(false)
 
-Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
-
 Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'non existing timezone' in %s on line %d
 bool(false)
-
-Warning: datefmt_set_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
-
-Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
 ==DONE==
index 9cfc6f505426d8814e038f2bf8d1a1399dd39bad..0a8d7f398b2ee40315698a3d71ea3aa1401b5ae9 100644 (file)
@@ -27,10 +27,20 @@ function crt($t, $l, $s) {
                        }
                        break;
                case $t == "C":
-                       return NumberFormatter::create($l, $s);
+                       try {
+                               return NumberFormatter::create($l, $s);
+                       } catch (Throwable $e) {
+                               print_exception($e);
+                               return null;
+                       }
                        break;
                case $t == "P":
-                       return numfmt_create($l, $s);
+                       try {
+                               return numfmt_create($l, $s);
+                       } catch (Throwable $e) {
+                               print_exception($e);
+                               return null;
+                       }
                        break;
        }
 }
@@ -50,9 +60,19 @@ try {
        $fmt = null;
 }
 err($fmt);
-$fmt = numfmt_create();
+try {
+       $fmt = numfmt_create();
+} catch (TypeError $e) {
+       print_exception($e);
+       $fmt = null;
+}
 err($fmt);
-$fmt = NumberFormatter::create();
+try {
+       $fmt = NumberFormatter::create();
+} catch (TypeError $e) {
+       print_exception($e);
+       $fmt = null;
+}
 err($fmt);
 
 foreach($args as $arg) {
@@ -67,34 +87,34 @@ foreach($args as $arg) {
 ?>
 --EXPECTF--
 ArgumentCountError: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
 
-Warning: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
 
-Warning: NumberFormatter::create() expects at least 2 parameters, 0 given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: NumberFormatter::create() expects at least 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
 
-IntlException: Constructor failed in %sformatter_fail.php on line %d
+IntlException: Constructor failed in %s on line %d
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 
 TypeError: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
 
-Warning: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
 
-Warning: numfmt_create() expects parameter 1 to be string, array given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: numfmt_create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
 
-IntlException: Constructor failed in %sformatter_fail.php on line %d
+IntlException: Constructor failed in %s on line %d
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 
-IntlException: Constructor failed in %sformatter_fail.php on line %d
+IntlException: Constructor failed in %s on line %d
 'numfmt_create: number formatter creation failed: U_MEMORY_ALLOCATION_ERROR'
 'numfmt_create: number formatter creation failed: U_MEMORY_ALLOCATION_ERROR'
 'numfmt_create: number formatter creation failed: U_MEMORY_ALLOCATION_ERROR'
index a1cfb593d75281fb6cc8f996d07866b42410b843..3353690d1cc2c1dec42e9808f28beb1d6787aba5 100644 (file)
@@ -10,22 +10,10 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->getGregorianChange(1));
-
-var_dump(intlgregcal_get_gregorian_change($c, 1));
 var_dump(intlgregcal_get_gregorian_change(1));
---EXPECTF--
-Warning: IntlGregorianCalendar::getGregorianChange() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlGregorianCalendar::getGregorianChange(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_get_gregorian_change() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlgregcal_get_gregorian_change(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
-bool(false)
 
+?>
+--EXPECTF--
 Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlgregcal_get_gregorian_change(1)
index 9da5aaf4188f0b5bba92eca4a431ebba98ae600c..701e643e00d8fb92876311996ae6e084d90b990f 100644 (file)
@@ -10,40 +10,10 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->isLeapYear(2000, 2011));
-var_dump($c->isLeapYear());
-var_dump($c->isLeapYear("fgdf"));
-
-var_dump(intlgregcal_is_leap_year($c, 1, 2));
-var_dump(intlgregcal_is_leap_year($c));
 var_dump(intlgregcal_is_leap_year(1, 2));
---EXPECTF--
-Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::isLeapYear() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
 
+?>
+--EXPECTF--
 Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, int given in %s:%d
 Stack trace:
 #0 %s(%d): intlgregcal_is_leap_year(1, 2)
diff --git a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
deleted file mode 100644 (file)
index 0dd2780..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
---TEST--
-IntlGregorianCalendar::setGregorianChange(): bad arguments
---INI--
-date.timezone=Atlantic/Azores
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$c = new IntlGregorianCalendar();
-var_dump($c->setGregorianChange());
-var_dump($c->setGregorianChange(1, 2));
-var_dump($c->setGregorianChange("sdfds"));
-
-var_dump(intlgregcal_set_gregorian_change($c));
-var_dump(intlgregcal_set_gregorian_change(1, 4.));
---EXPECTF--
-Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::setGregorianChange() expects parameter 1 to be float, string given in %s on line %d
-
-Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, int given in %s:%d
-Stack trace:
-#0 %s(%d): intlgregcal_set_gregorian_change(1, 4)
-#1 {main}
-  thrown in %s on line %d
index 55d2d56215d6826f1bc0062d9636709e50112b37..e468e8caf886f98174bd965cd85b05a0ecef0e70 100644 (file)
@@ -11,10 +11,6 @@ IDN UTS #46 API error tests
 ini_set("intl.error_level", E_WARNING);
 echo "=> PHP level errors", "\n";
 
-echo "bad args:", "\n";
-var_dump(idn_to_ascii("", 0, array()));
-var_dump(idn_to_ascii("", 0, INTL_IDNA_VARIANT_UTS46, $foo, null));
-
 echo "bad variant:", "\n";
 var_dump(idn_to_ascii("", 0, INTL_IDNA_VARIANT_UTS46 + 10));
 
@@ -36,19 +32,10 @@ var_dump(idn_to_ascii(
                INTL_IDNA_VARIANT_UTS46, $foo));
 var_dump($foo);
 var_dump($foo["errors"]==IDNA_ERROR_CONTEXTJ);
+
+?>
 --EXPECTF--
 => PHP level errors
-bad args:
-
-Warning: idn_to_ascii() expects parameter 3 to be int, array given in %s on line %d
-
-Warning: idn_to_ascii(): idn_to_ascii: bad arguments in %s on line %d
-NULL
-
-Warning: idn_to_ascii() expects at most 4 parameters, 5 given in %s on line %d
-
-Warning: idn_to_ascii(): idn_to_ascii: bad arguments in %s on line %d
-NULL
 bad variant:
 
 Warning: idn_to_ascii(): idn_to_ascii: invalid variant, must be INTL_IDNA_VARIANT_UTS46 in %s on line %d
index 6cd361ba71a4e6d57376aebd90ec691ca72441df..797aee4fb717e7c06e8dbb4b27f2de8a7621c654 100644 (file)
@@ -11,7 +11,7 @@ intl_get_error_code()
 // Suppress warning messages.
 error_reporting( E_ERROR );
 
-if( collator_get_locale() !== false )
+if( collator_get_locale(new Collator('en_US'), -1) !== false )
     echo "failed\n";
 else
 {
index f81b5c03d5e62f9cd1027cac186dc53f683dce13..e03fb806589f6b5ba63715feca2654fb6beb28e2 100644 (file)
@@ -11,11 +11,11 @@ intl_get_error_message()
 // Suppress warning messages.
 error_reporting( E_ERROR );
 
-if( collator_get_locale() !== false )
+if( collator_get_locale(new Collator('en_US'), -1) !== false )
     echo "failed\n";
 else
     printf( "%s\n", intl_get_error_message() );
 
 ?>
 --EXPECT--
-collator_get_locale: unable to parse input params: U_ILLEGAL_ARGUMENT_ERROR
+Error getting locale by type: U_ILLEGAL_ARGUMENT_ERROR
index a2834d8adec28a1511dfc7dfb4523543ea5887a3..6a29cd6723bc4ae2030949ac155e01b36d5ffda5 100644 (file)
@@ -19,7 +19,6 @@ function ut_main()
                'zh, en-us;q=0.8, en;q=0.7',
                'xx, fr-FR;q=0.3, de-DE;q=0.5',
                'none',
-               array()
        );
 
      foreach($http_acc as $http) {
@@ -34,13 +33,9 @@ include_once( 'ut_common.inc' );
 ut_run();
 
 ?>
---EXPECTF--
-Warning: Locale::acceptFromHttp() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: locale_accept_from_http() expects parameter 1 to be string, array given in %s on line %d
+--EXPECT--
 Accepting en-us,en;q=0.5: en_US
 Accepting da, en-gb;q=0.8, en;q=0.7: da
 Accepting zh, en-us;q=0.8, en;q=0.7: zh
 Accepting xx, fr-FR;q=0.3, de-DE;q=0.5: de_DE
 Accepting none: 
-Accepting Array:
index 0016de4bb7a9e2b49534a50e299ed991b48af157..688e65a861ae5c71359c43e71b963ab25987ab9d 100644 (file)
@@ -27,10 +27,20 @@ function crt($t, $l, $s) {
                        }
                        break;
                case $t == "C":
-                       return MessageFormatter::create($l, $s);
+                       try {
+                               return MessageFormatter::create($l, $s);
+                       } catch (Throwable $e) {
+                               print_exception($e);
+                               return null;
+                       }
                        break;
                case $t == "P":
-                       return msgfmt_create($l, $s);
+                       try {
+                               return msgfmt_create($l, $s);
+                       } catch (Throwable $e) {
+                               print_exception($e);
+                               return null;
+                       }
                        break;
        }
 }
@@ -51,9 +61,19 @@ try {
        $fmt = null;
 }
 err($fmt);
-$fmt = msgfmt_create();
+try {
+       $fmt = msgfmt_create();
+} catch (TypeError $e) {
+       print_exception($e);
+       $fmt = null;
+}
 err($fmt);
-$fmt = MessageFormatter::create();
+try {
+       $fmt = MessageFormatter::create();
+} catch (TypeError $e) {
+       print_exception($e);
+       $fmt = null;
+}
 err($fmt);
 try {
        $fmt = new MessageFormatter('en');
@@ -62,9 +82,19 @@ try {
        $fmt = null;
 }
 err($fmt);
-$fmt = msgfmt_create('en');
+try {
+       $fmt = msgfmt_create('en');
+} catch (TypeError $e) {
+       print_exception($e);
+       $fmt = null;
+}
 err($fmt);
-$fmt = MessageFormatter::create('en');
+try {
+       $fmt = MessageFormatter::create('en');
+} catch (TypeError $e) {
+       print_exception($e);
+       $fmt = null;
+}
 err($fmt);
 
 foreach($args as $arg) {
@@ -79,53 +109,53 @@ foreach($args as $arg) {
 ?>
 --EXPECTF--
 ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
 
-Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
 
-Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
 
 ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
 
-Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
+'U_ZERO_ERROR'
 
-Warning: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d
+'U_ZERO_ERROR'
 
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 
 TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
 
-Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
 
-Warning: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
 
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
 'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
 'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
 'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
 
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
 'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
 'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
 'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
 
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
 'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
 'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
 'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
index 3087f49cbe8f5488d7d7f35039f7338c0028c800..4fc9b02a1d11b461f18da5c5f67b20b19f9db30f 100644 (file)
@@ -8,25 +8,7 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::countEquivalentIDs());
-var_dump(IntlTimeZone::countEquivalentIDs(array()));
 var_dump(IntlTimeZone::countEquivalentIDs("foo\x80"));
-var_dump(IntlTimeZone::countEquivalentIDs("foo bar", 7));
 --EXPECTF--
-Warning: IntlTimeZone::countEquivalentIDs() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::countEquivalentIDs() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: could not convert time zone id to UTF-16 in %s on line %d
 bool(false)
-
-Warning: IntlTimeZone::countEquivalentIDs() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/timezone_createDefault_error.phpt b/ext/intl/tests/timezone_createDefault_error.phpt
deleted file mode 100644 (file)
index f2f2e02..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlTimeZone::createDefault(): errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlTimeZone::createDefault(4));
---EXPECTF--
-Warning: IntlTimeZone::createDefault() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::createDefault(): intltz_create_default: bad arguments in %s on line %d
-NULL
index ea92e28d955b186dd114b2fecffebb32e4c014d1..4e190129d47a02c5281936cfe892f094c4b13e68 100644 (file)
@@ -9,12 +9,7 @@ if (!extension_loaded('intl'))
 ini_set("intl.error_level", E_WARNING);
 
 var_dump(IntlTimeZone::createEnumeration(array()));
-var_dump(IntlTimeZone::createEnumeration(1, 2));
+?>
 --EXPECTF--
 Warning: IntlTimeZone::createEnumeration(): intltz_create_enumeration: invalid argument type in %s on line %d
 bool(false)
-
-Warning: IntlTimeZone::createEnumeration() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::createEnumeration(): intltz_create_enumeration: bad arguments in %s on line %d
-bool(false)
index 5edfaeaf6b66a5dcb2d2046b36e77c749b489210..2b847ec841c6c20acd0a13ce25d911fe76ec5353 100644 (file)
@@ -8,31 +8,7 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration());
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration(array()));
 var_dump(IntlTimeZone::createTimeZoneIDEnumeration(-1));
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, array()));
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, "PT", "a80"));
 --EXPECTF--
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad zone type in %s on line %d
 bool(false)
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 2 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 3 to be int, string given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
index 553223ee4ca1c758dbe0373c14ab528c8d6d7d8d..a06f26b12824192a95696ee81cccce9fde8bee6b 100644 (file)
@@ -8,25 +8,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::createTimeZone());
-var_dump(IntlTimeZone::createTimeZone(new stdClass));
-var_dump(IntlTimeZone::createTimeZone("foo bar", 4));
 var_dump(IntlTimeZone::createTimeZone("foo\x80"));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::createTimeZone() expects parameter 1 to be string, object given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
-NULL
-
 Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: could not convert time zone id to UTF-16 in %s on line %d
 NULL
index f50e59f97c1a07a15cb93cac412bfee7ac5657f3..54a70d1f17b846407a28bd22d605e8402c62e7f2 100644 (file)
@@ -10,39 +10,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::fromDateTimeZone());
-var_dump(IntlTimeZone::fromDateTimeZone(1,2));
-var_dump(IntlTimeZone::fromDateTimeZone('sdfds'));
-var_dump(IntlTimeZone::fromDateTimeZone(new stdclass));
 $dt = new DateTime('2012-08-01 00:00:00 WEST');
 var_dump(IntlTimeZone::fromDateTimeZone($dt->getTimeZone()));
-
-var_dump(intltz_from_date_time_zone());
+?>
 --EXPECTF--
-Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, object given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
 Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
 NULL
-
-Warning: intltz_from_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: intltz_from_date_time_zone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
index 684d946b1ef2e0e6737ba1cb634022ce153ffa54..c1f7b6927a0efa20a3f3b32efc6e557a79e07632 100644 (file)
@@ -8,19 +8,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::getCanonicalID());
-var_dump(IntlTimeZone::getCanonicalID(array()));
 var_dump(IntlTimeZone::getCanonicalID("foo\x81"));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getCanonicalID() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getCanonicalID() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
 bool(false)
index 9df04f08c14fa7e8ca906db89aa4e952217a339d..ebb0eb7776a82f78c376c760d3aa4b09b0b1ffe8 100644 (file)
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getDSTSavings(array()));
-
 var_dump(intltz_get_dst_savings(null));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getDSTSavings() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getDSTSavings(): intltz_get_dst_savings: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_dst_savings(NULL)
index 8d30f8840fbcdb4ac9f416b2416ddc40408b2f4b..108530d2c3fe720a13ada3f1c3da7cf67236a85a 100644 (file)
@@ -9,37 +9,13 @@ if (!extension_loaded('intl'))
 ini_set("intl.error_level", E_WARNING);
 
 $tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getDisplayName(array()));
-var_dump($tz->getDisplayName(false, array()));
 var_dump($tz->getDisplayName(false, -1));
-var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, array()));
-var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, NULL, NULL));
 
 var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_PT'));
 --EXPECTF--
-Warning: IntlTimeZone::getDisplayName() expects parameter 1 to be bool, array given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getDisplayName() expects parameter 2 to be int, array given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d
 bool(false)
 
-Warning: IntlTimeZone::getDisplayName() expects parameter 3 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT')
index facb8fe8cfcdeee3ce7f4ef2e0b2c21295a92d2b..12afaee2fab447168c8283879c901939ac20255f 100644 (file)
@@ -8,25 +8,8 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::getEquivalentID('foo'));
-var_dump(IntlTimeZone::getEquivalentID('foo', 'bar'));
-var_dump(IntlTimeZone::getEquivalentID('Europe/Lisbon', 0, 1));
 var_dump(IntlTimeZone::getEquivalentID("foo\x80", 0));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getEquivalentID() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: could not convert time zone id to UTF-16 in %s on line %d
 bool(false)
index f5b06b075769943e5d6e605c3e7e90fa425a622d..657e09b240f63ec8d04ab3dcc1e3b106172775cd 100644 (file)
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getErrorCode(array()));
-
 var_dump(intltz_get_error_code(null));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getErrorCode(): intltz_get_error_code: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_error_code(NULL)
index 6b8ce7d5c89a6a2b7cee1ff493cae8cda43cd7d9..3ea812050b85d7a7c524ed9f585a5335523fb771 100644 (file)
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getErrorMessage(array()));
-
 var_dump(intltz_get_error_message(null));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getErrorMessage(): intltz_get_error_message: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_error_message(NULL)
diff --git a/ext/intl/tests/timezone_getGMT_error.phpt b/ext/intl/tests/timezone_getGMT_error.phpt
deleted file mode 100644 (file)
index ca478a1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlTimeZone::getGMT(): errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlTimeZone::getGMT(4));
---EXPECTF--
-Warning: IntlTimeZone::getGMT() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getGMT(): intltz_get_gmt: bad arguments in %s on line %d
-NULL
index 4d0ffeb96fb602c1a665d713f73497f8acc22e56..81d36b9d0b491fdcf1c1ce829b34cb5c69fefe03 100644 (file)
@@ -8,15 +8,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getID('foo'));
 intltz_get_id(null);
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getID() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getID(): intltz_get_id: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_id(NULL)
index d66716e552f2ead02ccc874aa723b3351707bd59..3ae06e4ce0065a6aec5279015d564c3f165e78b7 100644 (file)
@@ -10,24 +10,13 @@ ini_set("intl.error_level", E_WARNING);
 
 $tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
 var_dump($tz->getOffset(INF, true, $a, $a));
-var_dump($tz->getOffset(time()*1000, true, $a));
-var_dump($tz->getOffset(time()*1000, true, $a, $a, $a));
 
 intltz_get_offset(null, time()*1000, false, $a, $a);
+?>
 --EXPECTF--
 Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d
 bool(false)
 
-Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 3 given in %s on line %d
-
-Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s on line %d
-
-Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL)
index dc7df51cca2425ebe99f79c2c1211295c770631c..9e0691f39d6e7ef8884cf4cdd0f750863ff29222 100644 (file)
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getRawOffset('foo'));
-
 intltz_get_raw_offset(null);
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getRawOffset() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getRawOffset(): intltz_get_raw_offset: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_get_raw_offset(NULL)
index 7a9e1e1ca7d2785e21e67e725f5883526fe1a130..28fd73c1a7015ef37fc8c90359a874e95717effd 100644 (file)
@@ -8,27 +8,10 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-var_dump(IntlTimeZone::getRegion());
-var_dump(IntlTimeZone::getRegion(array()));
-var_dump(IntlTimeZone::getRegion('Europe/Lisbon', 4));
 var_dump(IntlTimeZone::getRegion("foo\x81"));
 var_dump(IntlTimeZone::getRegion("foo"));
+?>
 --EXPECTF--
-Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getRegion() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::getRegion(): intltz_get_region: could not convert time zone id to UTF-16 in %s on line %d
 bool(false)
 
diff --git a/ext/intl/tests/timezone_getTZDataVersion_error.phpt b/ext/intl/tests/timezone_getTZDataVersion_error.phpt
deleted file mode 100644 (file)
index eab4573..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlTimeZone::getTZDataVersion(): errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlTimeZone::getTZDataVersion('foo'));
---EXPECTF--
-Warning: IntlTimeZone::getTZDataVersion() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getTZDataVersion(): intltz_get_tz_data_version: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/timezone_getUnknown_error.phpt b/ext/intl/tests/timezone_getUnknown_error.phpt
deleted file mode 100644 (file)
index 57773c2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-IntlCalendar::getUnknown(): bad arguments
---INI--
-date.timezone=Atlantic/Azores
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
-       die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-IntlTimeZone::getUnknown(1);
-
-intltz_get_unknown(1);
---EXPECTF--
-Warning: IntlTimeZone::getUnknown() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getUnknown(): intltz_get_unknown: bad arguments in %s on line %d
-
-Warning: intltz_get_unknown() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: intltz_get_unknown(): intltz_get_unknown: bad arguments in %s on line %d
index d00e78fd3a00b09723550cb3492875da3c2562ca..c402dec6736a324fb0fe60a436b1f1150b980d31 100644 (file)
@@ -10,29 +10,17 @@ ini_set("intl.error_level", E_WARNING);
 
 $tz = IntlTimeZone::createTimeZone('Etc/Unknown');
 
-var_dump($tz->toDateTimeZone(''));
 try {
        var_dump($tz->toDateTimeZone());
 } catch (Exception $e) {
        var_dump($e->getMessage());
 }
 
-var_dump(intltz_to_date_time_zone());
 var_dump(intltz_to_date_time_zone(1));
 --EXPECTF--
-Warning: IntlTimeZone::toDateTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: bad arguments in %s on line %d
-bool(false)
-
 Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: DateTimeZone constructor threw exception in %s on line %d
 string(66) "DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
 
-Warning: intltz_to_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: intltz_to_date_time_zone(): intltz_to_date_time_zone: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, int given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_to_date_time_zone(1)
index c6ab2eefe5871e4b48c95a92fe6b75a4b4526af3..b872dcb18b8dba80ae6d3385fc7aab7a762fb42e 100644 (file)
@@ -8,15 +8,9 @@ if (!extension_loaded('intl'))
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->useDaylightTime('foo'));
 intltz_use_daylight_time(null);
+?>
 --EXPECTF--
-Warning: IntlTimeZone::useDaylightTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::useDaylightTime(): intltz_use_daylight_time: bad arguments in %s on line %d
-bool(false)
-
 Fatal error: Uncaught TypeError: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d
 Stack trace:
 #0 %s(%d): intltz_use_daylight_time(NULL)
index d1549ec1b684dd2ac5ae5a429436f109e5b26489..64c57da854444d13858072c1c08b7f4525a59048 100644 (file)
@@ -6,12 +6,6 @@ Transliterator::createFromRules (error)
 <?php
 ini_set("intl.error_level", E_WARNING);
 
-$t = Transliterator::createFromRules();
-echo intl_get_error_message(),"\n";
-
-$t = Transliterator::createFromRules("a","b");
-echo intl_get_error_message(),"\n";
-
 $t = Transliterator::createFromRules("\x8Fss");
 echo intl_get_error_message(),"\n";
 
@@ -31,16 +25,6 @@ $t = Transliterator::createFromRules($rules);
 echo intl_get_error_message(),"\n";
 echo "Done.\n";
 --EXPECTF--
-Warning: Transliterator::createFromRules() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: Transliterator::createFromRules(): transliterator_create_from_rules: bad arguments in %s on line %d
-transliterator_create_from_rules: bad arguments: U_ILLEGAL_ARGUMENT_ERROR
-
-Warning: Transliterator::createFromRules() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: Transliterator::createFromRules(): transliterator_create_from_rules: bad arguments in %s on line %d
-transliterator_create_from_rules: bad arguments: U_ILLEGAL_ARGUMENT_ERROR
-
 Warning: Transliterator::createFromRules(): String conversion of rules to UTF-16 failed in %s on line %d
 String conversion of rules to UTF-16 failed: U_INVALID_CHAR_FOUND
 
index 1a1e80ba68c260f1d3c75a962abf816559d359ba..a7fffa62b1072e44e7b6f81d1c324bd87d65a339 100644 (file)
@@ -7,16 +7,9 @@ Transliterator::createInverse (error)
 
 ini_set("intl.error_level", E_WARNING);
 
-$tr = Transliterator::create("Katakana-Latin");
-$tr->createInverse(array());
-
-$tr = Transliterator::create("Katakana-Latin");
 transliterator_create_inverse("jj");
+?>
 --EXPECTF--
-Warning: Transliterator::createInverse() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: Transliterator::createInverse(): transliterator_create_inverse: bad arguments in %s on line %d
-
 Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d
 Stack trace:
 #0 %s(%d): transliterator_create_inverse('jj')
index e700d2b172a6f7d5bb88eda8f18fac17fa296775..813c8c480ef051e079d14436af59464798cf4f58 100644 (file)
@@ -5,21 +5,9 @@ Transliterator::getErrorCode (error)
 --FILE--
 <?php
 ini_set("intl.error_level", E_WARNING);
-$t = Transliterator::create("[\p{Bidi_Mirrored}] Hex");
-echo transliterator_get_error_code(), "\n";
-echo $t->getErrorCode(null), "\n";
 echo transliterator_get_error_code(array()), "\n";
+?>
 --EXPECTF--
-Warning: transliterator_get_error_code() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: transliterator_get_error_code(): transliterator_get_error_code: unable to parse input params in %s on line %d
-
-
-Warning: Transliterator::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: Transliterator::getErrorCode(): transliterator_get_error_code: unable to parse input params in %s on line %d
-
-
 Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d
 Stack trace:
 #0 %s(%d): transliterator_get_error_code(Array)
index ec8282447ac5f1b846c8d7520a6afd222efb961f..7bcc7df169625df478ca8eb426af15eecc80c108 100644 (file)
@@ -5,21 +5,9 @@ Transliterator::getErrorMessage (error)
 --FILE--
 <?php
 ini_set("intl.error_level", E_WARNING);
-$t = Transliterator::create("[\p{Bidi_Mirrored}] Hex");
-echo transliterator_get_error_message(), "\n";
-echo $t->getErrorMessage(null), "\n";
 echo transliterator_get_error_message(array()), "\n";
+?>
 --EXPECTF--
-Warning: transliterator_get_error_message() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: transliterator_get_error_message(): transliterator_get_error_message: unable to parse input params in %s on line %d
-
-
-Warning: Transliterator::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: Transliterator::getErrorMessage(): transliterator_get_error_message: unable to parse input params in %s on line %d
-
-
 Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d
 Stack trace:
 #0 %s(%d): transliterator_get_error_message(Array)
diff --git a/ext/intl/tests/transliterator_list_ids_error.phpt b/ext/intl/tests/transliterator_list_ids_error.phpt
deleted file mode 100644 (file)
index fa65138..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-Transliterator::listIDs (error)
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
---FILE--
-<?php
-
-ini_set("intl.error_level", E_WARNING);
-var_dump(transliterator_list_ids(array()));
-
-echo "Done.\n";
---EXPECTF--
-Warning: transliterator_list_ids() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: transliterator_list_ids(): transliterator_list_ids: bad arguments in %s on line %d
-bool(false)
-Done.
index cdddcfb87bd7ab57acecd14e30b2f96e14715c3c..da9a887455885e4b7d9d778fab2e4e80d3e2d997 100644 (file)
@@ -10,51 +10,19 @@ ini_set("intl.error_level", E_WARNING);
 $tr = Transliterator::create("latin");
 
 //Arguments
-var_dump(transliterator_transliterate());
-var_dump(transliterator_transliterate($tr,array()));
 var_dump(transliterator_transliterate($tr,"str",7));
 var_dump(transliterator_transliterate($tr,"str",7,6));
-var_dump(transliterator_transliterate($tr,"str",2,-1,"extra"));
-
-//Arguments
-var_dump($tr->transliterate());
-var_dump($tr->transliterate(array()));
 
 //bad UTF-8
 transliterator_transliterate($tr, "\x80\x03");
 
 echo "Done.\n";
 --EXPECTF--
-Warning: transliterator_transliterate() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
-Warning: transliterator_transliterate() expects parameter 2 to be string, array given in %s on line %d
-
-Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
 Warning: transliterator_transliterate(): transliterator_transliterate: Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 3) in %s on line %d
 bool(false)
 
 Warning: transliterator_transliterate(): transliterator_transliterate: "start" argument should be non-negative and not bigger than "end" (if defined) in %s on line %d
 bool(false)
 
-Warning: transliterator_transliterate() expects at most 4 parameters, 5 given in %s on line %d
-
-Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
-Warning: Transliterator::transliterate() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: Transliterator::transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
-Warning: Transliterator::transliterate() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: Transliterator::transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
 Warning: transliterator_transliterate(): String conversion of string to UTF-16 failed in %s on line %d
 Done.
diff --git a/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt b/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt
deleted file mode 100644 (file)
index 4e38128..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
---TEST--
-Check the function UConverter::getAvailable with parameter wrong
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
---FILE--
-<?php UConverter::getAvailable("This is an ascii string"); ?>
---EXPECTF--
-Warning: UConverter::getAvailable() expects exactly 0 parameters, 1 given in %s on line %d
index e908b44349f6ac79f5348a3ec8f6c44fb8ac4b74..63a303998accc35dfdb90e1f1e9ba49afa0b4b65 100644 (file)
@@ -5,7 +5,6 @@ json_decode() tests
 --FILE--
 <?php
 
-var_dump(json_decode());
 var_dump(json_decode(""));
 var_dump(json_decode("", 1));
 var_dump(json_decode("", 0));
@@ -26,8 +25,6 @@ var_dump(json_decode('{ "": "": "" } }'));
 ?>
 ===DONE===
 --EXPECTF--
-Warning: json_decode() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 NULL
 NULL
 NULL
index 9906a2b0d4d90024143a7a3121696ec2561f1960..4089a7897f578a3baccacd5034be8e5584d51495 100644 (file)
@@ -6,13 +6,6 @@ Test json_decode() function : error conditions
 <?php
 echo "*** Testing json_decode() : error conditions ***\n";
 
-echo "\n-- Testing json_decode() function with no arguments --\n";
-var_dump(json_decode());
-
-echo "\n-- Testing json_decode() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump(json_decode('"abc"', true, 512, 0, $extra_arg));
-
 echo "\n-- Testing json_decode() function with depth below 0 --\n";
 var_dump(json_decode('"abc"', true, -1));
 
@@ -21,16 +14,6 @@ var_dump(json_decode('"abc"', true, -1));
 --EXPECTF--
 *** Testing json_decode() : error conditions ***
 
--- Testing json_decode() function with no arguments --
-
-Warning: json_decode() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing json_decode() function with more than expected no. of arguments --
-
-Warning: json_decode() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
 -- Testing json_decode() function with depth below 0 --
 
 Warning: json_decode(): Depth must be greater than zero in %s on line %d
index e733b328544357c28d1ff1387e00a46d338270c9..cd88ef8a9e28c7df7787f6b266fe53064cd3294e 100644 (file)
@@ -6,15 +6,14 @@ json_last_error() failures
 <?php
 
 var_dump(json_last_error());
-var_dump(json_last_error(true));
-var_dump(json_last_error('some', 4, 'args', 'here'));
+
+try {
+    var_dump(json_last_error(true));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
---EXPECTF--
+--EXPECT--
 int(0)
-
-Warning: json_last_error() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: json_last_error() expects exactly 0 parameters, 4 given in %s on line %d
-NULL
+json_last_error() expects exactly 0 parameters, 1 given
index 719e9fc50c969f74493ed352b0c12de725d8c708..75b06f72a2db0d6703d40c3f7c2ad424b7b4d032 100644 (file)
@@ -6,15 +6,14 @@ json_last_error_msg() failures
 <?php
 
 var_dump(json_last_error_msg());
-var_dump(json_last_error_msg(true));
-var_dump(json_last_error_msg('some', 4, 'args', 'here'));
+
+try {
+    var_dump(json_last_error_msg(true));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 --EXPECTF--
 string(8) "No error"
-
-Warning: json_last_error_msg() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: json_last_error_msg() expects exactly 0 parameters, 4 given in %s on line %d
-NULL
+json_last_error_msg() expects exactly 0 parameters, 1 given
index b636ab7adc97303768ab88055757871fbbbeeb78..7914ef509b0ad25691e8762044c585544d933120 100644 (file)
@@ -8,7 +8,6 @@ libxml_use_internal_errors()
 var_dump(libxml_use_internal_errors(false));
 var_dump(libxml_use_internal_errors(true));
 var_dump(libxml_use_internal_errors());
-var_dump(libxml_use_internal_errors(new stdclass));
 
 var_dump(libxml_get_errors());
 var_dump(libxml_get_last_error());
@@ -17,13 +16,10 @@ var_dump(libxml_clear_errors());
 
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 bool(false)
 bool(false)
 bool(true)
-
-Warning: libxml_use_internal_errors() expects parameter 1 to be bool, object given in %s001.php on line 6
-NULL
 array(0) {
 }
 bool(false)
index 9d5121089d0480b8f6cbb4cb541058483a0db812..9338bc90d417d6d13bed5cd372c88ca1298a78ad 100644 (file)
@@ -18,7 +18,11 @@ $ctxs = array(
 
 
 foreach ($ctxs as $ctx) {
-       var_dump(libxml_set_streams_context($ctx));
+       try {
+        var_dump(libxml_set_streams_context($ctx));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
        $dom = new DOMDocument();
        var_dump($dom->load(dirname(__FILE__).'/test.xml'));
 }
@@ -28,25 +32,15 @@ echo "Done\n";
 ?>
 --EXPECTF--
 Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line %d
-
-Warning: libxml_set_streams_context() expects parameter 1 to be resource, null given in %s004.php on line %d
-NULL
+libxml_set_streams_context() expects parameter 1 to be resource, null given
 bool(true)
-
-Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %s004.php on line %d
-NULL
+libxml_set_streams_context() expects parameter 1 to be resource, string given
 bool(true)
-
-Warning: libxml_set_streams_context() expects parameter 1 to be resource, int given in %s004.php on line %d
-NULL
+libxml_set_streams_context() expects parameter 1 to be resource, int given
 bool(true)
-
-Warning: libxml_set_streams_context() expects parameter 1 to be resource, object given in %s004.php on line %d
-NULL
+libxml_set_streams_context() expects parameter 1 to be resource, object given
 bool(true)
-
-Warning: libxml_set_streams_context() expects parameter 1 to be resource, array given in %s004.php on line %d
-NULL
+libxml_set_streams_context() expects parameter 1 to be resource, array given
 bool(true)
 NULL
 bool(true)
index e9498aae083c9fcbce4d432b84ac4c1ab344a5f6..df7af1b2b68c1e5e15a03f1b7e32a1ce7c86152a 100644 (file)
@@ -6,9 +6,13 @@ Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak
 <?php
 $fp = fopen("php://input", "r");
 libxml_set_streams_context($fp);
-libxml_set_streams_context("a");
+try {
+    libxml_set_streams_context("a");
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 echo "okey";
 ?>
---EXPECTF--
-Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %sbug63389.php on line %d
+--EXPECT--
+libxml_set_streams_context() expects parameter 1 to be resource, string given
 okey
index 40b31ea85d3292da05cde94b9fa6556b175bd5dc..9a6826ca543a5de77227ad2837045719040b4ee7 100644 (file)
@@ -12,10 +12,6 @@ XML;
 $dd = new DOMDocument;
 $r = $dd->loadXML($xml);
 
-var_dump(libxml_set_external_entity_loader([]));
-var_dump(libxml_set_external_entity_loader());
-var_dump(libxml_set_external_entity_loader(function() {}, 2));
-
 var_dump(libxml_set_external_entity_loader(function($a, $b, $c, $d) {}));
 try {
        var_dump($dd->validate());
@@ -25,14 +21,6 @@ try {
 
 echo "Done.\n";
 --EXPECTF--
-Warning: libxml_set_external_entity_loader() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: libxml_set_external_entity_loader() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: libxml_set_external_entity_loader() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 bool(true)
 
 Warning: DOMDocument::validate(): Could not load the external subset "http://example.com/foobar" in %s on line %d
index f2fda35124b91bb5fadb61b14e5798e94f5d0885..ac5d0d32a6e002f80f5dc97a38ab2ab763721247 100644 (file)
@@ -99,11 +99,6 @@ $s = $euc_jp;
 $s = mb_convert_encoding($s, 'BAD');
 print("BAD: $s\n"); // BAD
 
-$s = $euc_jp;
-$s = mb_convert_encoding($s);
-print("MP: $s\n"); // Missing parameter
-
-
 ?>
 --EXPECTF--
 == BASIC TEST ==
@@ -129,6 +124,3 @@ EUC-JP:
 
 Warning: mb_convert_encoding(): Unknown encoding "BAD" in %s on line %d
 BAD: 
-
-Warning: mb_convert_encoding() expects at least 2 parameters, 1 given in %s on line %d
-MP: 
index 0c8015d86dc07f9b93303b476b721edef5fcecd1..9a8f51281b3f5e0e8a1f375eb2dbcd2770f087c3 100644 (file)
@@ -87,11 +87,6 @@ $s = $euc_jp;
 $s = mb_detect_encoding($s, 'BAD');
 print("BAD: $s\n"); // BAD
 
-$s = $euc_jp;
-$s = mb_detect_encoding();
-print("MP: $s\n"); // Missing parameter
-
-
 ?>
 --EXPECTF--
 == BASIC TEST ==
@@ -113,6 +108,3 @@ EUC-JP: EUC-JP
 
 Warning: mb_detect_encoding(): Illegal argument in %s on line %d
 BAD: EUC-JP
-
-Warning: mb_detect_encoding() expects at least 1 parameter, 0 given in %s on line %d
-MP: 
index 8bc0453350fd73f32628a36e4da7663abe37fb10..798bdeb5ca4df1b64a588b7423d0a8b5e51c3d2e 100644 (file)
@@ -4,7 +4,6 @@ mb_encoding_aliases()
 <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
 --FILE--
 <?php
-mb_encoding_aliases();
 $list = mb_encoding_aliases("ASCII");
 sort($list);
 var_dump($list);
@@ -13,7 +12,6 @@ var_dump(mb_encoding_aliases("8bit"));
 var_dump(mb_encoding_aliases("BAD"));
 ?>
 --EXPECTF--
-Warning: mb_encoding_aliases() expects exactly 1 parameter, 0 given in %s on line 2
 array(11) {
   [0]=>
   string(14) "ANSI_X3.4-1968"
index 85db1d1c98a369a14f08ddf12bf4b0d1c311c99d..05b348654506d8bbb8ba4e7fe52008af66abfea5 100644 (file)
@@ -14,7 +14,11 @@ $a = array(
        );
 
 foreach ($a as $args) {
-       var_dump(mb_ereg($args[0], $args[1], $args[2]));
+       try {
+               var_dump(mb_ereg($args[0], $args[1], $args[2]));
+       } catch (TypeError $e) {
+               echo $e->getMessage(), "\n";
+       }
        var_dump($args);
 }
 ?>
@@ -42,9 +46,7 @@ array(3) {
   array(0) {
   }
 }
-
-Warning: mb_ereg() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+mb_ereg() expects parameter 1 to be string, array given
 array(3) {
   [0]=>
   array(0) {
@@ -52,11 +54,9 @@ array(3) {
   [1]=>
   int(1)
   [2]=>
-  string(0) ""
+  &string(0) ""
 }
-
-Warning: mb_ereg() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+mb_ereg() expects parameter 2 to be string, array given
 array(3) {
   [0]=>
   int(1)
@@ -64,7 +64,7 @@ array(3) {
   array(0) {
   }
   [2]=>
-  string(0) ""
+  &string(0) ""
 }
 bool(false)
 array(3) {
index 30e857eed70b11c71f04db4801aeedc2a175b01b..22e3cd36c5a3ea30f5c830a5e982802e738cd047 100644 (file)
@@ -15,12 +15,9 @@ var_dump($a, $b, $c);
 mb_eregi($a, $b, $c);
 var_dump($a, $b, $c);
 
-mb_ereg_search_init($a, $b, $c);
-var_dump($a, $b, $c);
-
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 int(-1)
 int(-1)
 array(1) {
@@ -33,12 +30,4 @@ array(1) {
   [0]=>
   string(2) "-1"
 }
-
-Warning: mb_ereg_search_init() expects parameter 3 to be string, array given in %s on line %d
-int(-1)
-int(-1)
-array(1) {
-  [0]=>
-  string(2) "-1"
-}
 Done
diff --git a/ext/mbstring/tests/mb_ereg_variation1.phpt b/ext/mbstring/tests/mb_ereg_variation1.phpt
deleted file mode 100644 (file)
index 2ee33c9..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test mb_ereg() function : usage variations - pass different data types to $pattern argument
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype  : int mb_ereg(string $pattern, string $string [, array $registers])
- * Description: Regular expression match for multibyte string
- * Source code: ext/mbstring/php_mbregex.c
- */
-
-/*
- * Pass different data types to $pattern argument
- */
-
-echo "*** Testing mb_ereg() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$string = 'string value';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
-       public function __toString() {
-               return "Class A object";
-       }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $pattern argument
-$inputs = array(
-
-// int data
-/*1*/  0,
-       1,
-       12345,
-       -2345,
-
-// float data
-/*5*/  10.5,
-       -10.5,
-       12.3456789000e10,
-       12.3456789000E-10,
-       .5,
-
-// boolean data
-/*10*/ true,
-       TRUE,
-
-// string data
-/*12*/ "string",
-       'string',
-       $heredoc,
-
-// object data
-/*15*/ new classA(),
-
-// resource variable
-/*16*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_ereg()
-$iterator = 1;
-foreach($inputs as $input) {
-       if (@is_array($regs)){
-               $regs = null;
-       }
-       echo "\n-- Iteration $iterator --\n";
-       var_dump( mb_ereg($input, $string, $regs) );
-       var_dump($regs);
-       $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_ereg() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-array(0) {
-}
-
--- Iteration 2 --
-bool(false)
-array(0) {
-}
-
--- Iteration 3 --
-bool(false)
-array(0) {
-}
-
--- Iteration 4 --
-bool(false)
-array(0) {
-}
-
--- Iteration 5 --
-bool(false)
-array(0) {
-}
-
--- Iteration 6 --
-bool(false)
-array(0) {
-}
-
--- Iteration 7 --
-bool(false)
-array(0) {
-}
-
--- Iteration 8 --
-bool(false)
-array(0) {
-}
-
--- Iteration 9 --
-bool(false)
-array(0) {
-}
-
--- Iteration 10 --
-bool(false)
-array(0) {
-}
-
--- Iteration 11 --
-bool(false)
-array(0) {
-}
-
--- Iteration 12 --
-int(6)
-array(1) {
-  [0]=>
-  string(6) "string"
-}
-
--- Iteration 13 --
-int(6)
-array(1) {
-  [0]=>
-  string(6) "string"
-}
-
--- Iteration 14 --
-bool(false)
-array(0) {
-}
-
--- Iteration 15 --
-bool(false)
-array(0) {
-}
-
--- Iteration 16 --
-
-Warning: mb_ereg() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-NULL
-Done
index 71af8b094d07b8cd78f9eb23f7b554fcb47db79d..c3dab5e35f180e10af79dfd07fe25a5bc31081f8 100644 (file)
@@ -47,16 +47,6 @@ $r = mb_http_output('BAD_NAME');
 $enc = mb_http_output();
 print "$enc\n";
 
-$r = mb_http_output($t_ary);
-($r === NULL) ? print "OK_BAD_ARY_SET\n" : print "NG_BAD_ARY_SET\n";
-$enc = mb_http_output();
-print "$enc\n";
-
-$r = mb_http_output($t_obj);
-($r === NULL) ? print "OK_BAD_OBJ_SET\n" : print "NG_BAD_OBJ_SET\n";
-$enc = mb_http_output();
-print "$enc\n";
-
 ?>
 --EXPECTF--
 OK_ASCII_SET
@@ -74,11 +64,3 @@ EUC-JP
 Warning: mb_http_output(): Unknown encoding "BAD_NAME" in %s on line %d
 OK_BAD_SET
 EUC-JP
-
-Warning: mb_http_output() expects parameter 1 to be string, array given in %s on line %d
-OK_BAD_ARY_SET
-EUC-JP
-
-Warning: mb_http_output() expects parameter 1 to be string, object given in %s on line %d
-OK_BAD_OBJ_SET
-EUC-JP
index 8b332b0594a983f02dbae36743fb5637f5719969..22fe919cbc4c4b80e9f93e068d9054c01c862229 100644 (file)
@@ -35,16 +35,6 @@ $r = mb_internal_encoding('BAD');
 $enc = mb_internal_encoding();
 print "$enc\n";
 
-$r = mb_internal_encoding($t_ary);
-($r === NULL) ? print "OK_BAD_ARY_SET\n" : print "NG_BAD_ARY_SET\n";
-$enc = mb_internal_encoding();
-print "$enc\n";
-
-$r = mb_internal_encoding($t_obj);
-($r === NULL) ? print "OK_BAD_OBJ_SET\n" : print "NG_BAD_OBJ_SET\n";
-$enc = mb_internal_encoding();
-print "$enc\n";
-
 ?>
 --EXPECTF--
 OK_EUC-JP_SET
@@ -58,11 +48,3 @@ ASCII
 Warning: mb_internal_encoding(): Unknown encoding "BAD" in %s on line %d
 OK_BAD_SET
 ASCII
-
-Warning: mb_internal_encoding() expects parameter 1 to be string, array given in %s on line %d
-OK_BAD_ARY_SET
-ASCII
-
-Warning: mb_internal_encoding() expects parameter 1 to be string, object given in %s on line %d
-OK_BAD_OBJ_SET
-ASCII
index 9da6456992a458432633845abb47914c83bbee39..067c3f282633eb7bdd257ea46c8f6880c69b40ba 100644 (file)
@@ -125,18 +125,6 @@ $r = mb_stripos($euc_jp, '
 $r = mb_stripos($euc_jp, "\n");
 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
 
-
-// Invalid Parameters
-echo "== INVALID PARAMETER TEST ==\n";
-
-$r = mb_stripos($euc_jp,'','EUC-JP');
-($r === NULL) ? print("OK_NULL\n") : print("NG_NULL\n");
-$r = mb_stripos($euc_jp, $t_ary, 'EUC-JP');
-($r === NULL) ? print("OK_ARRAY\n") : print("NG_ARRAY\n");
-$r = mb_stripos($euc_jp, $t_obj, 'EUC-JP');
-($r === NULL) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
-$r = mb_stripos($euc_jp, $t_obj, 'BAD_ENCODING');
-($r === NULL) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");
 ?>
 ==DONE==
 --EXPECTF--
@@ -213,17 +201,4 @@ OK_NEWLINE
 0
 OK_STR
 OK_NEWLINE
-== INVALID PARAMETER TEST ==
-
-Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d
-OK_NULL
-
-Warning: mb_stripos() expects parameter 2 to be string, array given in %s on line %d
-OK_ARRAY
-
-Warning: mb_stripos() expects parameter 2 to be string, object given in %s on line %d
-OK_OBJECT
-
-Warning: mb_stripos() expects parameter 2 to be string, object given in %s on line %d
-OK_BAD_ENCODING
 ==DONE==
index 3ea9ae12e6dfd5f45aa81a7d219aeb2bd057dc8f..2decf18fca6e75e30425d1ce5715aa33bda9e475 100644 (file)
@@ -53,14 +53,6 @@ print  strlen($utf8) . "\n";
 
 // Wrong Parameters
 echo "== WRONG PARAMETERS ==\n";
-// Array
-// Note: PHP Warning, strlen() expects parameter 1 to be string, array given
-$r = strlen($t_ary);
-echo $r."\n";
-// Object
-// Note: PHP Warning, strlen() expects parameter 1 to be string, object given
-$r = strlen($t_obj);
-echo $r."\n";
 // Wrong encoding
 mb_internal_encoding('EUC-JP');
 $r = mb_strlen($euc_jp, 'BAD_NAME');
@@ -86,10 +78,4 @@ echo $r."\n";
 101
 == WRONG PARAMETERS ==
 
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-
-Warning: strlen() expects parameter 1 to be string, object given in %s on line %d
-
-
 Warning: mb_strlen(): Unknown encoding "BAD_NAME" in %s on line %d
index 9bca0ba3906ad09b7ab90e9fd891cf286cd92a69..c86b77e7de609640c76746e11cc6021bf3082399 100644 (file)
@@ -125,18 +125,6 @@ $r = mb_strpos($euc_jp, '
 $r = mb_strpos($euc_jp, "\n");
 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
 
-
-// Invalid Parameters
-echo "== INVALID PARAMETER TEST ==\n";
-
-$r = mb_strpos($euc_jp,'','EUC-JP');
-($r === NULL) ? print("OK_NULL\n") : print("NG_NULL\n");
-$r = mb_strpos($euc_jp, $t_ary, 'EUC-JP');
-($r === NULL) ? print("OK_ARRAY\n") : print("NG_ARRAY\n");
-$r = mb_strpos($euc_jp, $t_obj, 'EUC-JP');
-($r === NULL) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
-$r = mb_strpos($euc_jp, $t_obj, 'BAD_ENCODING');
-($r === NULL) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");
 ?>
 ==DONE==
 --EXPECTF--
@@ -213,17 +201,4 @@ OK_NEWLINE
 0
 OK_STR
 OK_NEWLINE
-== INVALID PARAMETER TEST ==
-
-Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d
-OK_NULL
-
-Warning: mb_strpos() expects parameter 2 to be string, array given in %s on line %d
-OK_ARRAY
-
-Warning: mb_strpos() expects parameter 2 to be string, object given in %s on line %d
-OK_OBJECT
-
-Warning: mb_strpos() expects parameter 2 to be string, object given in %s on line %d
-OK_BAD_ENCODING
 ==DONE==
index dab3dfa78dc3bd1fedeacbda402a442aa875b260..e0dd351d4cc8f465572abca323ca58336aeb0c61 100644 (file)
@@ -40,7 +40,6 @@ require_once('skipifconnectfailure.inc');
 
        var_dump(mysqli_stmt_execute($stmt));
        var_dump($stmt = @mysqli_prepare($link, "SELECT * FROM test_store_result"), mysqli_error($link));
-       var_dump(mysqli_stmt_reset($stmt));
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_store_result");
        mysqli_stmt_execute($stmt);
@@ -102,9 +101,6 @@ object(mysqli_stmt)#%d (%d) {
 bool(true)
 bool(false)
 string(0) ""
-
-Warning: mysqli_stmt_reset() expects parameter 1 to be mysqli_stmt, bool given in %s on line %d
-NULL
 Rows: 3
 array(1) {
   [0]=>
index 95c3bb342633a2290fd5de11bcaff40bdfd99669..81a7f5b6deef84bac03633911b2d6a14179e9e07 100644 (file)
@@ -10,18 +10,6 @@ mysqli_affected_rows()
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_affected_rows()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_affected_rows($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_affected_rows($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index cc41786bdb6f1a72617a824fa614796fce3a28e8..ea91408b60ccbc8a790d55400091387959faf779 100644 (file)
@@ -19,18 +19,6 @@ mysqli_autocommit()
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_autocommit()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_autocommit($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_autocommit($link, $link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
                printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index b316ca9fe36cc42badd26e95b3246b64961ab82b..8a0dac8816e858a42d7ef3a20889f86363a36a95 100644 (file)
@@ -17,31 +17,10 @@ if (!have_innodb($link))
 <?php
        require_once("connect.inc");
        /* {{{ proto bool mysqli_begin_transaction(object link, [int flags [, string name]]) */
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_begin_transaction()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_begin_transaction($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_begin_transaction($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @mysqli_begin_transaction($link, $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_begin_transaction($link, 0, $link)))
-               printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_begin_transaction($link, 0, "mytrx", $link)))
-               printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
                printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
index 7b9f23cf9ed24bbf8b15d22c484c253a6475518f..bf1515e6457b17e172da9727d0394d3162ef03af 100644 (file)
@@ -10,24 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_change_user()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link, $link, $link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link, $link, $link, $link, $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index 90dd46fa73426546a8a3a24df89cb68c297bcd4c..4e7153e5b060b811380adb9a5fae8099755247ad 100644 (file)
@@ -11,18 +11,6 @@ require_once('skipifconnectfailure.inc');
        /* NOTE: http://bugs.mysql.com/bug.php?id=7923 makes this test fail very likely on all 4.1.x - 5.0.x! */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_character_set_name()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_character_set_name($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_character_set_name($link, $link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[005] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
@@ -65,10 +53,6 @@ require_once('skipifconnectfailure.inc');
        if (false !== ($tmp = @mysqli_character_set_name($link)))
                printf("[013] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
-       /* Make sure that the function alias exists */
-       if (!is_null($tmp = @mysqli_character_set_name()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --EXPECT--
index 5d303fd503dda9a3eacabbf2d0945b81ffc2ed08..4b760ec5bb638a82f823f850a39337e025194ece 100644 (file)
@@ -18,9 +18,6 @@ mysqli_chararcter_set_name(), mysql_client_encoding() [alias]
                printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @$mysqli->character_set_name($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$res = $mysqli->query('SELECT version() AS server_version'))
                printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
        $tmp = $res->fetch_assoc();
index 7367a5cd7c1f566344ecf6770a4308a5e98a7ee4..b8ab4a4af535df71abc88fba4beec44fcb56ea86 100644 (file)
@@ -128,9 +128,6 @@ require_once('skipifconnectfailure.inc');
        if (!is_object($res = new mysqli_result($link, MYSQLI_USE_RESULT)))
                printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
-       if (!is_object($res = new mysqli_result($link, 'invalid')))
-               printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
        $valid = array(MYSQLI_STORE_RESULT, MYSQLI_USE_RESULT);
        do {
                $mode = mt_rand(-1000, 1000);
@@ -146,12 +143,6 @@ require_once('skipifconnectfailure.inc');
                        printf("[009] Expecting warning because of invalid resultmode\n");
        }
 
-       if (!is_object($res = new mysqli_result('foo')))
-               printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
-       if (!is_object($res = @new mysqli_result($link, MYSQLI_STORE_RESULT, 1)))
-               printf("[011] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
        print "done!";
 ?>
 --EXPECTF--
@@ -186,8 +177,4 @@ Access to undefined properties:
 mysqli_result->unknown = ''
 
 Constructor:
-
-Warning: mysqli_result::__construct() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: mysqli_result::__construct() expects parameter 1 to be mysqli, string given in %s on line %d
 done!
index 8fc4583a4c9c1d8c4351a41db8035fa018d36c89..3e3301361dc9c6fb3f77668c1d05e55f50a05bbd 100644 (file)
@@ -123,16 +123,6 @@ printf("stmt->unknown = '%s'\n", @$stmt->unknown);
 @$stmt->unknown = 13;
 printf("stmt->unknown = '%s'\n", @$stmt->unknown);
 
-printf("\nPrepare using the constructor:\n");
-$stmt = new mysqli_stmt($link, 'SELECT id FROM test ORDER BY id');
-if (!$stmt->execute())
-printf("[002] [%d] %s\n", $stmt->errno, $stmt->error);
-$stmt->close();
-
-$obj = new stdClass();
-if (!is_object($stmt = new mysqli_stmt($link, $obj)))
-printf("[003] Expecting NULL got %s/%s\n", gettype($stmt), $stmt);
-
 print "done!";
 ?>
 --EXPECTF--
@@ -191,8 +181,4 @@ stmt->sqlstate = '00000'
 Access to undefined properties:
 stmt->unknown = ''
 stmt->unknown = '13'
-
-Prepare using the constructor:
-
-Warning: mysqli_stmt::__construct() expects parameter 2 to be string, object given in %s on line %d
 done!
index a300fb83149000b4b1f393b01902ac17dc580a16..0110847334c7764ce201380d8a022cf602efcb67 100644 (file)
@@ -10,23 +10,10 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_close()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_close($link, $link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       $tmp = @mysqli_close(NULL);
-       if (NULL !== $tmp)
-               printf("[004] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        $tmp = mysqli_close($link);
        if (true !== $tmp)
                printf("[005] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
index 305d5edf888c252edf13509889b7c68e3111d84d..be189ba232376fd753e81b961330cb96edc4db35 100644 (file)
@@ -17,9 +17,6 @@ require_once('skipifconnectfailure.inc');
                printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @$mysqli->close($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        $tmp = $mysqli->close();
        if (true !== $tmp)
                printf("[003] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
index 27ae3a928a530c554066cd02b7fb2d6438246404..73a9cdf25dd0d187bb050afa56b3ed0b0a7779dc 100644 (file)
@@ -17,18 +17,6 @@ if (!have_innodb($link))
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_commit()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_commit($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_commit($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index 66cd94bd540aa1e6a701908c1cabb050a57ff773..d5e4febbef1e6a731b1b142891bc8606bfee00f0 100644 (file)
@@ -19,10 +19,6 @@ require_once('skipifconnectfailure.inc');
 
        $exptype = ($anon_allow) ? "mysqli_object" : "false";
 
-       $obj = new stdClass();
-       if (!is_null($tmp = @mysqli_connect($obj)))
-               printf("[001] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
        $tmp = @mysqli_connect($link);
        if (($anon_allow && gettype($tmp) != "object") || (!$anon_allow && $tmp != false)) {
                printf("[002] Expecting %s, got %s/%s\n", $exptype, gettype($tmp), $tmp);
index 9bc3b12f73ef76fe34048a81c85e6d639a61de6e..0859ee61d5d2a7c4ac521e1ea93ac66d0975b148 100644 (file)
@@ -10,18 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (NULL !== ($tmp = @mysqli_data_seek()))
-               printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_data_seek($link)))
-               printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_data_seek($link, $link)))
-               printf("[003] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, 'SELECT * FROM test ORDER BY id LIMIT 4', MYSQLI_STORE_RESULT))
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
index 7fb14f095667f7237f1652fd4be4cffef22519ca..2c4377d8458890bae06b02151faf31ef4da36ec8 100644 (file)
@@ -9,10 +9,6 @@ require_once('skipifconnectfailure.inc');
 --FILE--
 <?php
        require_once("connect.inc");
-
-       $tmp    = NULL;
-       $link   = NULL;
-
        require('table.inc');
 
        if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
@@ -26,15 +22,6 @@ require_once('skipifconnectfailure.inc');
        if (!$res = $mysqli->query('SELECT * FROM test ORDER BY id LIMIT 4', MYSQLI_STORE_RESULT))
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
-       if (NULL !== ($tmp = @$res->data_seek()))
-               printf("[004] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @$res->data_seek($link)))
-               printf("[005] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @$res->data_seek($link, $link)))
-               printf("[006] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (true !== ($tmp = $res->data_seek(3)))
                printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
 
index aa455d7f6ec37a8d19a0ae79663afc26a50a0e17..478dcf7d08097d67d659f3b5f8b8bdaf700db1ba 100644 (file)
@@ -19,9 +19,6 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
 <?php
        require_once('connect.inc');
 
-       if (NULL !== ($tmp = @mysqli_debug()))
-               printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        // NOTE: documentation is not clear on this: function always return NULL or TRUE
        if (true !== ($tmp = mysqli_debug(sprintf('d:t:O,%s/mysqli_debug_phpt.trace', sys_get_temp_dir()))))
                printf("[002] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
index b3fbde7fd92e530a6592b4805d8120db4be65c6f..d9c894dfff99529a1adc4c6321911a260b8eb40b 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (NULL !== ($tmp = @mysqli_dump_debug_info()))
-               printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_dump_debug_info($link)))
-               printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index a0b5365432b17bc2915acde019ce9d66dcb72524..58eb63cb2b475c6d9e3d5191b160516dc8c53b23 100644 (file)
@@ -16,9 +16,6 @@ require_once('skipifconnectfailure.inc');
        if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
                printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket);
 
-       if (NULL !== ($tmp = @$mysqli->dump_debug_info($link)))
-               printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!is_bool($tmp = $mysqli->dump_debug_info()))
                printf("[003] Expecting boolean/[true|false] value, got %s/%s, [%d] %s\n",
                        gettype($tmp), $tmp,
index 0a9c2453410a981a1ac7ae81ef30ce59de25e38a..f26a30e089dd7da2c9e3e83280e61ff14cf7aebf 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_errno()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_errno($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index fd61f0f5d272d55eb727da0711c446e9e9526a4e..4154f45f1defeda58d0d07a2f1b53727366f7bfa 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_error()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_error($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index f4d8da91101983d7f2c1dd5365ddf74a56ef614e..81279318829b9d08de97c540d949d10f8d49b45d 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_error()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_error($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index f9a7ee37704d96dda7f0ac69005baf365f318a22..9f18499454fb95abbe3fd4fd27343c2ffc04f068 100644 (file)
@@ -12,15 +12,6 @@ if (!function_exists('mysqli_fetch_all'))
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_fetch_all()))
-                       printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_all($link)))
-                       printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
                        printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
index e9dd1602b5d4bd3c83365d45f189ea2fe7d273c3..775c6f20c439976eb99fa7407383aae2fa5e51cb 100644 (file)
@@ -9,14 +9,6 @@ require_once('skipifconnectfailure.inc');
 --FILE--
 <?php
        require_once("connect.inc");
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_fetch_array()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_array($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 5")) {
index 6b98b5f51c7423fcc02e2b6740a66775701d0631..3097eb2bc44a4640b26fc382934ced243f8ef901 100644 (file)
@@ -10,17 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
        // Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
 
-       if (!is_null($tmp = @mysqli_fetch_assoc()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_assoc($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) {
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
index e4f6465176f1bd676b557e947dd448e9fdc68a23..db3457a4a0dd9bde3a33a85062f34440ee73c118 100644 (file)
@@ -24,9 +24,6 @@ require_once('skipifconnectfailure.inc');
                printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @$res->fetch_assoc($link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$res = $mysqli->query("SELECT id, label FROM test ORDER BY id LIMIT 1")) {
                printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
        }
index 684795a48ef63b97a8d58842bedcfb7b8843e17f..5035cf70d2c2b21212561f07010b991053869426 100644 (file)
@@ -10,15 +10,7 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
        // Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
-       if (!is_null($tmp = @mysqli_fetch_field()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_field($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
        require('table.inc');
 
index be883ef625440d3be54f6927c454fd6bec98126d..5acc3b75d4995a5cdfe3cfc6da957e078ba0fe0f 100644 (file)
@@ -10,18 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_fetch_field_direct()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_field_direct($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_field_direct($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1")) {
index c240050e172ffec1ea038a6962bcbeb267735c9c..c1220c783257e3c1783dc3af769bffd55563621a 100644 (file)
@@ -10,13 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
        $mysqli = new mysqli();
        $res = @new mysqli_result($mysqli);
-       if (!is_null($tmp = @$res->fetch_field_direct()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
        require('table.inc');
 
@@ -28,15 +23,6 @@ require_once('skipifconnectfailure.inc');
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        }
 
-       if (!is_null($tmp = @$res->fetch_field_direct()))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @$res->fetch_field_direct($link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @$res->fetch_field_direct($link, $link)))
-               printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        var_dump($res->fetch_field_direct(-1));
        var_dump($res->fetch_field_direct(0));
        var_dump($res->fetch_field_direct(2));
index 2293c9581a8f5a5b1b99a91a2c6035ecb64da776..35fdbb050e5a241b70cf8a440aab8cfaef0ed1db 100644 (file)
@@ -10,23 +10,15 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
        // Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
        $mysqli = new mysqli();
        $res = @new mysqli_result($mysqli);
-       if (false !== ($tmp = @$res->fetch_field()))
-               printf("[001] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
        require('table.inc');
        if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
                printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @$res->fetch_field($link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        // Make sure that client, connection and result charsets are all the
        // same. Not sure whether this is strictly necessary.
        if (!$mysqli->set_charset('utf8'))
index c79555c3a15d49e04a84002344aecdfada9bb4f5..6dee8108f9047c5f54342989ab083ce861eb73bd 100644 (file)
@@ -10,15 +10,7 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
        // Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
-       if (!is_null($tmp = @mysqli_fetch_fields()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_fields($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
        require('table.inc');
 
index 85921f800df68f907d637561570a104f8e2f5e46..b407d91894ff523d5b5887eb98c878cecc1ac74b 100644 (file)
@@ -15,12 +15,6 @@ require_once('skipifconnectfailure.inc');
                        $host, $user, $db, $port, $socket);
        }
 
-       if (!is_null($tmp = @mysqli_fetch_lengths()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_lengths($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) {
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
index 09ea19161ac0610cc29a2f004e2c1114adbaccf8..262b48d49ff4a2dfbebad456222a8df377e65108 100644 (file)
@@ -12,15 +12,6 @@ require_once('skipifconnectfailure.inc');
 
        set_error_handler('handle_catchable_fatal');
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_fetch_object()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_object($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 5")) {
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -145,8 +136,6 @@ require_once('skipifconnectfailure.inc');
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-[E_WARNING] mysqli_fetch_object() expects at least 1 parameter, 0 given in %s on line %d
-[E_WARNING] mysqli_fetch_object() expects parameter 1 to be mysqli_result, null given in %s on line %d
 Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected
 Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected
 NULL
index d8c8cc70fdb6b7c10e6b5ee7f3a5cb1e057c047b..2688f050fac493eb55ea354cf50011b4a86bdb32 100644 (file)
@@ -11,9 +11,6 @@ require_once('skipifconnectfailure.inc');
        require_once("connect.inc");
        set_error_handler('handle_catchable_fatal');
 
-       $tmp    = NULL;
-       $link   = NULL;
-
        $mysqli = new mysqli();
        $res = @new mysqli_result($mysqli);
        if (false !== ($tmp = @$res->fetch_object()))
@@ -28,9 +25,6 @@ require_once('skipifconnectfailure.inc');
                printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
        }
 
-       if (!is_null($tmp = @$res->fetch_object($link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        try {
                if (!is_null($tmp = @$res->fetch_object($link, $link)))
                        printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
@@ -132,7 +126,6 @@ require_once('skipifconnectfailure.inc');
 [E_WARNING] mysqli_result::__construct(): invalid object or resource mysql%s
 %s on line %d
 [E_WARNING] mysqli_result::fetch_object(): Couldn't fetch mysqli_result in %s on line %d
-[E_WARNING] mysqli_result::fetch_object() expects parameter 1 to be string, object given in %s on line %d
 [0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
 [0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
 [0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, null given in %s on line %d
index 7ca1b9a132caa04cc1367ccfa1ae23c98e0a62a9..c16ca1da776843fd5e6d22e9a9497243a18de769 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_fetch_row()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_fetch_row($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT id, label, id AS _id FROM test ORDER BY id LIMIT 1")) {
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
index d6581c6699cd13100103b343734baf90dd093a6d..18fc3c9ec1e46e8f8e3c5fca09bfd197a1fbb3b3 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_field_count()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_field_count($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        var_dump(mysqli_field_count($link));
index c34cf3f6475742a37855d551cb3ed7b8134f20dd..3cd60c7ce9db01f42fa4c360e1a9832f997af4d4 100644 (file)
@@ -56,15 +56,6 @@ require_once('skipifconnectfailure.inc');
 
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_field_seek()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_field_seek($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        // Make sure that client, connection and result charsets are all the
@@ -99,10 +90,6 @@ require_once('skipifconnectfailure.inc');
        var_dump(mysqli_field_tell($res));
        var_dump(mysqli_field_seek($res, 2));
        var_dump(mysqli_fetch_field($res));
-       var_dump(mysqli_field_seek($res, PHP_INT_MAX + 1));
-
-       if (!is_null($tmp = @mysqli_field_seek($res, 0, "too many")))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
        mysqli_free_result($res);
 
@@ -217,9 +204,6 @@ int(2)
 Warning: mysqli_field_seek(): Invalid field offset in %s on line %d
 bool(false)
 bool(false)
-
-Warning: mysqli_field_seek() expects parameter 2 to be int, float given in %s on line %d
-NULL
 bool(true)
 object(stdClass)#%d (13) {
   ["name"]=>
index 9885c1d9d8692fbfdaf61a40df7522c95860ffd9..0b1d3bd0c1da46f8027731ad10cb09568c02ccff 100644 (file)
@@ -10,31 +10,17 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_field_tell()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_field_tell($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT id FROM test ORDER BY id LIMIT 1", MYSQLI_USE_RESULT)) {
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        }
 
        var_dump(mysqli_field_tell($res));
-       var_dump(mysqli_field_seek(1));
        var_dump(mysqli_field_tell($res));
        var_dump(mysqli_fetch_field($res));
        var_dump(mysqli_fetch_field($res));
        var_dump(mysqli_field_tell($res));
 
-       if (!is_null($tmp = @mysqli_field_tell($res, 'too many arguments')))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-
        var_dump(mysqli_field_seek($res, 2));
        var_dump(mysqli_field_tell($res));
 
@@ -60,9 +46,6 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 int(0)
-
-Warning: mysqli_field_seek() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
 int(0)
 object(stdClass)#%d (13) {
   ["name"]=>
index 6cd7778319fde8d32a7800becff2502ba9288beb..be377a88175d2835cb7783c6cabe39aea3cbe3b9 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_free_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_free_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
        if (!$res = mysqli_query($link, "SELECT id FROM test ORDER BY id LIMIT 1")) {
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -33,7 +24,7 @@ require_once('skipifconnectfailure.inc');
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        }
        print "c\n";
-       var_dump($res = mysqli_store_result($link));
+       var_dump(mysqli_store_result($link));
        var_dump(mysqli_error($link));
        print "[005]\n";
        var_dump(mysqli_free_result($res));
@@ -42,7 +33,7 @@ require_once('skipifconnectfailure.inc');
                printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        }
        print "d\n";
-       var_dump($res = mysqli_use_result($link));
+       var_dump(mysqli_use_result($link));
        var_dump(mysqli_error($link));
        print "[007]\n";
        var_dump(mysqli_free_result($res));
@@ -63,16 +54,12 @@ Warning: mysqli_free_result(): Couldn't fetch mysqli_result in %s on line %d
 bool(false)
 c
 bool(false)
-%s(0) ""
+string(0) ""
 [005]
-
-Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d
 NULL
 d
 bool(false)
-%s(0) ""
+string(0) ""
 [007]
-
-Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d
 NULL
 done!
index 537809dd707b6eb3867cb880a614b00249c16de6..cd7cfb3ae400af6c3a7fdda072738372a9f2e437 100644 (file)
@@ -12,18 +12,6 @@ if (!function_exists('mysqli_get_charset'))
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_get_charset()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_get_charset($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_set_charset($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$res = mysqli_query($link, 'SELECT version() AS server_version'))
index 07ef78f296cd13b08779309c88ae5852ccc325bb..6df6e2bee76409743fb4f7356b2ba440dc5392ad 100644 (file)
@@ -81,10 +81,6 @@ mysqli.allow_local_infile=1
        }
 
 
-       $tmp = $link = null;
-       if (!is_null($tmp = @mysqli_get_client_stats($link)))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require_once("connect.inc");
 
        if (!is_array($info = mysqli_get_client_stats()) || empty($info))
index 80875a44e6092fc269d2290ca524f0fcb7527ae8..45d09b1baf6d7c4c058822e82a2581f8d43b240a 100644 (file)
@@ -14,13 +14,6 @@ if (!function_exists('mysqli_get_connection_stats')) {
 ?>
 --FILE--
 <?php
-       $tmp = $link = null;
-       if (!is_null($tmp = @mysqli_get_connection_stats()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_get_connection_stats($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require("table.inc");
 
        if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
index ada57f7d9f60b5fa2cfd3c8948638372d243ce78..534765808b46945a0bf7945ef48b258c68967f52 100644 (file)
@@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       if (!is_null($tmp = @mysqli_get_host_info()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_get_host_info(NULL)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require "table.inc";
        if (!is_string($info = mysqli_get_host_info($link)) || ('' === $info))
                printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
index b24ab11fbdfee3f57644c5db6d577bc7d42609e0..c46fe30379698ed890242c1bcbffb8135b19481c 100644 (file)
@@ -10,19 +10,10 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       if (!is_null($tmp = @mysqli_get_proto_info()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_get_proto_info(NULL)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require "table.inc";
        if (!is_int($info = mysqli_get_proto_info($link)) || ($info < 1))
                printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
 
-       if (!is_null($tmp = @mysqli_get_proto_info('too many', 'arguments')))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --EXPECT--
index 3ea1b4a70d34d1719abf079a94446d2e4c2a2507..25278528a605717854406f338ddd45e57595f59e 100644 (file)
@@ -10,19 +10,10 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       if (!is_null($tmp = @mysqli_get_server_info()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_get_server_info(NULL)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require "table.inc";
        if (!is_string($info = mysqli_get_server_info($link)) || ('' === $info))
                printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
 
-       if (!is_null($tmp = @mysqli_get_server_info('too', 'many arguments')))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --CLEAN--
index ddbf4e73bb62257f02be4b1a15af351a7b2e1789..6589e335b46959a9b23064a3330ea463596c6c3a 100644 (file)
@@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       if (!is_null($tmp = @mysqli_get_server_version()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_get_server_version(NULL)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require "table.inc";
        /* 5.1.5 -> 50105 -- major_version*10000 + minor_version *100 + sub_version */
        /* < 30000 = pre 3.2.3, very unlikely! */
index 56ee2cce051354bf2702b6fe600dfefbcf5a7d49..b3a090b6e81ee1de3686198168a3943126ffc6b5 100644 (file)
@@ -12,12 +12,6 @@ mysqli.allow_local_infile=1
 <?php
        require_once("connect.inc");
 
-       if (!is_null($tmp = @mysqli_info()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_info(NULL)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require "table.inc";
        if (!$res = mysqli_query($link, "INSERT INTO test(id, label) VALUES (100, 'a')"))
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
index 7d4c0e085c6b2fe248b168b559d66eddc1ed2895..383ed087b74a8b92482e5edcb4c6f2838a243ab6 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_insert_id()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_insert_id($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (0 !== ($tmp = mysqli_insert_id($link)))
index 85eb90e65ac76bd7032fc45130e19bf07528d548..7d96ac94267d797eff0ea741810493bbade72f2c 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_kill()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_kill($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        // Zend will cast the NULL to 0
index f3469e20e6e834bb64f03b51fc34bfd7fa969119..8586cb92760eb29f364f0bd0c1ac67bc2a03a8d4 100644 (file)
@@ -25,14 +25,6 @@ mysqli.max_links=1
                                $i, mysqli_connect_errno(), mysqli_connect_error(),
                                mysqli_errno($links[$i]), mysqli_error($links[$i]));
 
-       for ($i = 1; $i <= 5; $i++) {
-               if ($res = mysqli_query($links[$i], 'SELECT id FROM test LIMIT 1')) {
-                       printf("[%03d] Can run query on link %d\n", 5 + $i, $i);
-                       mysqli_free_result($res);
-               }
-               mysqli_close($links[$i]);
-       }
-
        mysqli_close($link);
        print "done!";
 ?>
@@ -53,24 +45,4 @@ Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d
 Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d
 
 Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
 done!
index 4ce6a19c792842e13cea1cf97b0e245540e0ef5c..50a09c0fef03cabd2cfbf7fb2749f995b43279c0 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_more_results()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_more_results($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        print "[004]\n";
index 28898b1dcb05a8c3b588c5204a722928a090c2c2..12ffe2c38dbdbc410cb48bb06fd293565f2e64d1 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_multi_query()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_multi_query($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (false !== ($tmp = mysqli_multi_query($link, "")))
index e01f507c20f736fa0cba383b726e02a3f7602bd8..2967d12983579e99eb4f3bad860f07465f01ba8b 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_next_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_next_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (false !== ($tmp = mysqli_next_result($link)))
index f891b309c2d3b7f55abab6634ccf2f82262cf96d..1f33b4d2d9fec79e6a13c4dab7491da37314c544 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_num_fields()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_num_fields($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        function func_test_mysqli_num_fields($link, $query, $expected, $offset, $test_free = false) {
index c6e646e4c3e9268feb386da78f500d06a6b96318..15d3f90257cb7353e8847e35f5c2329cdeb51541 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_num_rows()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_num_rows($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        function func_test_mysqli_num_rows($link, $query, $expected, $offset, $test_free = false) {
@@ -28,16 +19,17 @@ require_once('skipifconnectfailure.inc');
                        return;
                }
 
-               if ($expected !== ($tmp = mysqli_num_rows($res)))
-                       printf("[%03d] Expecting %s/%d, got %s/%d\n", $offset + 1,
-                               gettype($expected), $expected,
-                               gettype($tmp), $tmp);
-
-               mysqli_free_result($res);
+               if (!is_bool($res)) {
+                       if ($expected !== ($tmp = mysqli_num_rows($res)))
+                               printf("[%03d] Expecting %s/%d, got %s/%d\n", $offset + 1,
+                                       gettype($expected), $expected,
+                                       gettype($tmp), $tmp);
 
-               if ($test_free && (false !== ($tmp = mysqli_num_rows($res))))
-                       printf("[%03d] Expecting false, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
+                       mysqli_free_result($res);
 
+                       if ($test_free && (false !== ($tmp = mysqli_num_rows($res))))
+                               printf("[%03d] Expecting false, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
+               }
        }
 
        func_test_mysqli_num_rows($link, "SELECT 1 AS a", 1, 5);
@@ -78,10 +70,6 @@ require_once('skipifconnectfailure.inc');
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in %s on line %d
-
-Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d
-
 Warning: mysqli_num_rows(): Couldn't fetch mysqli_result in %s on line %d
 run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
 
index 6d5247943b21e65c123bf255bd7fc5c921a9680d..13590bf5a9571399e2862645315b3bb495c99a65 100644 (file)
@@ -27,30 +27,12 @@ require_once('skipifconnectfailure.inc');
        if ($IS_MYSQLND && defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE'))
                $valid_options[] = constant('MYSQLI_OPT_INT_AND_FLOAT_NATIVE');
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_options()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_options($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        $link = mysqli_init();
 
        /* set it twice, checking if memory for the previous one is correctly freed */
        mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "utf8");
        mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "latin1");
 
-       if (!is_null($tmp = @mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_options($link, "s", 'extra_my.cnf')))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_options($link, MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0', 'foo')))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        // print "run_tests.php don't fool me with your 'ungreedy' expression '.+?'!\n";
        var_dump("MYSQLI_READ_DEFAULT_GROUP",   mysqli_options($link, MYSQLI_READ_DEFAULT_GROUP, 'extra_my.cnf'));
        var_dump("MYSQLI_READ_DEFAULT_FILE",    mysqli_options($link, MYSQLI_READ_DEFAULT_FILE, 'extra_my.cnf'));
index 6ddb29efefc77eb1dbebd9ee330920ad22778c1b..93deeebfa32d6378f2b674ba7c95f223b5cbd1e0 100644 (file)
@@ -10,17 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_ping()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (!is_null($tmp = @mysqli_ping($link, $link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        var_dump(mysqli_ping($link));
 
        // provoke an error to check if mysqli_ping resets it
index b9c66381f9bee2af2b6950a8dca4c3aa51d1ab75..f6d99c8e131170788caa512a8b6800a2cc36106e 100644 (file)
@@ -25,29 +25,6 @@ if (!$IS_MYSQLND)
        if (!$link = get_connection())
                printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
 
-       if (NULL !== ($tmp = @mysqli_poll()))
-               printf("[002] Expecting NULL got %s\n", var_export($tmp, true));
-
-       $l = array($link);
-       if (NULL !== ($tmp = @mysqli_poll($l)))
-               printf("[003] Expecting NULL got %s\n", var_export($tmp, true));
-
-       $l = array($link); $n = NULL;
-       if (NULL !== ($tmp = @mysqli_poll($l, $n)))
-               printf("[004] Expecting NULL got %s\n", var_export($tmp, true));
-
-       $l = array($link); $n = NULL;
-       if (NULL !== ($tmp = @mysqli_poll($l, $n, $n)))
-               printf("[005] Expecting NULL got %s\n", var_export($tmp, true));
-
-       $l = array($link); $e = NULL; $r = NULL;
-       if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, -1)))
-               printf("[007] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true));
-
-       $l = array($link); $e = NULL; $r = NULL;
-       if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, 0, -1)))
-               printf("[008] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true));
-
        $read = $error = $reject = array($link);
        if (0 !== ($tmp = (mysqli_poll($read, $error, $reject, 0, 1))))
                printf("[009] Expecting int/0 got %s/%s\n", gettype($tmp), var_export($tmp, true));
index 0c3bedf5b50244a14eb0ca9f71596a7d20687f13..c6400e0b17e1b3a35c143c45209228da8bdd056e 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_prepare()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_prepare($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (false !== ($tmp = @mysqli_prepare($link, false)))
@@ -105,15 +96,8 @@ require_once('skipifconnectfailure.inc');
        var_dump(mysqli_stmt_prepare($stmt, 'SELECT 1; SELECT 2'));
 
        mysqli_stmt_close($stmt);
-
-       if (!is_null($tmp = @mysqli_stmt_prepare($link, 'SELECT id FROM test', 'foo')))
-               printf("[023] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        mysqli_close($link);
 
-       if (!is_null($tmp = @mysqli_stmt_prepare($link, 'SELECT id FROM test')))
-               printf("[024] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --CLEAN--
index bfa703bb010e8509aeab10965f6276e31630d078..cf6d282c638f7216b9055529e5594f3c235c5451 100644 (file)
@@ -10,23 +10,11 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_query()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_query($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (false !== ($tmp = @mysqli_query($link, '')))
                printf("[002a] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
 
-       if (NULL !== ($tmp = @mysqli_query($link, "SELECT 1 AS a", MYSQLI_USE_RESULT, "foo")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = mysqli_query($link, 'THIS IS NOT SQL')))
                printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
 
index 819a849d94f196e85c28aac849addb3a1465589a..f167b4373ad361f491e3d4962b4c7cf3ef9acad7 100644 (file)
@@ -16,23 +16,11 @@ mysqli_close($link);
 <?php
        include_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_query()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_query($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require_once('table.inc');
 
        if (TRUE !== ($tmp = @mysqli_query($link, "set names utf8")))
                printf("[002.5] Expecting TRUE, got %s/%s\n", gettype($tmp), $tmp);
 
-       if (NULL !== ($tmp = @mysqli_query($link, "SELECT 1 AS колона", MYSQLI_USE_RESULT, "foo")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = mysqli_query($link, 'това не е ескюел')))
                printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
 
index 5e4b56173b51bfb7b2ccd984c0f8cc3a14281242..32c37b9a14a46bfab6e5b75212210f207e0dc6fb 100644 (file)
@@ -12,34 +12,7 @@ mysqli.allow_local_infile=1
 <?php
        include("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link)))
-               printf("[001a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link)))
-               printf("[001b] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link)))
-               printf("[001c] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link)))
-               printf("[001d] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link)))
-               printf("[001e] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link, $link)))
-               printf("[001f] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link, $link, $link)))
-               printf("[001g] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        //  ( mysqli link [, string hostname [, string username [, string passwd [, string dbname [, int port [, string socket [, int flags]]]]]]]
-       if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link, $link, $link, $link)))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = mysqli_init())
                printf("[002] mysqli_init() failed\n");
 
index 05588cac63948a786d99c646acef18fe4f12ee82..57ab99eb89b3122553509bee7775d57a343eab56 100644 (file)
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (NULL !== ($tmp = @mysqli_real_escape_string()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_escape_string($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (NULL !== ($tmp =@mysqli_real_escape_string($link, "foo", "foo")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if ('\\\\' !== ($tmp = mysqli_real_escape_string($link, '\\')))
                printf("[004] Expecting \\\\, got %s\n", $tmp);
 
@@ -47,10 +35,6 @@ require_once('skipifconnectfailure.inc');
        if (false !== ($tmp = mysqli_real_escape_string($link, 'foo')))
                printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
-       /* Make sure that the function alias exists */
-       if (NULL !== ($tmp = @mysqli_escape_string()))
-               printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --EXPECTF--
index b3465ad2b10e855f6e723494a9768aa53bec6cb8..3db0ecce62ec55990528b6da19b04c78a2c83e88 100644 (file)
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (NULL !== ($tmp = @mysqli_real_escape_string()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (NULL !== ($tmp = @mysqli_real_escape_string($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (NULL !== ($tmp =@mysqli_real_escape_string($link, "фуу", "бар")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if ('фу\\\\бар' !== ($tmp = mysqli_real_escape_string($link, 'фу\\бар')))
                printf("[004] Expecting фу\\\\бар, got %s\n", $tmp);
 
index 9b99435d420b260ae3baab5e68b6e12f81ceaff8..4515810310795599c12281043c646c9a7cde0042 100644 (file)
@@ -9,20 +9,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_real_query()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_real_query($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (NULL !== ($tmp = @mysqli_real_query($link, "SELECT 1 AS a", MYSQLI_USE_RESULT, "foo")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = mysqli_real_query($link, 'THIS IS NOT SQL')))
                printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
 
index b43b6b247830482bc3f0d4d14eeb1b612f4fca07..5f13c2bbd93f1a388cc40314129b97340ac32365 100644 (file)
@@ -25,16 +25,6 @@ if (!$IS_MYSQLND)
        if (!$link = get_connection())
                printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
 
-       if (NULL !== ($tmp = @mysqli_reap_async_query()))
-               printf("[002] Expecting NULL got %s\n", var_export($tmp, true));
-
-       $l = array($link);
-       if (NULL !== ($tmp = @mysqli_reap_async_query($l)))
-               printf("[003] Expecting NULL got %s\n", var_export($tmp, true));
-
-       if (NULL !== ($tmp = @mysqli_reap_async_query($link, $link)))
-               printf("[004] Expecting NULL got %s\n", var_export($tmp, true));
-
 
        function poll_async($offset, $link, $links, $errors, $reject, $exp_ready, $use_oo_syntax) {
 
index bb9a77a0af2349bd26f9c1554acf84427482b6bd..219b5975b49e737f7c5052049ebbe2cad038f3fe 100644 (file)
@@ -20,23 +20,10 @@ if (!have_innodb($link))
        $tmp    = NULL;
        $link   = NULL;
 
-       if (!is_null($tmp = @mysqli_release_savepoint()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_release_savepoint($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       $name = array();
-       if (!is_null($tmp = @mysqli_release_savepoint($link, $name)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_release_savepoint($link, 'foo', $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = mysqli_release_savepoint($link, '')))
                printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
index 889fda5fbd0870fdf66626f1384179292d06efb6..6215e6508c7f60a99ec1087318c605e6338d62df 100644 (file)
@@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (NULL !== ($tmp = @mysqli_report()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (true !== ($tmp = mysqli_report(-1)))
                printf("[002] Expecting boolean/true even for invalid flags, got %s/%s\n", gettype($tmp), $tmp);
 
index 15fc21c16a7388f5a254b2f0b738ea48da43f4b8..72a79cfcaab7b5d880ff001743e42f0b725b375d 100644 (file)
@@ -17,22 +17,10 @@ mysqli_rollback()
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_rollback()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_rollback($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @mysqli_rollback($link, 'foo')))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (true !== ($tmp = mysqli_autocommit($link, false)))
                printf("[005] Cannot turn off autocommit, expecting true, got %s/%s\n", gettype($tmp), $tmp);
 
index cb0d1169c884c256c9dd0c8df6d3ec1671850488..00e51deb6e71a72e4f8fc8fe5143e12c3cc27d98 100644 (file)
@@ -17,26 +17,11 @@ if (!have_innodb($link))
 <?php
        require_once("connect.inc");
         /* {{{ proto bool mysqli_savepoint(object link, string name) */
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_savepoint()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_savepoint($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       $name = array();
-       if (!is_null($tmp = @mysqli_savepoint($link, $name)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_savepoint($link, 'foo', $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = mysqli_savepoint($link, '')))
                printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
index 041b7fbb22b7e5818348711520cd9d9e9c4e8f98..e023866c1708e4a94b5fe3d65fa42c5098b4dd4c 100644 (file)
@@ -11,22 +11,10 @@ require_once('skipifconnectfailure.inc');
        require_once("connect.inc");
        require_once("table.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_select_db()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_select_db($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @mysqli_select_db($link, $db, "foo")))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        /* does not make too much sense, unless we have access to at least one more database than $db */
        if (!mysqli_select_db($link, $db))
                printf("[005] Cannot select DB %s, [%d] %s\n", $db, mysqli_errno($link), mysqli_error($link));
index df90333867573a7aed3e25ee4c6e35c2191dbbf3..33ebb8347b797faa55421dc042b6041268d8d614 100644 (file)
@@ -48,18 +48,6 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_set_charset()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_set_charset($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_set_charset($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$res = mysqli_query($link, 'SELECT @@character_set_connection AS charset, @@collation_connection AS collation'))
index 757b8490b739d7b5c092e0b53db6b706c8c1b811..6769d2c53051d5872492862cdfb31df129d6085e 100644 (file)
@@ -10,26 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_set_opt()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_set_opt($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        $link = mysqli_init();
 
-       if (!is_null($tmp = @mysqli_set_opt($link, MYSQLI_OPT_CONNECT_TIMEOUT)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_set_opt($link, "s", 'extra_my.cnf')))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_set_opt($link, MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0', 'foo')))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        // print "run_tests.php don't fool me with your 'ungreedy' expression '.+?'!\n";
        var_dump(mysqli_set_opt($link, MYSQLI_READ_DEFAULT_GROUP, 'extra_my.cnf'));
        var_dump(mysqli_set_opt($link, MYSQLI_READ_DEFAULT_FILE, 'extra_my.cnf'));
index b36291872eb6675063f1d8372f76fa09417ff0a7..55dd115403ea7b6dc64907c5d183ee7ffd676c4d 100644 (file)
@@ -10,19 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_sqlstate()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_sqlstate($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       var_dump(@mysqli_sqlstate($link, "foo"));
-
        var_dump(mysqli_sqlstate($link));
        mysqli_query($link, "SELECT unknown_column FROM test");
        var_dump(mysqli_sqlstate($link));
@@ -40,7 +29,6 @@ require_once('skipifconnectfailure.inc');
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-NULL
 %s(5) "00000"
 %s(5) "42S22"
 %s(5) "00000"
index 8463cc58b8f3d4f801431c7ca97201155b6683f7..4f28350ef57a7e306d4156ca241f406c042317a0 100644 (file)
@@ -12,27 +12,6 @@ if (!function_exists('mysqli_ssl_set'))
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_ssl_set()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_ssl_set($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_ssl_set($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link, $link)))
-               printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        /*
        This function always returns TRUE value.
 
index 2507a4c8f84553e9c5d30650f8fe35bcecfe442a..71f7af5a5483b366322c5e020a9baf4de96cae83 100644 (file)
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stat()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stat($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (!is_null($tmp = @mysqli_stat($link, "foo")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if ((!is_string($tmp = mysqli_stat($link))) || ('' === $tmp))
                printf("[004] Expecting non empty string, got %s/'%s', [%d] %s\n",
                        gettype($tmp), $tmp, mysqli_errno($link), mysql_error($link));
index 1e08f0dec369d11bf1fddbfba4b6b8ff8f381059..cfe5d535168c25a99a16c32b44d3822abe4aae41 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_affected_rows()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_affected_rows($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
                printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
index 92937a15ce64f8cdd1ac5b16bdfeadd462c68e60..f3634a76219b6905015ec608d5d4f63031e912fe 100644 (file)
@@ -10,23 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_attr_get()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_attr_get($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_attr_get($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (!is_null($tmp = @mysqli_stmt_attr_get($link, $link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        $valid_attr = array("max_length" => MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
        if (mysqli_get_client_version() > 50003)
                $valid_attr["cursor_type"] = MYSQLI_STMT_ATTR_CURSOR_TYPE;
index b3d60380cb4a517b52ca4c070f5cb7603c45e130..6e5710a0fc6419e5c4a37f1c0301653dc4e4795c 100644 (file)
@@ -8,22 +8,7 @@ require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
 <?php
-       require_once("connect.inc");
-
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_attr_set()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_attr_set($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_attr_set($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_attr_set($link, $link, $link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+require_once("connect.inc");
 
        require('table.inc');
 
index d2d825438e40f7f207369861b9294214bbe943bd..027460fc5f4787a41259b812057afece90d333d0 100644 (file)
@@ -19,18 +19,6 @@ require_once('skipifconnectfailure.inc');
        */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_bind_param()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_bind_param($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_bind_param($link, $link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        $stmt = mysqli_stmt_init($link);
@@ -379,10 +367,6 @@ require_once('skipifconnectfailure.inc');
        mysqli_stmt_close($stmt);
        mysqli_close($link);
 
-       /* Check that the function alias exists. It's a deprecated function,
-       but we have not announce the removal so far, therefore we need to check for it */
-       if (!is_null($tmp = @mysqli_stmt_bind_param()))
-                       printf("[021] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
        print "done!";
 ?>
 --CLEAN--
index dcd05e5f68fb4f68499a242e5653c7b6e9ad35a9..c166d91c48c1303944b374d3e43b6bda07893b4c 100644 (file)
@@ -9,25 +9,12 @@ require_once('skipifconnectfailure.inc');
 --FILE--
 <?php
        require_once("connect.inc");
-
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_bind_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_bind_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        $stmt = mysqli_stmt_init($link);
        if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 1"))
                printf("[002a] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
 
-       if (!is_null($tmp = mysqli_stmt_bind_result($stmt)))
-               printf("[002b] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        mysqli_stmt_close($stmt);
        $stmt = mysqli_stmt_init($link);
 
@@ -295,11 +282,6 @@ require_once('skipifconnectfailure.inc');
        if (mysqli_get_server_version($link) >= 50600)
                func_mysqli_stmt_bind_result($link, $engine, "s", "TIME", "13:31:34.123456", 1770, "13:31:34");
 
-       /* Check that the function alias exists. It's a deprecated function,
-       but we have not announce the removal so far, therefore we need to check for it */
-       if (!is_null($tmp = @mysqli_stmt_bind_result()))
-               printf("[3000] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        $stmt = mysqli_stmt_init($link);
        if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(id, label) VALUES (1000, 'z')"))
                printf("[3001] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
@@ -318,8 +300,6 @@ require_once('skipifconnectfailure.inc');
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-Warning: mysqli_stmt_bind_result() expects at least 2 parameters, 1 given in %s on line %d
-
 Warning: mysqli_stmt_bind_result(): invalid object or resource mysqli_stmt
  in %s on line %d
 
index 6ea64e815a19f1f6b68e7e290f6c4144ef0dc204..dfeab7075d38389801719576c8d67bb6a5281e7c 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_close()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_close($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index f9224eef6258a0470d38849e1cd1a4651b03c0e2..23ecea0be32edad135836fe043386ffa2f6b8b0f 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_data_seek()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_data_seek($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index d98a98b87ab866b4ae72923eaf784cc4d4ff3011..39760e300361252f652eeb5159254216a413cdef 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_errno()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_errno($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index ad8efef6028ee1099f8154759e5d032f8ece3802..49e03c8aeec6fec505ae05aeabddd6f7b8744f90 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_error()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_error($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index d97111a6fdee3be8bc7f54f9724ba5bbb2bea497..fd0fd3c628c25d250bed6639ff894b2311bb5a19 100644 (file)
@@ -16,15 +16,6 @@ if (mysqli_get_server_version($link) <= 40100) {
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_execute()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_execute($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index 4b41c9213d7a4782673109791a710c2ac1d959cc..25a1f52eb1046e60a94dd8d059c5934cf1172263 100644 (file)
@@ -15,15 +15,6 @@ require_once('skipifconnectfailure.inc');
        */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_fetch()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_fetch($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
@@ -78,11 +69,6 @@ require_once('skipifconnectfailure.inc');
 
        mysqli_close($link);
 
-       /* Check that the function alias exists. It's a deprecated function,
-       but we have not announce the removal so far, therefore we need to check for it */
-       if (!is_null($tmp = @mysqli_stmt_fetch()))
-               printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --CLEAN--
index 847fe04a3b9bf3a7ab5a5b150e38e416dad586b9..2fa8a8ac8033688fdaa4916984383b521983ccc0 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_field_count()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_field_count($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        $stmt = mysqli_stmt_init($link);
index 292905ab633733fc9d6ad5d6fedf03a708850e99..9d28d8a11667919653adef33ad2f58e1a4de2e1b 100644 (file)
@@ -15,15 +15,6 @@ require_once('skipifconnectfailure.inc');
        */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_free_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_free_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index e8f2843920c3b9ad285ef5e198da87d5984eaad3..594e112cacc8d2fa5bc84a96f5332a80fd112830 100644 (file)
@@ -18,15 +18,6 @@ if (!function_exists('mysqli_stmt_get_result'))
        */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_get_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_get_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index 00ed7adee49e5c7e618b31ecb7a1a5bc26e93163..ab261bd82b5d857e0682034426871b0c64735df4 100644 (file)
@@ -17,23 +17,11 @@ if (!function_exists('mysqli_stmt_get_result'))
        */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_get_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_get_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
-       if (!is_null($tmp = @mysqli_stmt_get_result($stmt, "foo")))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id ASC LIMIT 1"))
                printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
 
index 51198523c9ed970b8b12066d8d1728d5724244fb..c63a91487bc75b4a4b257eb085c21d2b4f80b808 100644 (file)
@@ -67,9 +67,6 @@ if (!function_exists('mysqli_stmt_get_result'))
        if (false !== ($tmp = $res->data_seek($res->num_rows + 1)))
                printf("[012] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
 
-       if (NULL !== ($tmp = $res->data_seek(PHP_INT_MAX + 1)))
-               printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
        for ($i = 0; $i < 100; $i++) {
                /* intentionally out of range! */
                $pos = mt_rand(-1, 4);
@@ -118,8 +115,6 @@ if (!function_exists('mysqli_stmt_get_result'))
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-Warning: mysqli_result::data_seek() expects parameter 1 to be int, float given in %s on line %d
-
 Warning: mysqli_data_seek(): Couldn't fetch mysqli_result in %s on line %d
 
 Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in %s on line %d
index 1ebe6d051f2133632a3fc146034ce7a666d48931..958a27855451f8f360625eed8786117f04a4a246 100644 (file)
@@ -26,15 +26,6 @@ mysqli_query($link, "DROP TABLE IF EXISTS test");
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_get_warnings()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_get_warnings($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index b82a855dd2ba374c4d24f9471afced312b69c0cf..c16f708fe65cbb0aecc9ef34fe69c9790b70bee3 100644 (file)
@@ -15,15 +15,6 @@ require_once('skipifconnectfailure.inc');
        */
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_init()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_init($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!is_object($stmt = mysqli_stmt_init($link)))
@@ -34,9 +25,6 @@ require_once('skipifconnectfailure.inc');
 
        mysqli_stmt_close($stmt);
 
-       if (NULL !== ($tmp = mysqli_stmt_init($stmt)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        mysqli_close($link);
 
        if (false !== ($tmp = mysqli_stmt_init($link)))
@@ -52,7 +40,5 @@ require_once('skipifconnectfailure.inc');
 Warning: mysqli_stmt_close(): invalid object or resource mysqli_stmt
  in %s on line %d
 
-Warning: mysqli_stmt_init() expects parameter 1 to be mysqli, object given in %s on line %d
-
 Warning: mysqli_stmt_init(): Couldn't fetch mysqli in %s on line %d
 done!
index e3ef9a25ec27f6f07c6e44f2fb300756dbf58580..fedf3056505bcb685f30f51c39767da492905d00 100644 (file)
@@ -10,16 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_insert_id()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       $stmt = @new mysqli_stmt($link);
-       if (!is_null($tmp = @mysqli_insert_id($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        $stmt = mysqli_stmt_init($link);
index 5355b3deb7e17710a44153372fe114636345098d..f798e22f716c2fba86a05318544e6acf87bb4357 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_num_rows()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_num_rows($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index e847d165f605151613013a1a407a35c8062caa9f..4176de60c55ab4127b403022da2ac6d206c1cfcd 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_param_count()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_param_count($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
@@ -53,11 +44,6 @@ require_once('skipifconnectfailure.inc');
 
        mysqli_close($link);
 
-       /* Check that the function alias exists. It's a deprecated function,
-       but we have not announce the removal so far, therefore we need to check for it */
-       if (!is_null($tmp = @mysqli_stmt_param_count()))
-               printf("[041] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        print "done!";
 ?>
 --CLEAN--
index d0e38075d9e3f443ac32a5358b43af95492a4ac5..52c7597ef6ff03167b9966bdefafcd6bfc312461 100644 (file)
@@ -16,23 +16,11 @@ require_once('skipifconnectfailure.inc');
        // fetch tests, because the fetch tests would have to call prepare/execute etc.
        // anyway.
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_prepare()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_prepare($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
-       if (NULL !== ($tmp = @mysqli_stmt_prepare($stmt)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = mysqli_stmt_prepare($stmt, '')))
                printf("[005] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
 
index b7ec4e3ed7427e25e113194902b37bc29e405b02..339b885b726bc59b0d06abc20ded77efdbbeb7c7 100644 (file)
@@ -16,15 +16,6 @@ require_once('skipifconnectfailure.inc');
        // fetch tests, because the fetch tests would have to call prepare/execute etc.
        // anyway.
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_reset()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_reset($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
index 8f4e13ef394696a3efb9d9ff338ac7cafb41bc05..adb7f6f72668b0153a002202f49ee3853f5d05d3 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_result_metadata()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_result_metadata($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
@@ -85,11 +76,6 @@ require_once('skipifconnectfailure.inc');
        if (false !== ($tmp = mysqli_stmt_result_metadata($stmt)))
                printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
-       /* Check that the function alias exists. It's a deprecated function,
-       but we have not announce the removal so far, therefore we need to check for it */
-       if (!is_null($tmp = @mysqli_stmt_result_metadata()))
-               printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        mysqli_close($link);
        print "done!";
 ?>
index 1fc27455115a9440997e148cf5be6b84eb7b9619..b42e393503d6a73be5e385d06822d9111e9259a0 100644 (file)
@@ -10,23 +10,11 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_send_long_data()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_send_long_data($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$stmt = mysqli_stmt_init($link))
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
-       if (NULL !== ($tmp = @mysqli_stmt_send_long_data($stmt, '')))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
                printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
@@ -80,10 +68,6 @@ require_once('skipifconnectfailure.inc');
                printf("[012] Expecting boolean/false, got %s/%s. [%d] %s\n",
                        gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
 
-       if (NULL !== ($tmp = @mysqli_stmt_send_long_data($stmt, PHP_INT_MAX + 1, $blob)))
-               printf("[013] Expecting NULL, got %s/%s. [%d] %s\n",
-                       gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
-
        if (false !== ($tmp = mysqli_stmt_send_long_data($stmt, 999, $blob)))
                printf("[014] Expecting boolean/false, got %s/%s. [%d] %s\n",
                        gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
@@ -115,14 +99,6 @@ require_once('skipifconnectfailure.inc');
        if ($blob != $row['label'])
                printf("[021] Blob value has not been stored properly!\n");
 
-       if (NULL !== ($tmp = @mysqli_stmt_send_long_data($stmt, '')))
-               printf("[022] Expecting NULL, got %s/%s\n");
-
-       /* Check that the function alias exists. It's a deprecated function,
-       but we have not announce the removal so far, therefore we need to check for it */
-       if (!is_null($tmp = @mysqli_stmt_send_long_data()))
-               printf("[023] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        mysqli_close($link);
        print "done!";
 ?>
index 1784106162808c73aef86dcc710a271ed7307a62..2740195931b390aeab7ebe07d9a7d79f7098b871 100644 (file)
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_sqlstate()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_sqlstate($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (!is_null($tmp = @mysqli_stmt_sqlstate($link, '')))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$stmt = mysqli_stmt_init($link))
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
index 89b8ed3bf87cc3f4d01dcad8b03c7163efec1a9f..a6634e56f9ff3e1667f380c0ad502d5812c7edfc 100644 (file)
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_stmt_store_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_stmt_store_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (false !== ($tmp = @mysqli_stmt_store_result(new mysqli_stmt())))
-               printf("[003] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$stmt = mysqli_stmt_init($link))
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
index b87d147e380c2740f8e8492047b114b53cadf0db..5ee8a14f6b818657eb94cd77614de53c9d19564e 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_store_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_store_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
index 4a71d60f41dfb444577996ce9da1f2d434158322..f8e286b54c73e9d1f45209b76917d3804ff32ad0 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_thread_id()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_thread_id($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!is_int($tmp = mysqli_thread_id($link)) || (0 === $tmp))
index 190cafa5d5c4318c7c726b1f736e81212289be6b..650a130c894d361f31bcf85667967159b255e923 100644 (file)
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_use_result()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_use_result($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
        if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
index 9d59f26e521296071797f941cb3cf273c261b3b6..5e6a2e238124ed0ad8ba2c34fdf6db409f5967ad 100644 (file)
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
 <?php
        require_once("connect.inc");
 
-       $tmp    = NULL;
-       $link   = NULL;
-
-       if (!is_null($tmp = @mysqli_warning_count()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_warning_count($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        require('table.inc');
 
-       if (NULL !== ($tmp = @mysqli_warning_count($link, "too_many")))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$res = mysqli_query($link, "SELECT id, label FROM test"))
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
index cdc421117d70cb64c867a173c35397754da84103..e17b4de1b9bc46f46b75d334932948fb8b3ecb7e 100644 (file)
@@ -23,7 +23,6 @@ var_dump(odbc_fetch_row($res));
 var_dump(odbc_result($res, 'test'));
 var_dump(odbc_free_result($res));
 var_dump(odbc_free_result($conn));
-var_dump(odbc_free_result(NULL));
 var_dump(odbc_fetch_row($res));
 var_dump(odbc_result($res, 'test'));
 
@@ -40,9 +39,6 @@ bool(true)
 Warning: odbc_free_result(): supplied resource is not a valid ODBC result resource in %s on line %d
 bool(false)
 
-Warning: odbc_free_result() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
 Warning: odbc_fetch_row(): supplied resource is not a valid ODBC result resource in %s on line %d
 bool(false)
 
index c684ee6d33d7bd4586a4c62a3a45ebdd8f610a0a..806ea7535b67e1410915fa59abfbae467c1425be 100644 (file)
@@ -14,7 +14,7 @@ function bar() {
 }
 function foo() {
     try { return bar(); }
-    finally { @fclose(null); }
+    finally { @str_repeat("foo", -10); }
 }
 
 var_dump(foo());
index f49b77485c4cb0c73c7c5f627aa8284e69f4693c..03f9f29a03d715dacf2bfa9e3521fbad18d3a510 100644 (file)
@@ -20,11 +20,6 @@ $t = new test;
 
 var_dump(openssl_verify("foo", $signature, $pub_key_id, OPENSSL_ALGO_MD5));
 var_dump(openssl_verify("foo", $t, $pub_key_id, OPENSSL_ALGO_MD5));
-var_dump(openssl_verify("foo", new stdClass, $pub_key_id, OPENSSL_ALGO_MD5));
-var_dump(openssl_verify("foo", new stdClass, array(), OPENSSL_ALGO_MD5));
-var_dump(openssl_verify("foo", array(), array(), OPENSSL_ALGO_MD5));
-var_dump(openssl_verify());
-var_dump(openssl_verify(new stdClass, new stdClass, array(), 10000));
 
 echo "Done\n";
 
@@ -37,19 +32,4 @@ bool(false)
 
 Warning: openssl_verify(): supplied key param cannot be coerced into a public key in %s on line %d
 bool(false)
-
-Warning: openssl_verify() expects parameter 2 to be string, object given in %s on line %d
-NULL
-
-Warning: openssl_verify() expects parameter 2 to be string, object given in %s on line %d
-NULL
-
-Warning: openssl_verify() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_verify() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: openssl_verify() expects parameter 1 to be string, object given in %s on line %d
-NULL
 Done
index fa25d93d62ec8787b76ee602d111022485f9ef3d..41a881cc86a240c02b6e30cd437ad8c85ff199eb 100644 (file)
@@ -17,7 +17,6 @@ $t = new test;
 var_dump(openssl_x509_parse("foo"));
 var_dump(openssl_x509_parse($t));
 var_dump(openssl_x509_parse(array()));
-var_dump(openssl_x509_parse());
 var_dump(openssl_x509_parse($cert));
 var_dump(openssl_x509_parse(new stdClass));
 
@@ -26,9 +25,6 @@ var_dump(openssl_x509_parse(new stdClass));
 bool(false)
 bool(false)
 bool(false)
-
-Warning: openssl_x509_parse() expects at least 1 parameter, 0 given in %sbug38261.php on line %d
-NULL
 bool(false)
 
 Recoverable fatal error: Object of class stdClass could not be converted to string in %sbug38261.php on line %d 
index 228a1737640fa306eb0aa235a8c22a5afcbabb26..e9c89d6c0155d89605947dc4ba741de9f84dc2c8 100644 (file)
@@ -27,22 +27,20 @@ $args = array(
 $privkey = openssl_pkey_new($config_arg);
 $csr = openssl_csr_new($dn, $privkey, $args);
 var_dump(openssl_csr_export($csr, $output));
-var_dump(openssl_csr_export($wrong, $output));
+try {
+    var_dump(openssl_csr_export($wrong, $output));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(openssl_csr_export($privkey, $output));
-var_dump(openssl_csr_export(array(), $output));
 var_dump(openssl_csr_export($csr, $output, false));
 ?>
 --EXPECTF--
 bool(true)
-
-Warning: openssl_csr_export() expects parameter 1 to be resource, string given in %s on line %d
-NULL
+openssl_csr_export() expects parameter 1 to be resource, string given
 
 Warning: openssl_csr_export(): supplied resource is not a valid OpenSSL X.509 CSR resource in %s on line %d
 
 Warning: openssl_csr_export(): cannot get CSR from parameter 1 in %s on line %d
 bool(false)
-
-Warning: openssl_csr_export() expects parameter 1 to be resource, array given in %s on line %d
-NULL
 bool(true)
index ccbd00f49ad5667bd17c2c03db38fc738bf8e046..a0c50fc5a16d17823e884b9b8e49fefbce010c80 100644 (file)
@@ -36,9 +36,12 @@ $privkey_file = 'file://' . dirname(__FILE__) . '/private_rsa_2048.key';
 $csr = openssl_csr_new($dn, $privkey_file, $args);
 var_dump(openssl_csr_export_to_file($csr, $csrfile));
 var_dump(file_get_contents($csrfile));
-var_dump(openssl_csr_export_to_file($wrong, $csrfile));
+try {
+    var_dump(openssl_csr_export_to_file($wrong, $csrfile));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(openssl_csr_export_to_file($dh, $csrfile));
-var_dump(openssl_csr_export_to_file(array(), $csrfile));
 var_dump(openssl_csr_export_to_file($csr, $csrfile, false));
 ?>
 --CLEAN--
@@ -69,15 +72,10 @@ sfBgVeqg0P4SWez5fHXqBNcjMdMI5f0bikcDZSIfTHS8FX+PMurLBC8UPB0YNIOl
 JViHkCA9x6m8RJXAFvqmgLlWlUzbDv/cRrDfjWjR
 -----END CERTIFICATE REQUEST-----
 "
-
-Warning: openssl_csr_export_to_file() expects parameter 1 to be resource, string given in %s on line %d
-NULL
+openssl_csr_export_to_file() expects parameter 1 to be resource, string given
 
 Warning: openssl_csr_export_to_file(): supplied resource is not a valid OpenSSL X.509 CSR resource in %s on line %d
 
 Warning: openssl_csr_export_to_file(): cannot get CSR from parameter 1 in %s on line %d
 bool(false)
-
-Warning: openssl_csr_export_to_file() expects parameter 1 to be resource, array given in %s on line %d
-NULL
 bool(true)
index 816c6f9d9046ac296e5c83f7513badd1b3cadc8e..1fadc00f275322245f943dacd9c748956ead7f57 100644 (file)
@@ -5,9 +5,6 @@ openssl_csr_new() tests
 --FILE--
 <?php
 
-$a = 1;
-var_dump(openssl_csr_new(1,$a));
-var_dump(openssl_csr_new(1,$a,1,1));
 $a = array();
 
 $conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');
@@ -26,12 +23,6 @@ var_dump(openssl_csr_new(["countryName" => "DE"], $x, $conf + ["x509_extensions"
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: openssl_csr_new() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: openssl_csr_new() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
 Warning: openssl_csr_new(): key array must be of the form array(0 => key, 1 => phrase) in %s on line %d
 
 Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min -> 4 (failed; check error queue and value of string_mask OpenSSL option if illegal characters are reported) in %s on line %d
index 57c9e75c0ee47634692875f805aea02190ab16e2..c585eb14f6d1664f2dc4e1be362f5228fe818c92 100644 (file)
@@ -35,13 +35,10 @@ var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg));
 var_dump(openssl_csr_sign($csr, openssl_x509_read($cert), $priv, 365, $config_arg));
 var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, $wrong, 365));
-var_dump(openssl_csr_sign($csr, null, $privkey, $wrong));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365, $wrong));
 var_dump(openssl_csr_sign($wrong, null, $privkey, 365));
 var_dump(openssl_csr_sign(array(), null, $privkey, 365));
 var_dump(openssl_csr_sign($csr, array(), $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, array(), 365));
-var_dump(openssl_csr_sign($csr, null, $privkey, array()));
 var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
 ?>
 --EXPECTF--
@@ -56,12 +53,6 @@ bool(false)
 Warning: openssl_csr_sign(): cannot get private key from parameter 3 in %s on line %d
 bool(false)
 
-Warning: openssl_csr_sign() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
-Warning: openssl_csr_sign() expects parameter 5 to be array, string given in %s on line %d
-NULL
-
 Warning: openssl_csr_sign(): cannot get CSR from parameter 1 in %s on line %d
 bool(false)
 
@@ -75,7 +66,4 @@ Warning: openssl_csr_sign(): key array must be of the form array(0 => key, 1 =>
 
 Warning: openssl_csr_sign(): cannot get private key from parameter 3 in %s on line %d
 bool(false)
-
-Warning: openssl_csr_sign() expects parameter 4 to be int, array given in %s on line %d
-NULL
 resource(%d) of type (OpenSSL X.509)
index be40f8080f315626cc4660bd8d7fe80ca1d1975a..5f79cd86c2e5d51e14e115bb2b7ea74aa4e98325 100644 (file)
@@ -19,9 +19,6 @@ var_dump(openssl_decrypt($wrong, $method, $password));
 var_dump(openssl_decrypt($wrong, $wrong, $password));
 var_dump(openssl_decrypt($encrypted, $wrong, $wrong));
 var_dump(openssl_decrypt($wrong, $wrong, $wrong));
-var_dump(openssl_decrypt(array(), $method, $password));
-var_dump(openssl_decrypt($encrypted, array(), $password));
-var_dump(openssl_decrypt($encrypted, $method, array()));
 
 // invalid using of an authentication tag
 var_dump(openssl_encrypt($data, $method, $password, 0, $iv, $wrong));
@@ -45,14 +42,5 @@ bool(false)
 Warning: openssl_decrypt(): Unknown cipher algorithm in %s on line %d
 bool(false)
 
-Warning: openssl_decrypt() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_decrypt() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_decrypt() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
 Warning: openssl_encrypt(): The authenticated tag cannot be provided for cipher that doesn not support AEAD in %s on line %d
 string(44) "yof6cPPH4mLee6TOc0YQSrh4dvywMqxGUyjp0lV6+aM="
index ea39bff604cf220c5057c5a434cd3612b1160228..53bc371f4606f54cc7bb3168ca8f7ce9ad2de315 100644 (file)
@@ -14,12 +14,6 @@ $arr = array(1);
 
 // wrong parameters tests
 var_dump(openssl_encrypt($data, $wrong, $password));
-var_dump(openssl_encrypt($object, $method, $password));
-var_dump(openssl_encrypt($data, $object, $password));
-var_dump(openssl_encrypt($data, $method, $object));
-var_dump(openssl_encrypt($arr, $method, $object));
-var_dump(openssl_encrypt($data, $arr, $object));
-var_dump(openssl_encrypt($data, $method, $arr));
 
 // invalid using of an authentication tag
 var_dump(openssl_encrypt($data, $method, $password, 0, $iv, $wrong));
@@ -31,24 +25,6 @@ var_dump(openssl_encrypt($data, $method, $password, OPENSSL_DONT_ZERO_PAD_KEY, $
 Warning: openssl_encrypt(): Unknown cipher algorithm in %s on line %d
 bool(false)
 
-Warning: openssl_encrypt() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: openssl_encrypt() expects parameter 2 to be string, object given in %s on line %d
-NULL
-
-Warning: openssl_encrypt() expects parameter 3 to be string, object given in %s on line %d
-NULL
-
-Warning: openssl_encrypt() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_encrypt() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_encrypt() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
 Warning: openssl_encrypt(): The authenticated tag cannot be provided for cipher that doesn not support AEAD in %s on line %d
 string(44) "iPR4HulskuaP5Z6me5uImk6BqVyJG73+63tkPauVZYk="
 
index 2132b402aa4b75e790e3d7af67dd4e98cb8e6a18..099596c03345407fd4b32a497563caa5696de062 100644 (file)
@@ -26,13 +26,11 @@ var_dump(openssl_pkcs7_encrypt($infile, $outfile, openssl_x509_read($single_cert
 var_dump(openssl_pkcs7_decrypt($outfile, $outfile2, $single_cert, $privkey));
 var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $assoc_headers));
 var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $empty_headers));
-var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $wrong));
 var_dump(openssl_pkcs7_encrypt($wrong, $outfile, $single_cert, $headers));
 var_dump(openssl_pkcs7_encrypt($empty, $outfile, $single_cert, $headers));
 var_dump(openssl_pkcs7_encrypt($infile, $empty, $single_cert, $headers));
 var_dump(openssl_pkcs7_encrypt($infile, $outfile, $wrong, $headers));
 var_dump(openssl_pkcs7_encrypt($infile, $outfile, $empty, $headers));
-var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $empty));
 var_dump(openssl_pkcs7_encrypt($infile, $outfile, $multi_certs, $headers));
 var_dump(openssl_pkcs7_encrypt($infile, $outfile, array_map('openssl_x509_read', $multi_certs) , $headers));
 
@@ -45,23 +43,17 @@ if (file_exists($outfile2)) {
     unlink($outfile2);
 }
 ?>
---EXPECTF--
+--EXPECT--
 bool(true)
 bool(true)
 bool(true)
 bool(true)
 bool(true)
-
-Warning: openssl_pkcs7_encrypt() expects parameter 4 to be array, string given in %s on line %d
-bool(false)
 bool(false)
 bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: openssl_pkcs7_encrypt() expects parameter 4 to be array, string given in %s on line %d
-bool(false)
 bool(true)
 bool(true)
 true
index 64c7c2c130f3e9d05e072701192b54d0966876f8..9ee745434dd1eca8754384f5c997af2a2e4dde65 100644 (file)
@@ -8,19 +8,12 @@ $infile = file_get_contents(dirname(__FILE__) . "/cert.p7b");
 $certfile = file_get_contents(dirname(__FILE__) . "/cert.crt");
 $result = [];
 
-var_dump(openssl_pkcs7_read());
-var_dump(openssl_pkcs7_read(""));
 var_dump(openssl_pkcs7_read("", $result));
 var_dump(openssl_pkcs7_read($certfile, $result));
 var_dump(openssl_pkcs7_read($infile, $result));
 var_dump($result);
 ?>
---EXPECTF--
-Warning: openssl_pkcs7_read() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: openssl_pkcs7_read() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
+--EXPECT--
 bool(false)
 bool(false)
 bool(true)
index 0e29901c7e7ac36a8039d3aa6b694cd189d91adb..bd8bb484642c756d2f40644469cc6e47d0d1ff6b 100644 (file)
@@ -22,13 +22,11 @@ var_dump(openssl_pkcs7_sign($infile, $outfile, openssl_x509_read($single_cert),
 var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $headers));
 var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $assoc_headers));
 var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $empty_headers));
-var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $wrong));
 var_dump(openssl_pkcs7_sign($wrong, $outfile, $single_cert, $privkey, $headers));
 var_dump(openssl_pkcs7_sign($empty, $outfile, $single_cert, $privkey, $headers));
 var_dump(openssl_pkcs7_sign($infile, $empty, $single_cert, $privkey, $headers));
 var_dump(openssl_pkcs7_sign($infile, $outfile, $wrong, $privkey, $headers));
 var_dump(openssl_pkcs7_sign($infile, $outfile, $empty, $privkey, $headers));
-var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $empty));
 var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $wrong, $headers));
 
 if (file_exists($outfile)) {
@@ -42,9 +40,6 @@ bool(true)
 bool(true)
 bool(true)
 
-Warning: openssl_pkcs7_sign() expects parameter 5 to be array, string given in %s on line %d
-NULL
-
 Warning: openssl_pkcs7_sign(): error opening input file %s in %s on line %d
 bool(false)
 
@@ -60,9 +55,6 @@ bool(false)
 Warning: openssl_pkcs7_sign(): error getting cert in %s on line %d
 bool(false)
 
-Warning: openssl_pkcs7_sign() expects parameter 5 to be array, string given in %s on line %d
-NULL
-
 Warning: openssl_pkcs7_sign(): error getting private key in %s on line %d
 bool(false)
 true
index c7dc193d53e4614b57576ed3209c71d3cb91ad36..9249f252d8068b466e39934dee6d3c867709c8b3 100644 (file)
@@ -11,13 +11,23 @@ $rsa = array("rsa" => array());
 $dsa = array("dsa" => array());
 $dh = array("dh" => array());
 
-openssl_pkey_get_details(openssl_pkey_new($rsa));
-openssl_pkey_get_details(openssl_pkey_new($dsa));
-openssl_pkey_get_details(openssl_pkey_new($dh));
+try {
+    openssl_pkey_get_details(openssl_pkey_new($rsa));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    openssl_pkey_get_details(openssl_pkey_new($dsa));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    openssl_pkey_get_details(openssl_pkey_new($dh));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
-Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d
+--EXPECT--
+openssl_pkey_get_details() expects parameter 1 to be resource, bool given
+openssl_pkey_get_details() expects parameter 1 to be resource, bool given
+openssl_pkey_get_details() expects parameter 1 to be resource, bool given
index 1899ebac3bb68c063be0f9c7e89f591fdda64e71..c3c79214fe34285976ff031ae781e448c34a38b6 100644 (file)
@@ -12,8 +12,6 @@ $d = array(1);
 
 var_dump(openssl_seal($a, $b, $c, $d));
 var_dump(openssl_seal($a, $a, $a, array()));
-var_dump(openssl_seal($c, $c, $c, 1));
-var_dump(openssl_seal($b, $b, $b, ""));
 
 // tests with cert
 $data = "openssl_open() test";
@@ -23,7 +21,6 @@ $wrong = "wrong";
 var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key)));                  // no output
 var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key)));        // no output
 var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key, $wrong)));
-var_dump(openssl_seal($data, $sealed, $ekeys, $pub_key));
 var_dump(openssl_seal($data, $sealed, $ekeys, array()));
 var_dump(openssl_seal($data, $sealed, $ekeys, array($wrong)));
 
@@ -35,21 +32,12 @@ bool(false)
 
 Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
 bool(false)
-
-Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
-NULL
 int(19)
 int(19)
 
 Warning: openssl_seal(): not a public key (2th member of pubkeys) in %s on line %d
 bool(false)
 
-Warning: openssl_seal() expects parameter 4 to be array, string given in %s on line %d
-NULL
-
 Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
 bool(false)
 
index 0200e5ba6ec21cc75c4e56dc02f010242881cec8..36655dd61a5df8ec09ea4d8ac216cc30c39d918e 100644 (file)
@@ -10,13 +10,9 @@ $wrong = "wrong";
 
 var_dump(openssl_sign($data, $sign, $privkey));                 // no output
 var_dump(openssl_sign($data, $sign, $wrong));
-var_dump(openssl_sign(array(), $sign, $privkey));
 ?>
 --EXPECTF--
 bool(true)
 
 Warning: openssl_sign(): supplied key param cannot be coerced into a private key in %s on line %d
 bool(false)
-
-Warning: openssl_sign() expects parameter 1 to be string, array given in %s on line %d
-NULL
index ceaafc2234c16fe8ad3f14400b011404d01b1423..fa3fce36ab32edb4cc1833c12cb9c0bc3ab6d142 100644 (file)
@@ -7,9 +7,6 @@ openssl_x509_fingerprint() tests
 
 $cert = "file://" . dirname(__FILE__) . "/cert.crt";
 
-echo "** Testing with no parameters **\n";
-var_dump(openssl_x509_fingerprint());
-
 echo "** Testing default functionality **\n";
 var_dump(openssl_x509_fingerprint($cert));
 
@@ -29,10 +26,6 @@ echo "** Testing bad hash method **\n";
 var_dump(openssl_x509_fingerprint($cert, 'xx45'));
 ?>
 --EXPECTF--
-** Testing with no parameters **
-
-Warning: openssl_x509_fingerprint() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 ** Testing default functionality **
 string(40) "6e6fd1ea10a5a23071d61c728ee9b40df6dbc33c"
 ** Testing hash method md5 **
index 663adccc2c39eb2af5dec1894a9a54b5a324aeb1..59acb090c360e32ac1dbd5a3445b33329b1324d9 100644 (file)
@@ -7,10 +7,7 @@ openssl_x509_free() tests
 var_dump($res = openssl_x509_read("file://" . dirname(__FILE__) . "/cert.crt"));
 openssl_x509_free($res);
 var_dump($res);
-openssl_x509_free(false);
 ?>
 --EXPECTF--
 resource(%d) of type (OpenSSL X.509)
 resource(%d) of type (Unknown)
-
-Warning: openssl_x509_free() expects parameter 1 to be resource, bool given in %s on line %d
index a9cae1616b7f84e8e4115d53ce8bc9b78d0155ab..337ba3ad4b26a5052d109c39bb43e56e31f1355b 100644 (file)
@@ -8,7 +8,6 @@ max_execution_time=0
 <?php
 pcntl_signal(SIGALRM, function(){});
 
-var_dump(pcntl_alarm());
 pcntl_alarm(0);
 var_dump(pcntl_alarm(60));
 var_dump(pcntl_alarm(1) > 0);
@@ -16,8 +15,6 @@ $siginfo = array();
 var_dump(pcntl_sigtimedwait(array(SIGALRM),$siginfo,2) === SIGALRM);
 ?>
 --EXPECTF--
-Warning: pcntl_alarm() expects exactly 1 parameter, 0 given in %s
-NULL
 int(0)
 bool(true)
 bool(true)
index 5349381d92b89fa5a42b96f15384ea89de80f933..7d7f6b5271ba809480a831415849789f08628635 100644 (file)
@@ -4,14 +4,10 @@ pcntl_exec() 3
 <?php if (!extension_loaded("pcntl")) print "skip"; ?>
 --FILE--
 <?php
-var_dump(pcntl_exec());
 $file = tempnam(sys_get_temp_dir(),"php");
 var_dump(pcntl_exec($file, array("foo","bar"), array("foo" => "bar")));
 unlink($file);
 ?>
 --EXPECTF--
-Warning: pcntl_exec() expects at least 1 parameter, 0 given %s
-NULL
-
 Warning: pcntl_exec(): Error has occurred: (errno %d) %s
 bool(false)
index a6441935c110125d853bd7dddb7f4d71645391a9..5bba18c2a03f93225c64321635b6cb5a8722e7aa 100644 (file)
@@ -17,7 +17,6 @@ pcntl_signal(SIGUSR1, function($signo, $siginfo){
 posix_kill(posix_getpid(), SIGUSR1);
 pcntl_signal_dispatch();
 
-var_dump(pcntl_signal());
 var_dump(pcntl_signal(SIGALRM, SIG_IGN));
 var_dump(pcntl_signal(-1, -1));
 var_dump(pcntl_signal(-1, function(){}));
@@ -31,9 +30,6 @@ echo "ok\n";
 --EXPECTF--
 signal dispatched
 got signal from %r\d+|nobody%r
-
-Warning: pcntl_signal() expects at least 2 parameters, 0 given in %s
-NULL
 bool(true)
 
 Warning: pcntl_signal(): Invalid signal %s
index d5ab709b764d18b271f9636ec83bda0804666183..c745a21dc714e07f81de615fa6b3f4dbb92e2970 100644 (file)
@@ -20,15 +20,6 @@ if ($pid == -1) {
        var_dump(pcntl_wexitstatus($status));
 
        var_dump(pcntl_wait($status, WNOHANG | WUNTRACED));
-       var_dump(pcntl_wait());
-       var_dump(pcntl_waitpid());
-
-       var_dump(pcntl_wifexited());
-       var_dump(pcntl_wifstopped());
-       var_dump(pcntl_wifsignaled());
-       var_dump(pcntl_wexitstatus());
-       var_dump(pcntl_wtermsig());
-       var_dump(pcntl_wstopsig());
 } else {
        posix_kill(posix_getpid(), SIGSTOP);
        exit(42);
@@ -40,27 +31,3 @@ bool(false)
 bool(false)
 int(42)
 int(-1)
-
-Warning: pcntl_wait() expects at least 1 parameter, 0 given in %s
-NULL
-
-Warning: pcntl_waitpid() expects at least 2 parameters, 0 given in %s
-NULL
-
-Warning: pcntl_wifexited() expects exactly 1 parameter, 0 given in %s
-NULL
-
-Warning: pcntl_wifstopped() expects exactly 1 parameter, 0 given in %s
-NULL
-
-Warning: pcntl_wifsignaled() expects exactly 1 parameter, 0 given in %s
-NULL
-
-Warning: pcntl_wexitstatus() expects exactly 1 parameter, 0 given in %s
-NULL
-
-Warning: pcntl_wtermsig() expects exactly 1 parameter, 0 given in %s
-NULL
-
-Warning: pcntl_wstopsig() expects exactly 1 parameter, 0 given in %s
-NULL
index d4780447bce419f673a8412d2cb87faf97e8a5b6..073a7a8d566efe338687255cb1fedb62090d087b 100644 (file)
@@ -3,11 +3,8 @@ preg_* with bogus vals
 --FILE--
 <?php
 
-var_dump(preg_match());
-var_dump(preg_match_all());
 var_dump(preg_match_all('//', '', $dummy, 0xdead));
 
-var_dump(preg_quote());
 var_dump(preg_quote(''));
 
 var_dump(preg_replace('/(.)/', '${1}${1', 'abc'));
@@ -16,22 +13,13 @@ var_dump(preg_replace('/(.)/e', 'for ($', 'abc'));
 
 ?>
 --EXPECTF--
-Warning: preg_match() expects at least 2 parameters, 0 given in %s002.php on line 3
-bool(false)
-
-Warning: preg_match_all() expects at least 2 parameters, 0 given in %s002.php on line 4
-bool(false)
-
-Warning: preg_match_all(): Invalid flags specified in %s002.php on line 5
-NULL
-
-Warning: preg_quote() expects at least 1 parameter, 0 given in %s002.php on line 7
+Warning: preg_match_all(): Invalid flags specified in %s002.php on line %d
 NULL
 string(0) ""
 string(12) "a${1b${1c${1"
 
-Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 in %s002.php on line 11
+Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 in %s002.php on line %d
 NULL
 
-Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in %s on line 12
+Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in %s on line %d
 NULL
index a739cb60ac3bfd45ca9d28e70eec76aaf0024a13..5aee98b9e4d6a01c3f2c99c57ea1f5bd09b22e3f 100644 (file)
@@ -5,8 +5,6 @@ preg_grep() 2nd test
 --FILE--
 <?php
 
-var_dump(preg_grep(1,array(),3,4));
-var_dump(preg_grep(1, 2));
 var_dump(preg_grep('/+/', array()));
 
 $array = array(5=>'a', 'x' => '1', 'xyz'=>'q6', 'h20');
@@ -21,13 +19,7 @@ var_dump(preg_last_error() == PREG_RECURSION_LIMIT_ERROR);
 
 ?>
 --EXPECTF--
-Warning: preg_grep() expects at most 3 parameters, 4 given in %sgrep2.php on line 3
-NULL
-
-Warning: preg_grep() expects parameter 2 to be array, int given in %sgrep2.php on line 4
-NULL
-
-Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %sgrep2.php on line 5
+Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %sgrep2.php on line %d
 bool(false)
 array(3) {
   [5]=>
index fcc36e7d91005b0ca3333e58427102762e9ee294..79fcb98897da754c5bb51fc2b4532f9eba836ec2 100644 (file)
@@ -20,10 +20,18 @@ $values = array('abcdef', //Regex without delimiter
 $array = array(123, 'abc', 'test');
 foreach($values as $value) {
     print "\nArg value is $value\n";
-    var_dump(preg_grep($value, $array));
+    try {
+        var_dump(preg_grep($value, $array));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 }
 $value = new stdclass(); //Object
-var_dump(preg_grep($value, $array));
+try {
+    var_dump(preg_grep($value, $array));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 echo "Done"
 ?>
 --EXPECTF--
@@ -50,9 +58,7 @@ Warning: preg_grep(): Unknown modifier 'F' in %spreg_grep_error1.php on line %d
 bool(false)
 
 Arg value is Array
-
-Warning: preg_grep() expects parameter 1 to be string, array given in %spreg_grep_error1.php on line %d
-NULL
+preg_grep() expects parameter 1 to be string, array given
 
 Arg value is /[a-zA-Z]/
 array(2) {
@@ -61,7 +67,5 @@ array(2) {
   [2]=>
   string(4) "test"
 }
-
-Warning: preg_grep() expects parameter 1 to be string, object given in %spreg_grep_error1.php on line %d
-NULL
+preg_grep() expects parameter 1 to be string, object given
 Done
index 95ab905d7d4cb10ef353d688550c7e7fd288e181..bd0f28c8c4b4e4d0b320b5fb2dc69f5639693a37 100644 (file)
@@ -20,11 +20,19 @@ $regex_array = array('abcdef', //Regex without delimiter
 $subject = 'test';
 foreach($regex_array as $regex_value) {
     print "\nArg value is $regex_value\n";
-    var_dump(preg_match_all($regex_value, $subject, $matches1));
+    try {
+        var_dump(preg_match_all($regex_value, $subject, $matches1));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
     var_dump($matches1);
 }
 $regex_value = new stdclass(); //Object
-var_dump(preg_match_all($regex_value, $subject, $matches));
+try {
+    var_dump(preg_match_all($regex_value, $subject, $matches));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($matches);
 ?>
 --EXPECTF--
@@ -55,9 +63,7 @@ bool(false)
 NULL
 
 Arg value is Array
-
-Warning: preg_match_all() expects parameter 1 to be string, array given in %spreg_match_all_error1.php on line %d
-bool(false)
+preg_match_all() expects parameter 1 to be string, array given
 NULL
 
 Arg value is /[a-zA-Z]/
@@ -75,7 +81,5 @@ array(1) {
     string(1) "t"
   }
 }
-
-Warning: preg_match_all() expects parameter 1 to be string, object given in %spreg_match_all_error1.php on line %d
-bool(false)
+preg_match_all() expects parameter 1 to be string, object given
 NULL
index 1c55cce64ebb7629edd6f74989c96395d4fef67f..8c52b73076ccaf10a3dcd78664d0cdcb7f64ce27 100644 (file)
@@ -12,13 +12,14 @@ error_reporting(E_ALL&~E_NOTICE);
 */
 echo "*** Testing preg_match_all() : error conditions ***\n";
 $regex = '/[a-zA-Z]/';
-$value = new stdclass(); //Object
-var_dump(preg_match_all($regex, $value, $matches));
-var_dump($matches);
 $input = array(array('this is', 'a subarray'), 'test',);
 foreach($input as $value) {
     print "\nArg value is: $value\n";
-    var_dump(preg_match_all($regex, $value, $matches));
+    try {
+        var_dump(preg_match_all($regex, $value, $matches));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
     var_dump($matches);
 }
 echo "Done";
@@ -26,14 +27,8 @@ echo "Done";
 --EXPECTF--
 *** Testing preg_match_all() : error conditions ***
 
-Warning: preg_match_all() expects parameter 2 to be string, object given in %spreg_match_all_error2.php on line %d
-bool(false)
-NULL
-
 Arg value is: Array
-
-Warning: preg_match_all() expects parameter 2 to be string, array given in %spreg_match_all_error2.php on line %d
-bool(false)
+preg_match_all() expects parameter 2 to be string, array given
 NULL
 
 Arg value is: test
index 42bb5abd27073bbdd498ee5e46a5864ded92ac75..23d6829c48435808cfe9369515579ed9c6910bd1 100644 (file)
@@ -20,10 +20,18 @@ $regex_array = array('abcdef', //Regex without delimiter
 $subject = 'this is a test';
 foreach($regex_array as $regex_value) {
     print "\nArg value is $regex_value\n";
-    var_dump(preg_match($regex_value, $subject));
+    try {
+        var_dump(preg_match($regex_value, $subject));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 }
 $regex_value = new stdclass(); //Object
-var_dump(preg_match($regex_value, $subject));
+try {
+    var_dump(preg_match($regex_value, $subject));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 --EXPECTF--
 *** Testing preg_match() : error conditions ***
@@ -49,12 +57,8 @@ Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line %
 bool(false)
 
 Arg value is Array
-
-Warning: preg_match() expects parameter 1 to be string, array given in %spreg_match_error1.php on line %d
-bool(false)
+preg_match() expects parameter 1 to be string, array given
 
 Arg value is /[a-zA-Z]/
 int(1)
-
-Warning: preg_match() expects parameter 1 to be string, object given in %spreg_match_error1.php on line %d
-bool(false)
+preg_match() expects parameter 1 to be string, object given
index cb0917a22876241ce25a628649ead8fc2d0ee496..9530983e81950b070a98ee4e7fde3f048d895042 100644 (file)
@@ -15,10 +15,18 @@ $regex = '/[a-zA-Z]/';
 $input = array('this is a string', array('this is', 'a subarray'),);
 foreach($input as $value) {
     print "\nArg value is: $value\n";
-    var_dump(preg_match($regex, $value));
+    try {
+        var_dump(preg_match($regex, $value));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 }
 $value = new stdclass(); //Object
-var_dump(preg_match($regex, $value));
+try {
+    var_dump(preg_match($regex, $value));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 echo "Done";
 ?>
 --EXPECTF--
@@ -28,10 +36,6 @@ Arg value is: this is a string
 int(1)
 
 Arg value is: Array
-
-Warning: preg_match() expects parameter 2 to be string, array given in %spreg_match_error2.php on line %d
-bool(false)
-
-Warning: preg_match() expects parameter 2 to be string, object given in %spreg_match_error2.php on line %d
-bool(false)
+preg_match() expects parameter 2 to be string, array given
+preg_match() expects parameter 2 to be string, object given
 Done
index f5c87176f9b9fa331ce1a0a553bcb53043fa0ede..842dfacb391a223be52e0dffd4e15bc8e929fcc0 100644 (file)
@@ -3,30 +3,14 @@ preg_replace_callback() 3
 --FILE--
 <?php
 
-var_dump(preg_replace_callback());
-var_dump(preg_replace_callback(1));
-var_dump(preg_replace_callback(1,2));
 var_dump(preg_replace_callback(1,2,3));
 var_dump(preg_replace_callback(1,2,3,4));
 $a = 5;
 var_dump(preg_replace_callback(1,2,3,4,$a));
-$a = "";
-var_dump(preg_replace_callback("","","","",$a));
-$a = array();
-var_dump(preg_replace_callback($a,$a,$a,$a,$a));
 
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: preg_replace_callback() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: preg_replace_callback() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
 Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
 string(1) "3"
 
@@ -35,10 +19,4 @@ string(1) "3"
 
 Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
 string(1) "3"
-
-Warning: preg_replace_callback() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
-Warning: preg_replace_callback() expects parameter 4 to be int, array given in %s on line %d
-NULL
 Done
index f2f20ef64532ef65a42405334eb65798873c437d..03d7a60eee8331237d3cb9a5cab1ce263879cc16 100644 (file)
@@ -3,19 +3,8 @@ preg_replace_callback_array() errors
 --FILE--
 <?php
 
-var_dump(preg_replace_callback_array());
-var_dump(preg_replace_callback_array(1));
-var_dump(preg_replace_callback_array(1,2));
-var_dump(preg_replace_callback_array(1,2,3));
-$a = 5;
-var_dump(preg_replace_callback_array(1,2,3,$a));
-$a = "";
-var_dump(preg_replace_callback_array(array("" => ""),"","",$a));
 $a = array();
 $b = "";
-var_dump(preg_replace_callback($a, $a, $a, $a, $b));
-var_dump($b);
-$b = "";
 var_dump(preg_replace_callback_array(array("xx" => "s"), $a, -1, $b));
 var_dump($b);
 function f() {
@@ -34,28 +23,6 @@ try {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: preg_replace_callback_array() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: preg_replace_callback_array() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: preg_replace_callback_array() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: preg_replace_callback_array() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: preg_replace_callback_array() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: preg_replace_callback_array() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: preg_replace_callback() expects parameter 4 to be int, array given in %s on line %d
-NULL
-string(0) ""
-
 Warning: preg_replace_callback_array(): 's' is not a valid callback in %spreg_replace_callback_array2.php on line %d
 array(0) {
 }
index 79942a948047b2d92ab9f4d95f856cdb6c358ad9..1c1e3ec646aa4d11a68e639e9bfb412ee5daf0e1 100644 (file)
@@ -20,10 +20,18 @@ $regex_array = array('abcdef', //Regex without delimiter
 $subject = '1 2 a 3 4 b 5 6';
 foreach($regex_array as $regex_value) {
     print "\nArg value is $regex_value\n";
-    var_dump(preg_split($regex_value, $subject));
+    try {
+        var_dump(preg_split($regex_value, $subject));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 }
 $regex_value = new stdclass(); //Object
-var_dump(preg_split($regex_value, $subject));
+try {
+    var_dump(preg_split($regex_value, $subject));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
 --EXPECTF--
 *** Testing preg_split() : error conditions ***
@@ -49,9 +57,7 @@ Warning: preg_split(): Unknown modifier 'F' in %spreg_split_error1.php on line %
 bool(false)
 
 Arg value is Array
-
-Warning: preg_split() expects parameter 1 to be string, array given in %spreg_split_error1.php on line %d
-bool(false)
+preg_split() expects parameter 1 to be string, array given
 
 Arg value is /[a-zA-Z]/
 array(3) {
@@ -62,6 +68,4 @@ array(3) {
   [2]=>
   string(4) " 5 6"
 }
-
-Warning: preg_split() expects parameter 1 to be string, object given in %spreg_split_error1.php on line %d
-bool(false)
+preg_split() expects parameter 1 to be string, object given
index c87d1b03a9137b284da2e287eb0b169728cb133c..df4b9af92f2f9f324c3fbf6408b7c3be6d55c57e 100644 (file)
@@ -3,7 +3,6 @@ preg_split()
 --FILE--
 <?php
 
-var_dump(preg_split());
 var_dump(preg_split('/*/', 'x'));
 
 var_dump(preg_split('/[\s, ]+/', 'x yy,zzz'));
@@ -17,10 +16,7 @@ var_dump(preg_split('/\d*/', 'ab2c3u', -1, PREG_SPLIT_NO_EMPTY));
 
 ?>
 --EXPECTF--
-Warning: preg_split() expects at least 2 parameters, 0 given in %ssplit.php on line 3
-bool(false)
-
-Warning: preg_split(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %ssplit.php on line 4
+Warning: preg_split(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %ssplit.php on line %d
 bool(false)
 array(3) {
   [0]=>
index b0411e6df2dc1781d81878035a6abd96679042ea..f4fd60022e1ed0ec65413b6dd90bf28b2c9eac37 100644 (file)
@@ -13,7 +13,6 @@ var_dump(preg_split('/(\d*)/', 'ab2c3u', -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPL
 var_dump(preg_split('/(\d*)/', 'ab2c3u', -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE));
 
 
-var_dump(preg_last_error(1));
 ini_set('pcre.recursion_limit', 1);
 var_dump(preg_last_error() == PREG_NO_ERROR);
 var_dump(preg_split('/(\d*)/', 'ab2c3u'));
@@ -306,9 +305,6 @@ array(6) {
     int(5)
   }
 }
-
-Warning: preg_last_error() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 bool(true)
 array(1) {
   [0]=>
index aab73d87a6e214dad10c8eb90f9e8d1453a00a40..7d4111144f6410f054cfeee6f7f06bb51c5c5d27 100644 (file)
@@ -18,11 +18,6 @@ $db->exec("CREATE TABLE test (x int)");
 $db->exec("INSERT INTO test VALUES (1)");
 
 
-// Bug entry [1]
-$stmt = $db->query();
-var_dump($stmt);
-
-
 // Bug entry [2] -- 1 is PDO::FETCH_LAZY
 $stmt = $db->query("SELECT * FROM test", PDO::FETCH_LAZY, 0, 0);
 var_dump($stmt);
@@ -55,9 +50,6 @@ var_dump($stmt);
 
 ?>
 --EXPECTF--
-Warning: PDO::query() expects at least 1 parameter, 0 given in %s
-bool(false)
-
 Warning: PDO::query(): SQLSTATE[HY000]: General error: fetch mode doesn't allow any extra arguments in %s
 bool(false)
 
diff --git a/ext/pdo/tests/pdo_drivers_error.phpt b/ext/pdo/tests/pdo_drivers_error.phpt
deleted file mode 100644 (file)
index 5a371f0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---TEST--
-Test that PDO::getAvailableDrivers / pdo_drivers does not accept any parameters
---CREDITS--
-Amo Chohan <amo.chohan@gmail.com>
---SKIPIF--
-<?php
-if (!extension_loaded('pdo')) die('skip');
---FILE--
-<?php
-PDO::getAvailableDrivers('fail');
-pdo_drivers('fail');
---EXPECTF--
-Warning: PDO::getAvailableDrivers() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: pdo_drivers() expects exactly 0 parameters, 1 given in %s on line %d
index e280ded2945f1cc1fa4bc204c57150d875661d91..d733a2b544a96813e9d8d89fb5110dd73bb132f4 100644 (file)
@@ -16,9 +16,6 @@ $db = MySQLPDOTest::factory();
        $default =  $db->getAttribute(PDO::ATTR_STATEMENT_CLASS);
        var_dump($default);
 
-       if (false !== ($tmp = @$db->setAttribute(PDO::ATTR_STATEMENT_CLASS)))
-               printf("[001] Expecting boolean/false got %s\n", var_export($tmp, true));
-
        if (false !== ($tmp = @$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, 'foo')))
                printf("[002] Expecting boolean/false got %s\n", var_export($tmp, true));
 
index 10ccba22911bcd157400b9724a06041366999e21..07ad3d9d33a4bd6fc27c9883f40ab61066e81539 100644 (file)
@@ -30,22 +30,11 @@ try {
                printf("[002] Expecting false got %s\n", var_export($tmp, true));
 
        $stmt->execute();
-       // Warning: PDOStatement::getColumnMeta() expects exactly 1 parameter, 0 given in
-       if (false !== ($tmp = @$stmt->getColumnMeta()))
-               printf("[003] Expecting false got %s\n", var_export($tmp, true));
 
        // invalid offset
        if (false !== ($tmp = @$stmt->getColumnMeta(-1)))
                printf("[004] Expecting false got %s\n", var_export($tmp, true));
 
-       // Warning: PDOStatement::getColumnMeta() expects parameter 1 to be int, array given in
-       if (false !== ($tmp = @$stmt->getColumnMeta(array())))
-               printf("[005] Expecting false got %s\n", var_export($tmp, true));
-
-       // Warning: PDOStatement::getColumnMeta() expects exactly 1 parameter, 2 given in
-       if (false !== ($tmp = @$stmt->getColumnMeta(1, 1)))
-               printf("[006] Expecting false got %s\n", var_export($tmp, true));
-
        $emulated =  $stmt->getColumnMeta(0);
 
        printf("Testing native PS...\n");
index aa2e43748fae9b73c42ffb721400c27c73f99cef..45062c3b49302aa4401bd74427568de8bc91b468 100644 (file)
@@ -9,7 +9,7 @@ PostgreSQL create db
 include('config.inc');
 
 $db = pg_connect($conn_str);
-if (!@pg_num_rows(@pg_query($db, "SELECT * FROM ".$table_name)))
+if (!($q = @pg_query($db, "SELECT * FROM ".$table_name)) || !@pg_num_rows($q))
 {
        pg_query($db,$table_def); // Create table here
        for ($i=0; $i < $num_test_record; $i++) {
@@ -21,7 +21,7 @@ else {
 }
 
 $v = pg_version();
-if (version_compare($v['server'], '9.2', '>=') && !@pg_num_rows(@pg_query($db, "SELECT * FROM ".$table_name_92)))
+if (version_compare($v['server'], '9.2', '>=') && (!($q = @pg_query($db, "SELECT * FROM ".$table_name_92)) || !@pg_num_rows($q)))
 {
        pg_query($db,$table_def_92); // Create table here
 }
index 41cb9be716d68f336ff08497aaa51320fad1e6a7..cfd8cc5e66eeab2267bef531bd23464d3d29c34d 100644 (file)
@@ -5,13 +5,17 @@ Phar::mapPhar truncated manifest/improper params
 --FILE--
 <?php
 try {
-Phar::mapPhar(5, 'hio', 'hi');
+    Phar::mapPhar(5, 'hio', 'hi');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
-Phar::mapPhar();
+try {
+    Phar::mapPhar();
 } catch (Exception $e) {
-       echo $e->getMessage();
+    echo $e->getMessage(), "\n";
 }
 __HALT_COMPILER(); ?>
 --EXPECTF--
-Warning: Phar::mapPhar() expects at most 2 parameters, 3 given in %s002.php on line %d
+Phar::mapPhar() expects at most 2 parameters, 3 given
 internal corruption of phar "%s002.php" (truncated manifest at manifest length)
index e8ddb1f62a8942070ed30c9cc95221f71f550275..bf9c5d5696869a76ca7d6fc39ba764d716406621 100644 (file)
@@ -8,200 +8,263 @@ phar.readonly=0
 <?php
 ini_set('phar.readonly', 1);
 
-function print_exception($e) {
-       echo "\nException: " . $e->getMessage() . " in " . $e->getFile() . " on line " . $e->getLine() . "\n";
+try {
+    Phar::mungServer('hi');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    Phar::createDefaultStub(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    Phar::loadPhar(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    Phar::canCompress('hi');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-
-Phar::mungServer('hi');
-Phar::createDefaultStub(array());
-Phar::loadPhar(array());
-Phar::canCompress('hi');
 try {
        $a = new Phar(array());
 } catch (TypeError $e) {
-       print_exception($e);
+    echo $e->getMessage(), "\n";
 }
 try {
        $a = new Phar(dirname(__FILE__) . '/files/frontcontroller10.phar');
 } catch (PharException $e) {
-       print_exception($e);
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->convertToExecutable(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->convertToData(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-$a->convertToExecutable(array());
-$a->convertToData(array());
 try {
        $b = new PharData(dirname(__FILE__) . '/whatever.tar');
 } catch (PharException $e) {
-       print_exception($e);
+    echo $e->getMessage(), "\n";
 }
 try {
        $c = new PharData(dirname(__FILE__) . '/whatever.zip');
 } catch (PharException $e) {
-       print_exception($e);
+    echo $e->getMessage(), "\n";
 }
-$b->delete(array());
 try {
-$a->delete('oops');
+    $b->delete(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->delete('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 try {
-$b->delete('oops');
+    $b->delete('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
+}
+try {
+    echo $a->getPath() . "\n";
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-echo $a->getPath() . "\n";
 try {
-$a->setAlias('oops');
+    $a->setAlias('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 try {
-$b->setAlias('oops');
+    $b->setAlias('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 ini_set('phar.readonly', 0);
-$a->setAlias(array());
+try {
+    $a->setAlias(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ini_set('phar.readonly', 1);
 try {
-$b->stopBuffering();
+    $b->stopBuffering();
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 try {
-$a->setStub('oops');
+    $a->setStub('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 try {
-$b->setStub('oops');
+    $b->setStub('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 ini_set('phar.readonly', 0);
-$a->setStub(array());
+try {
+    $a->setStub(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ini_set('phar.readonly', 1);
 try {
-$b->setDefaultStub('oops');
+    $b->setDefaultStub('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
+}
+try {
+    $a->setDefaultStub(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-$a->setDefaultStub(array());
 try {
-$a->setDefaultStub('oops');
+    $a->setDefaultStub('oops');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 try {
-$a->setSignatureAlgorithm(Phar::MD5);
+    $a->setSignatureAlgorithm(Phar::MD5);
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
-$a->compress(array());
 try {
-$a->compress(1);
+    $a->compress(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->compress(1);
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
+}
+try {
+    $a->compressFiles(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-$a->compressFiles(array());
 try {
-$a->decompressFiles();
+    $a->decompressFiles();
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
-$a->copy(array());
 try {
-$a->copy('a', 'b');
+    $a->copy(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->copy('a', 'b');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
+}
+try {
+    $a->offsetExists(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->offsetGet(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-$a->offsetExists(array());
-$a->offsetGet(array());
 ini_set('phar.readonly', 0);
-$a->offsetSet(array());
+try {
+    $a->offsetSet(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ini_set('phar.readonly', 1);
-$b->offsetUnset(array());
 try {
-$a->offsetUnset('a');
+    $b->offsetUnset(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->offsetUnset('a');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
+}
+try {
+    $a->addEmptyDir(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->addFile(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-$a->addEmptyDir(array());
-$a->addFile(array());
-$a->addFromString(array());
 try {
-$a->setMetadata('a');
+    $a->addFromString(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $a->setMetadata('a');
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 ini_set('phar.readonly', 0);
-$a->setMetadata(1,2);
+try {
+    $a->setMetadata(1,2);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ini_set('phar.readonly', 1);
 try {
-$a->delMetadata();
+    $a->delMetadata();
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 ?>
 ===DONE===
 --EXPECTF--
-Warning: Phar::mungServer() expects parameter 1 to be array, string given in %sbadparameters.php on line %d
-
-Warning: Phar::createDefaultStub() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::loadPhar() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::canCompress() expects parameter 1 to be int, string given in %sbadparameters.php on line %d
-
-Exception: Phar::__construct() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::convertToExecutable() expects parameter 1 to be int, array given in %sbadparameters.php on line %d
-
-Warning: Phar::convertToData() expects parameter 1 to be int, array given in %sbadparameters.php on line %d
-
-Warning: PharData::delete() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
+Phar::mungServer() expects parameter 1 to be array, string given
+Phar::createDefaultStub() expects parameter 1 to be a valid path, array given
+Phar::loadPhar() expects parameter 1 to be a valid path, array given
+Phar::canCompress() expects parameter 1 to be int, string given
+Phar::__construct() expects parameter 1 to be a valid path, array given
+Phar::convertToExecutable() expects parameter 1 to be int, array given
+Phar::convertToData() expects parameter 1 to be int, array given
+PharData::delete() expects parameter 1 to be a valid path, array given
 Cannot write out phar archive, phar is read-only
 Entry oops does not exist and cannot be deleted
-%sfiles/frontcontroller10.phar
+%sfrontcontroller10.phar
 Cannot write out phar archive, phar is read-only
 A Phar alias cannot be set in a plain tar archive
-
-Warning: Phar::setAlias() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Phar::setAlias() expects parameter 1 to be string, array given
 Cannot change stub, phar is read-only
 A Phar stub cannot be set in a plain tar archive
-
-Warning: Phar::setStub() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Phar::setStub() expects parameter 1 to be string, array given
 A Phar stub cannot be set in a plain tar archive
-
-Warning: Phar::setDefaultStub() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Phar::setDefaultStub() expects parameter 1 to be string, array given
 Cannot change stub: phar.readonly=1
 Cannot set signature algorithm, phar is read-only
-
-Warning: Phar::compress() expects parameter 1 to be int, array given in %sbadparameters.php on line %d
+Phar::compress() expects parameter 1 to be int, array given
 Cannot compress phar archive, phar is read-only
-
-Warning: Phar::compressFiles() expects parameter 1 to be int, array given in %sbadparameters.php on line %d
+Phar::compressFiles() expects parameter 1 to be int, array given
 Phar is readonly, cannot change compression
-
-Warning: Phar::copy() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
+Phar::copy() expects exactly 2 parameters, 1 given
 Cannot copy "a" to "b", phar is read-only
-
-Warning: Phar::offsetExists() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::offsetGet() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::offsetSet() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
-
-Warning: PharData::offsetUnset() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
+Phar::offsetExists() expects parameter 1 to be a valid path, array given
+Phar::offsetGet() expects parameter 1 to be a valid path, array given
+Phar::offsetSet() expects exactly 2 parameters, 1 given
+PharData::offsetUnset() expects parameter 1 to be a valid path, array given
 Write operations disabled by the php.ini setting phar.readonly
-
-Warning: Phar::addEmptyDir() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::addFile() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-
-Warning: Phar::addFromString() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
+Phar::addEmptyDir() expects parameter 1 to be a valid path, array given
+Phar::addFile() expects parameter 1 to be a valid path, array given
+Phar::addFromString() expects exactly 2 parameters, 1 given
 Write operations disabled by the php.ini setting phar.readonly
-
-Warning: Phar::setMetadata() expects exactly 1 parameter, 2 given in %sbadparameters.php on line %d
+Phar::setMetadata() expects exactly 1 parameter, 2 given
 Write operations disabled by the php.ini setting phar.readonly
 ===DONE===
index 4439fcf792f6501f46d450e9489244447515d097..aa2d17182cbe981ab761e1bf56892137a75ee476 100644 (file)
@@ -38,7 +38,7 @@ try {
 
 try {
        $phar->addFromString(".phar\0", "gotcha");
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo "CAUGHT: ". $e->getMessage() ."\n";
 }
 
@@ -54,6 +54,5 @@ CAUGHT: Cannot create any files in magic ".phar" directory
 CAUGHT: Cannot create any files in magic ".phar" directory
 CAUGHT: Cannot create any files in magic ".phar" directory
 CAUGHT: Cannot create any files in magic ".phar" directory
-
-Warning: Phar::addFromString() expects parameter 1 to be a valid path, string given in %s%ebug64931.php on line %d
+CAUGHT: Phar::addFromString() expects parameter 1 to be a valid path, string given
 ===DONE===
index fd200d8613d64b6f350d6fdf0440cedbf06d2894..c10d19c71166392ffa0aa7c1b6622803e9a840dd 100644 (file)
@@ -53,7 +53,7 @@ foreach($checks as $check)
        {
                $phar[$check] = 'error';
        }
-       catch(Exception $e)
+       catch (TypeError $e)
        {
                echo 'Exception: ' . $e->getMessage() . "\n";
        }
@@ -79,4 +79,5 @@ string(5) "query"
 11:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contains illegal character
 12:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contains illegal character
 13:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contains illegal character
-Error: Phar::offsetSet() expects parameter 1 to be a valid path, string given===DONE===
+Exception: Phar::offsetSet() expects parameter 1 to be a valid path, string given
+===DONE===
index b75601a07b64cde1ed39dd9cdd6ef4b8f07a2f14..d061cf3c918427279b199cc2dc2c3c4693c402b7 100644 (file)
@@ -14,7 +14,11 @@ Phar::interceptFileFuncs();
 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
 $pname = 'phar://' . $fname;
 
-file_get_contents(array());
+try {
+    file_get_contents(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 chdir(dirname(__FILE__));
 file_put_contents($fname, "blah\n");
 file_put_contents("foob", "test\n");
@@ -46,7 +50,7 @@ include $pname . '/foo/hi';
 <?php rmdir(dirname(__FILE__) . '/poo'); ?>
 <?php unlink(dirname(__FILE__) . '/foob'); ?>
 --EXPECTF--
-Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %sfgc_edgecases.php on line %d
+file_get_contents() expects parameter 1 to be a valid path, array given
 blah
 <?php
 echo file_get_contents("foo/" . basename(__FILE__));
index b55bc59c84326652a35c560aaa9ddc9d4dc33c19..9f9022cc8d8f2553f4e7ad276c255241c96be405 100644 (file)
@@ -10,7 +10,6 @@ phar.readonly=0
 Phar::interceptFileFuncs();
 $a = fopen(__FILE__, 'rb'); // this satisfies 1 line of code coverage
 fclose($a);
-$a = fopen(); // this satisfies another line of code coverage
 
 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
 $a = new Phar($fname);
@@ -36,7 +35,6 @@ include $fname;
 --CLEAN--
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 --EXPECTF--
-Warning: fopen() expects at least 2 parameters, 0 given in %sfopen.php on line %d
 hihi
 Warning: fopen(notfound.txt): failed to open stream: No such file or directory in phar://%sfopen.phar.php/index.php on line %d
 ===DONE===
index 4ac529a4e00f07cf2a5ade6bc95dbae5f24dc018..2c70e17352d45c79709a48fbab59bf5e331b7fe0 100644 (file)
@@ -10,7 +10,11 @@ Phar::interceptFileFuncs();
 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
 $pname = 'phar://' . $fname;
 
-fopen(array(), 'r');
+try {
+    fopen(array(), 'r');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 chdir(dirname(__FILE__));
 file_put_contents($fname, "blah\n");
 file_put_contents("foob", "test\n");
@@ -35,7 +39,7 @@ include $pname . '/foo/hi';
 <?php rmdir(dirname(__FILE__) . '/poo'); ?>
 <?php unlink(dirname(__FILE__) . '/foob'); ?>
 --EXPECTF--
-Warning: fopen() expects parameter 1 to be a valid path, array given in %sfopen_edgecases2.php on line %d
+fopen() expects parameter 1 to be a valid path, array given
 blah
 test
 
index ce59d9824f943f3cf2c3db5bd7392771d88e4030..edd5a65048e9dacda033bac805782d42aa973418 100644 (file)
@@ -19,9 +19,7 @@ $files['b.php'] = '<?php echo "This is b\n"; ?>';
 $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
 include 'files/phar_test.inc';
 
-$fp = fopen($pname . '/b/c.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($pname . '/b/c.php', 'wb'));
 include $pname . '/b/c.php';
 ?>
 ===DONE===
@@ -29,9 +27,6 @@ include $pname . '/b/c.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_existing_b.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_existing_b.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_existing_b.php on line %d
+bool(false)
 This is b/c
 ===DONE===
index eb0c27bf64815bf2bc74e12d8867df9ec2167422..5c389956fa7e5f697e90edea8927ef8fa3efc7fd 100644 (file)
@@ -19,9 +19,7 @@ $files['b.php'] = '<?php echo "This is b\n"; ?>';
 $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
 include 'files/phar_test.inc';
 
-$fp = fopen($pname . '/b/c.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($pname . '/b/c.php', 'wb'));
 include $pname . '/b/c.php';
 ?>
 ===DONE===
@@ -29,9 +27,6 @@ include $pname . '/b/c.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_existing_c.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %spen_for_write_existing_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %spen_for_write_existing_c.php on line %d
+bool(false)
 This is b/c
 ===DONE===
index 53b31e03d504bf9b9886f787f6a808eb551274aa..775b90b1bbc8bf5be711993ac92dc35ac61ab169 100644 (file)
@@ -19,9 +19,7 @@ $files['b.php'] = '<?php echo "This is b\n"; ?>';
 $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
 include 'files/phar_test.inc';
 
-$fp = fopen($pname . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($pname . '/b/new.php', 'wb'));
 include $pname . '/b/c.php';
 include $pname . '/b/new.php';
 ?>
@@ -31,10 +29,7 @@ include $pname . '/b/new.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_b.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_b.php on line %d
+bool(false)
 This is b/c
 
 Warning: include(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.php" in %sopen_for_write_newfile_b.php on line %d
index 8275c02baa73cdde34c9495d9bca1f3b9f2e960e..2b313ebf90fe338f84118c6f63c97c74fd7b700d 100644 (file)
@@ -19,9 +19,7 @@ $files['b.php'] = '<?php echo "This is b\n"; ?>';
 $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
 include 'files/phar_test.inc';
 
-$fp = fopen($pname . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($pname . '/b/new.php', 'wb'));
 include $pname . '/b/c.php';
 include $pname . '/b/new.php';
 ?>
@@ -31,10 +29,7 @@ include $pname . '/b/new.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
+bool(false)
 This is b/c
 
 Warning: include(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.php" in %sopen_for_write_newfile_c.php on line %d
index be899df81b7a67d72ec63329ce351c5b40fe78f7..68ea62d3c3b68ac59ff34354a08c15ea677a2841 100644 (file)
@@ -12,7 +12,11 @@ Phar::interceptFileFuncs();
 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
 $pname = 'phar://' . $fname;
 
-opendir(array());
+try {
+    opendir(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 mkdir(dirname(__FILE__) . '/poo');
 chdir(dirname(__FILE__));
@@ -52,7 +56,7 @@ include $pname . '/foo';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 <?php rmdir(dirname(__FILE__) . '/poo');
 --EXPECTF--
-Warning: opendir() expects parameter 1 to be a valid path, array given in %sopendir_edgecases.php on line %d
+opendir() expects parameter 1 to be a valid path, array given
 .
 ..
 foo
index c269a8b34f09389e4a68179b8179d14d4de3bf69..7da4c97493eb22192881b3efabcaa04fbd7271c1 100644 (file)
@@ -40,7 +40,6 @@ $b = new Phar($fname2);
 var_dump($b->isFileFormat(Phar::PHAR));
 var_dump($b->isCompressed() == Phar::BZ2);
 // additional code coverage
-$b->isFileFormat(array());
 try {
 $b->isFileFormat(25);
 } catch (Exception $e) {
@@ -58,7 +57,5 @@ string(9) "it worked"
 string(%d) "phar://%sphar_bz2.phar/tar_004.php"
 bool(true)
 bool(true)
-
-Warning: Phar::isFileFormat() expects parameter 1 to be int, array given in %sphar_bz2.php on line %d
 Unknown file format specified
 ===DONE===
index 3344d9bbbd4ac5ef44d21b7bf7e53ba61d83e38a..3a76fb12e895b179e54153f1aa03b9a5e2efe00d 100644 (file)
@@ -32,18 +32,17 @@ $unc2 = $gz->decompress();
 echo $unc2->getPath() . "\n";
 $unc3 = $gz->decompress('hooba.phar');
 echo $unc3->getPath() . "\n";
-$gz->decompress(array());
 $zip = $phar->convertToData(Phar::ZIP);
 ini_set('phar.readonly', 1);
 try {
-$gz->decompress();
+    $gz->decompress();
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 try {
-$zip->decompress();
+    $zip->decompress();
 } catch (Exception $e) {
-echo $e->getMessage() . "\n";
+    echo $e->getMessage() . "\n";
 }
 ?>
 ===DONE===
@@ -62,8 +61,6 @@ int(4096)
 %sphar_decompress2.phar
 %sphar_decompress.phar
 %sphar_decompress.hooba.phar
-
-Warning: Phar::decompress() expects parameter 1 to be %string, array given in %sphar_decompress.php on line %d
 Cannot decompress phar archive, phar is read-only
 Cannot decompress zip-based archives with whole-archive compression
 ===DONE===
index f7d1403d599a37ab85cf4c252c2e6d0558374fea..2d1091dbac708f5303e244ea8473c4c86601a053 100644 (file)
@@ -48,7 +48,11 @@ try {
        echo $e->getMessage(), "\n";
 }
 
-$a->extractTo(array());
+try {
+    $a->extractTo(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 try {
        $a->extractTo('');
@@ -137,8 +141,7 @@ string(3) "hi3"
 string(3) "hi2"
 bool(false)
 Invalid argument, expected a filename (string) or array of filenames
-
-Warning: Phar::extractTo() expects parameter 1 to be a valid path, array given in %sphar_extract.php on line %d
+Phar::extractTo() expects parameter 1 to be a valid path, array given
 Invalid argument, extraction path must be non-zero length
 Unable to use path "%soops" for extraction, it is a file, must be a directory
 Invalid argument, array of filenames to extract contains non-string value
index a59f498b95979caf918747459bca6e1ad228df1a..84d2e757e9b9cf25b26c7645eb8380780402ce2a 100644 (file)
@@ -7,8 +7,6 @@ phar.readonly=1
 --FILE--
 <?php
 chdir(dirname(__FILE__));
-Phar::isValidPharFilename(array());
-echo "*\n";
 var_dump(Phar::isValidPharFilename('*'));
 var_dump(Phar::isValidPharFilename('*', true));
 var_dump(Phar::isValidPharFilename('*', false));
@@ -76,8 +74,6 @@ var_dump(Phar::isValidPharFilename('dir.phar.php', false));
 <?php
 rmdir(dirname(__FILE__) . '/.phar');
 --EXPECTF--
-Warning: Phar::isValidPharFilename() expects parameter 1 to be a valid path, array given in %sphar_isvalidpharfilename.php on line %d
-*
 bool(false)
 bool(false)
 bool(false)
index de9b499a8373eefd6eedcee231e95cb7a1247b54..b71ecda23d893324876f2234cb0a3830998d4ef4 100644 (file)
@@ -23,7 +23,7 @@ try
 {
        $phar->setFileClass('SplFileInfo');
 }
-catch (UnexpectedValueException $e)
+catch (TypeError $e)
 {
        echo $e->getMessage() . "\n";
 }
index 25acf82285f6e620a1328046d998d470be4524e6..194946b498fbb71ff0bef92b361036a8b06ea02c 100644 (file)
@@ -11,7 +11,6 @@ $pname = 'phar://' . $fname;
 
 $phar = new Phar($fname);
 $phar['index.php'] = '<?php
-Phar::running(array());
 var_dump(Phar::running());
 var_dump(Phar::running(false));
 ?>';
@@ -22,7 +21,6 @@ var_dump(Phar::running());
 --CLEAN--
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 --EXPECTF--
-Warning: Phar::running() expects parameter 1 to be bool, array given in phar://%sphar_running.phar.php/index.php on line 2
 string(%d) "phar://%sphar_running.phar.php"
 string(%d) "%sphar_running.phar.php"
 string(0) ""
index 98001fcbf08b5b74227f05a4b650e63dfa07b9ad..9e7d0f2383401a25a5e1565b2aae1e218b502967 100644 (file)
@@ -28,7 +28,11 @@ Phar::unlinkArchive($pdname);
 } catch (Exception $e) {
 echo $e->getMessage(),"\n";
 }
-Phar::unlinkArchive(array());
+try {
+    Phar::unlinkArchive(array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 $pname = 'phar://' . $fname;
 $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
@@ -89,8 +93,7 @@ __HALT_COMPILER();
 Unknown phar archive ""
 Unknown phar archive "%sphar_unlinkarchive.phar"
 Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry)
-
-Warning: Phar::unlinkArchive() expects parameter 1 to be a valid path, array given in %sphar_unlinkarchive.php on line %d
+Phar::unlinkArchive() expects parameter 1 to be a valid path, array given
 bool(false)
 string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
 phar archive "%sphar_unlinkarchive.phar" has open file handles or objects.  fclose() all file handles, and unset() all objects prior to calling unlinkArchive()
index 23ce5c914ae0e3036643c9d3f56a5a6cc1e7c23c..6a6b07b4d1d66683b9b382dcd7340378661655ad 100644 (file)
@@ -19,7 +19,6 @@ $phar['a']->chmod(066);
 } catch (Exception $e) {
 echo $e->getMessage(), "\n";
 }
-$b->chmod(array());
 lstat($pname . '/a/b'); // sets BG(CurrentLStatFile)
 $b->chmod(0666);
 ?>
@@ -28,6 +27,4 @@ $b->chmod(0666);
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
 --EXPECTF--
 Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod
-
-Warning: PharFileInfo::chmod() expects parameter 1 to be int, array given in %spharfileinfo_chmod.php on line %d
 ===DONE===
index 9f5480be4f79ed2c92f5a5614ea32bff832d09bf..dbf9e8fa389a9c0bc11f2a775955f870e1edbca8 100644 (file)
@@ -17,7 +17,6 @@ $phar['a/b'] = 'hi there';
 
 $b = $phar['a/b'];
 
-$b->isCompressed(array());
 try {
 $b->isCompressed(25);
 } catch (Exception $e) {
@@ -76,7 +75,6 @@ var_dump($b->decompress());
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?>
 --EXPECTF--
-Warning: PharFileInfo::isCompressed() expects parameter 1 to be int, array given in %spharfileinfo_compression.php on line 11
 Unknown compression type specified
 Unknown compression type specified
 Cannot compress with Gzip compression, not possible with tar-based phar archives
index 8fb6935f2679ecf68fcd57640cd37f12a78ad317..1dc3ab911837b17967755342072e76404acaea53 100644 (file)
@@ -36,8 +36,6 @@ $b->delMetadata();
 } catch (Exception $e) {
 echo $e->getMessage(), "\n";
 }
-ini_set('phar.readonly', 0);
-$b->setMetadata(1,2,3);
 ?>
 ===DONE===
 --CLEAN--
@@ -48,6 +46,4 @@ Phar entry is a temporary directory (not an actual entry in the archive), cannot
 Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata
 Write operations disabled by the php.ini setting phar.readonly
 Write operations disabled by the php.ini setting phar.readonly
-
-Warning: PharFileInfo::setMetadata() expects exactly 1 parameter, 3 given in %spharfileinfo_setmetadata.php on line %d
 ===DONE===
index f6a0dc65b94a33d257501107afa8aa3866f9b019..20617c6b280b4da6e54e3df1dea1b7301d3eca85 100644 (file)
@@ -10,7 +10,6 @@ Phar::interceptFileFuncs();
 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
 $pname = 'phar://' . $fname;
 
-readfile(array());
 chdir(dirname(__FILE__));
 file_put_contents($fname, "blah\n");
 file_put_contents("foob", "test\n");
@@ -35,7 +34,6 @@ include $pname . '/foo/hi';
 <?php rmdir(dirname(__FILE__) . '/poo'); ?>
 <?php unlink(dirname(__FILE__) . '/foob'); ?>
 --EXPECTF--
-Warning: readfile() expects parameter 1 to be a valid path, array given in %sreadfile_edgecases.php on line %d
 blah
 <?php
 readfile("foo/" . basename(__FILE__));
index 99f658fa78c3b1fb309559cb8e81255808903a08..de21dd5c08f621cc4869393378207a59f0776281 100644 (file)
@@ -8,8 +8,6 @@ phar.require_hash=0
 --FILE--
 <?php
 Phar::interceptFileFuncs();
-is_file();
-is_link();
 var_dump(is_file(__FILE__));
 
 $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
@@ -39,9 +37,6 @@ include $fname3;
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?>
 --EXPECTF--
-Warning: is_file() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d
-
-Warning: is_link() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d
 bool(true)
 is_link
 bool(false)
index 4c67def631e8f4433240ab6aa46420c7ebf8d845..0bd97d55ba5dbf967b91ba63fa69fdc8c35de557 100644 (file)
@@ -29,9 +29,7 @@ foreach ($files as $n => $file) {
 $phar->stopBuffering();
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/c.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/c.php', 'wb'));
 
 include $alias . '/b/c.php';
 
@@ -42,10 +40,7 @@ include $alias . '/b/c.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_existing_b.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_existing_b.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_existing_b.php on line %d
+bool(false)
 This is b/c
 
 ===DONE===
index 9e73f1e8997d235427761b92711fe6ac0746714a..d3c12b8e05a73482a3ff4d1533d32d92b3710ecf 100644 (file)
@@ -29,9 +29,7 @@ foreach ($files as $n => $file) {
 $phar->stopBuffering();
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/c.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/c.php', 'wb'));
 
 include $alias . '/b/c.php';
 
@@ -42,10 +40,7 @@ include $alias . '/b/c.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_existing_c.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %spen_for_write_existing_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %spen_for_write_existing_c.php on line %d
+bool(false)
 This is b/c
 
 ===DONE===
index 5c57587234228ccd85c2fa3fb2140cb996436594..657782fb389c6f00de0981dc45ee562669fe52e5 100644 (file)
@@ -29,9 +29,7 @@ foreach ($files as $n => $file) {
 $phar->stopBuffering();
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/new.php', 'wb'));
 
 include $alias . '/b/c.php';
 include $alias . '/b/new.php';
@@ -43,10 +41,7 @@ include $alias . '/b/new.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_b.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_b.php on line %d
+bool(false)
 This is b/c
 
 Warning: include(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.tar" in %sopen_for_write_newfile_b.php on line %d
index b5078426fe2d043a30d3f97bb4c6bb9b2bebf949..0a65086cc7c8d9edfab70ac6c6b28b6b0dbc6af3 100644 (file)
@@ -29,9 +29,7 @@ foreach ($files as $n => $file) {
 $phar->stopBuffering();
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/new.php', 'wb'));
 include $alias . '/b/c.php';
 include $alias . '/b/new.php';
 
@@ -42,10 +40,7 @@ include $alias . '/b/new.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
+bool(false)
 This is b/c
 
 Warning: include(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.tar" in %sopen_for_write_newfile_c.php on line %d
index 789067eb29a336b4345a96b13bea28a586e56836..9527583b193b549e07c43fd2e299354a1bdbe2fe 100644 (file)
@@ -29,9 +29,7 @@ $phar->stopBuffering();
 
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/c.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/c.php', 'wb'));
 include $alias . '/b/c.php';
 ?>
 ===DONE===
@@ -39,9 +37,6 @@ include $alias . '/b/c.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_existing_b.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %spen_for_write_existing_b.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %spen_for_write_existing_b.php on line %d
+bool(false)
 This is b/c
 ===DONE===
index adcb50ff93837c4e0251b5dbc0566d49fff60f1b..a115985ca345cacedb3dc8042e10da9ae7205c7e 100644 (file)
@@ -29,9 +29,7 @@ $phar->stopBuffering();
 
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/c.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/c.php', 'wb'));
 include $alias . '/b/c.php';
 ?>
 ===DONE===
@@ -39,9 +37,6 @@ include $alias . '/b/c.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_existing_c.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %spen_for_write_existing_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %spen_for_write_existing_c.php on line %d
+bool(false)
 This is b/c
 ===DONE===
index 134bb4f0dd007144df69f6718c14610851eaec1b..30e33293afbd6974e1ac4f2f89f679d61bb67b12 100644 (file)
@@ -29,9 +29,7 @@ $phar->stopBuffering();
 
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/new.php', 'wb'));
 
 include $alias . '/b/c.php';
 include $alias . '/b/new.php';
@@ -42,10 +40,7 @@ include $alias . '/b/new.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_b.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_b.php on line %d
+bool(false)
 This is b/c
 
 Warning: include(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.zip" in %sopen_for_write_newfile_b.php on line %d
index 86e33da7c9607e17e9032138e1603f033ee8dfdd..415547d5a16196c1e92ed3d90766a0e93e791177 100644 (file)
@@ -29,9 +29,7 @@ $phar->stopBuffering();
 
 ini_set('phar.readonly', 1);
 
-$fp = fopen($alias . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/new.php', 'wb'));
 
 include $alias . '/b/c.php';
 include $alias . '/b/new.php';
@@ -42,10 +40,7 @@ include $alias . '/b/new.php';
 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
 --EXPECTF--
 Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
+bool(false)
 This is b/c
 
 Warning: include(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.zip" in %sopen_for_write_newfile_c.php on line %d
diff --git a/ext/posix/tests/posix_errno_error.phpt b/ext/posix/tests/posix_errno_error.phpt
deleted file mode 100644 (file)
index 0a77fb0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---TEST--
-Test function posix_errno() by calling it with its expected arguments
---SKIPIF--
-<?php
-        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Morten Amundsen mor10am@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-echo "*** Test by calling method or function with more than expected arguments ***\n";
-
-// test without any error
-var_dump(posix_errno('bar'));
-
-?>
---EXPECTF--
-*** Test by calling method or function with more than expected arguments ***
-
-Warning: posix_errno() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index 20f7b0372e7a21eea8ddf284cf95d198de59d0c5..f6f180925a17b7c0d1381b55ae131835308a3d3a 100644 (file)
@@ -9,11 +9,7 @@ if (!function_exists('posix_getcwd')) die('skip posix_getcwd() not found');
 <?php
 
 var_dump(posix_getcwd());
-var_dump(posix_getcwd(1));
 
 ?>
 --EXPECTF--
 string(%d) "%s"
-
-Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index ef7fa57a9dbfcd1cd826bad5f44dc7ca413bbabb..e9dbe2a6ce6f37a588897e72951000a3b7172c47 100644 (file)
@@ -14,17 +14,6 @@ Test posix_getgrgid() function : error conditions
 
 echo "*** Testing posix_getgrgid() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing posix_getgrgid() function with Zero arguments --\n";
-var_dump( posix_getgrgid() );
-
-//Test posix_getgrgid with one more than the expected number of arguments
-echo "\n-- Testing posix_getgrgid() function with more than expected no. of arguments --\n";
-
-$extra_arg = 10;
-$gid = 0;
-var_dump( posix_getgrgid($gid, $extra_arg) );
-
 echo "\n-- Testing posix_getgrgid() function with a negative group id --\n";
 $gid = -999;
 var_dump( posix_getgrgid($gid));
@@ -34,16 +23,6 @@ echo "Done";
 --EXPECTF--
 *** Testing posix_getgrgid() : error conditions ***
 
--- Testing posix_getgrgid() function with Zero arguments --
-
-Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing posix_getgrgid() function with more than expected no. of arguments --
-
-Warning: posix_getgrgid() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing posix_getgrgid() function with a negative group id --
 bool(false)
 Done
index 88d68554ee72db5d07aba02c0a806095d13640a1..19e306b2eeb15c61e18b90d826764ea39cccc44a 100644 (file)
@@ -16,14 +16,6 @@ if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) {
 
 echo "*** Testing posix_getpgid() : error conditions ***\n";
 
-echo "\n-- Testing posix_getpgid() function no arguments --\n";
-var_dump( posix_getpgid() );
-
-echo "\n-- Testing posix_getpgid() with one extra argument --\n";
-$pid = 10;
-$extra_arg = 20;
-var_dump( posix_getpgid($pid, $extra_arg) );
-
 echo "\n-- Testing posix_getpgid() with negative pid  --\n";
 $pid = -99;
 var_dump( posix_getpgid($pid) );
@@ -33,16 +25,6 @@ echo "Done";
 --EXPECTF--
 *** Testing posix_getpgid() : error conditions ***
 
--- Testing posix_getpgid() function no arguments --
-
-Warning: posix_getpgid() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing posix_getpgid() with one extra argument --
-
-Warning: posix_getpgid() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing posix_getpgid() with negative pid  --
 bool(false)
 Done
index 440edf6a769d635843b513b4248d388d23daa9bc..365033b6897f423daa149b3633a8bade083ed9af 100644 (file)
@@ -14,14 +14,6 @@ Test posix_getpwuid() function : error conditions
 
 echo "*** Testing posix_getpwuid() : error conditions ***\n";
 
-echo "\n-- Testing posix_getpwuid() function with Zero arguments --\n";
-var_dump( posix_getpwuid() );
-
-echo "\n-- Testing posix_getpwuid() function with more than expected no. of arguments --\n";
-$uid = posix_getuid();
-$extra_arg = 10;
-var_dump( posix_getpwuid($uid, $extra_arg) );
-
 echo "\n-- Testing posix_getpwuid() function negative uid --\n";
 $uid = -99;
 var_dump( posix_getpwuid($uid) );
@@ -31,16 +23,6 @@ echo "Done";
 --EXPECTF--
 *** Testing posix_getpwuid() : error conditions ***
 
--- Testing posix_getpwuid() function with Zero arguments --
-
-Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing posix_getpwuid() function with more than expected no. of arguments --
-
-Warning: posix_getpwuid() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing posix_getpwuid() function negative uid --
 bool(false)
 Done
index 6013a40b9637abee4313539947fd8f589e291e17..833ae9a0dbcde1bcce15ae0dbdc92d5ba4018c06 100644 (file)
@@ -13,16 +13,9 @@ PHP Testfest Berlin 2009-05-10
 ?>
 --FILE--
 <?php
-var_dump( posix_getsid() );
-var_dump( posix_getsid(array()) );
 var_dump( posix_getsid(-1) );
 ?>
 ===DONE===
 --EXPECTF--
-Warning: posix_getsid() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: posix_getsid() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
 bool(false)
 ===DONE===
index 5b0ec8adadde43d7e7974ef737efdb965552a002..20cf8cef8b336bde7fb4a5f38e215bb9e89f0d60 100644 (file)
@@ -8,11 +8,8 @@ if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found
 --FILE--
 <?php
 
-var_dump(posix_initgroups('foo', 'bar'));
 var_dump(posix_initgroups(NULL, NULL));
 
 ?>
 --EXPECTF--
-Warning: posix_initgroups() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
 bool(false)
index 0c8f6ef642d461d1351c445d77fd8315e89339a4..89474c4994266866e3407b0d570a212d1a610c1c 100644 (file)
@@ -16,16 +16,6 @@ Test posix_kill() function : error conditions
 echo "*** Testing posix_kill() : error conditions ***\n";
 
 
-echo "\n-- Testing posix_kill() function with more than expected no. of arguments --\n";
-$pid = posix_getpid();
-$sig = 9;
-$extra_arg = 10;
-var_dump( posix_kill($pid, $sig, $extra_arg) );
-
-echo "\n-- Testing posix_kill() function with less than expected no. of arguments --\n";
-$pid = posix_getpid();
-var_dump( posix_kill($pid) );
-
 echo "\n-- Testing posix_kill() function with invalid signal --\n";
 $pid = posix_getpid();
 $sig = 999;
@@ -41,16 +31,6 @@ echo "Done";
 --EXPECTF--
 *** Testing posix_kill() : error conditions ***
 
--- Testing posix_kill() function with more than expected no. of arguments --
-
-Warning: posix_kill() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-
--- Testing posix_kill() function with less than expected no. of arguments --
-
-Warning: posix_kill() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-
 -- Testing posix_kill() function with invalid signal --
 bool(false)
 
diff --git a/ext/posix/tests/posix_seteuid_variation4.phpt b/ext/posix/tests/posix_seteuid_variation4.phpt
deleted file mode 100644 (file)
index 4224baf..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-Test function posix_seteuid() by substituting argument 1 with float values.
---SKIPIF--
-<?php
-        PHP_INT_SIZE == 4 or die("skip - 32-bit only");
-        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-        if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with float values ***\n";
-
-$myUid = posix_getuid();
-
-$myUid = $myUid - 1.1;
-
-$variation_array = array(
-  'float '.$myUid => $myUid,
-  'float -'.$myUid => -$myUid,
-  'float 12.3456789000e10' => 12.3456789000e10,
-  'float -12.3456789000e10' => -12.3456789000e10,
-  'float .5' => .5,
-  );
-
-
-foreach ( $variation_array as $var ) {
-  var_dump(posix_seteuid( $var  ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with float values ***
-bool(false)
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_setgid_variation4.phpt b/ext/posix/tests/posix_setgid_variation4.phpt
deleted file mode 100644 (file)
index d85b5a9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-Test function posix_setgid() by substituting argument 1 with float values.
---SKIPIF--
-<?php
-        PHP_INT_SIZE == 4 or die("skip - 32-bit only");
-        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-        if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with float values ***\n";
-
-
-
-$variation_array = array(
-  'float 10.5' => 10.5,
-  'float -10.5' => -10.5,
-  'float 12.3456789000e10' => 12.3456789000e10,
-  'float -12.3456789000e10' => -12.3456789000e10,
-  'float .5' => .5,
-  );
-
-
-foreach ( $variation_array as $var ) {
-  var_dump(posix_setgid( $var  ) );
-}
-?>
-===DONE===
---EXPECTF--
-*** Test substituting argument 1 with float values ***
-bool(false)
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_setuid_variation4.phpt b/ext/posix/tests/posix_setuid_variation4.phpt
deleted file mode 100644 (file)
index 7423ba3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-Test function posix_setuid() by substituting argument 1 with float values.
---SKIPIF--
-<?php
-        PHP_INT_SIZE == 4 or die("skip - 32-bit only");
-        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-        if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with float values ***\n";
-
-$myUid = posix_getuid();
-
-$myUid = $myUid - 1.1;
-
-$variation_array = array(
-  'float '.$myUid => $myUid,
-  'float -'.$myUid => -$myUid,
-  'float 12.3456789000e10' => 12.3456789000e10,
-  'float -12.3456789000e10' => -12.3456789000e10,
-  'float .5' => .5,
-  );
-
-
-foreach ( $variation_array as $var ) {
-  var_dump(posix_setuid( $var  ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with float values ***
-bool(false)
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-bool(false)
index 3007f976c6377f160fa1fbef5455c7d207ff4759..60b096656a2c4e64d41b6239213f4bcb619654dd 100644 (file)
@@ -14,14 +14,6 @@ Test posix_strerror() function : error conditions
 
 echo "*** Testing posix_strerror() : error conditions ***\n";
 
-echo "\n-- Testing posix_strerror() function with Zero arguments --\n";
-var_dump( posix_strerror() );
-
-echo "\n-- Testing posix_strerror() function with more than expected no. of arguments --\n";
-$errno = posix_get_last_error();
-$extra_arg = 10;
-var_dump( posix_strerror($errno, $extra_arg) );
-
 echo "\n-- Testing posix_strerror() function with invalid error number --\n";
 $errno = -999;
 echo gettype( posix_strerror($errno) )."\n";
@@ -31,16 +23,6 @@ echo "Done";
 --EXPECTF--
 *** Testing posix_strerror() : error conditions ***
 
--- Testing posix_strerror() function with Zero arguments --
-
-Warning: posix_strerror() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing posix_strerror() function with more than expected no. of arguments --
-
-Warning: posix_strerror() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing posix_strerror() function with invalid error number --
 string
 Done
index 158a2d0ca7d0c7a9245faebac17f5bb7492a42f2..ba340db3001a86dbfbee77ff48af5c7e1d496021 100644 (file)
@@ -20,14 +20,11 @@ PHP Testfest Berlin 2009-05-10
 ?>
 --FILE--
 <?php
-    var_dump(posix_ttyname()); // param missing
     var_dump(posix_ttyname(0)); // param not a ressource
     var_dump(posix_ttyname(imagecreate(1, 1))); // wrong resource type
 ?>
 ===DONE===
 --EXPECTF--
-Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 
 Warning: posix_ttyname(): supplied resource is not a valid stream resource in %s on line %d
index 1b0dc2cdfa1518a9739b08d1df062ae79ea6130e..538775d01344f7a946718316df201c91d0c3ceba 100644 (file)
@@ -10,15 +10,12 @@ if (!@pspell_new('en')) die('skip English dictionary is not available');
 
 $p = pspell_new('en');
 
-var_dump(pspell_check('a'));
 var_dump(pspell_check($p, 'somebogusword'));
 
 var_dump(pspell_add_to_session($p, ''));
 var_dump(pspell_add_to_session($p, 'somebogusword'));
 var_dump(pspell_check($p, 'somebogusword'));
 
-var_dump(pspell_clear_session(new stdclass));
-
 $res = @pspell_clear_session($p);
 if ($res) {
        var_dump($res);
@@ -29,14 +26,9 @@ if ($res) {
 }
 ?>
 --EXPECTF--
-Warning: pspell_check() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
 bool(false)
 bool(false)
 bool(true)
 bool(true)
-
-Warning: pspell_clear_session() expects parameter 1 to be int, object given in %s on line %d
-NULL
 bool(true)
 bool(false)
index b5d921e27962114bf5669dd118bf5dcdd67b57cc..fb69ba5cb0276c7c409761f467e1c09b7779dcfb 100644 (file)
@@ -13,7 +13,6 @@ function foo() {
 
 var_dump(readline_callback_handler_install('testing: ', 'foo'));
 var_dump(readline_callback_handler_install('testing: ', 'foobar!'));
-var_dump(readline_callback_handler_install('testing: '));
 
 ?>
 --EXPECTF--
@@ -21,6 +20,3 @@ bool(true)
 
 Warning: readline_callback_handler_install(): foobar! is not callable in %s on line %d
 bool(false)
-
-Warning: readline_callback_handler_install() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
index a4bd524736296ed98bd35153ea001fb91482b7eb..fe7c8c406e018bbf6eea0060ca66a10cfd642e74 100644 (file)
@@ -10,7 +10,6 @@ var_dump(readline_list_history());
 var_dump(readline_add_history(NULL));
 var_dump(readline_list_history());
 var_dump(readline_clear_history());
-var_dump(readline_add_history());
 
 ?>
 --EXPECTF--
@@ -27,6 +26,3 @@ array(2) {
   string(0) ""
 }
 bool(true)
-
-Warning: readline_add_history() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
index cc054b0aa66fbf6f7a202ff67f2109ec8d10b642..9dd13b4de15f165f0b9d56876deaaac24f8fd7ff 100644 (file)
@@ -13,7 +13,6 @@ function foo() {
 
 var_dump(readline_callback_handler_install('testing: ', 'foo'));
 var_dump(readline_callback_handler_install('testing: ', 'foobar!'));
-var_dump(readline_callback_handler_install('testing: '));
 
 ?>
 --EXPECTF--
@@ -21,6 +20,3 @@ var_dump(readline_callback_handler_install('testing: '));
 
 Warning: readline_callback_handler_install(): foobar! is not callable in %s on line %d
 bool(false)
-
-Warning: readline_callback_handler_install() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
index 5df1ae77a00668bae297e6a341205cbbbb90be90..8dea376ccf839a006be52716d7c531b6d3088f2a 100644 (file)
@@ -6,11 +6,7 @@ readline_clear_history(): Basic test
 <?php
 
 var_dump(readline_clear_history());
-var_dump(readline_clear_history(1));
 
 ?>
 --EXPECTF--
 bool(true)
-
-Warning: readline_clear_history() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index 2f6f9525d2ac09936edbae60906b13db681d1fdb..37e1b0af1752ae93c947a504128156634943ead5 100644 (file)
@@ -6,12 +6,8 @@ readline_list_history(): Basic test
 <?php
 
 var_dump(readline_list_history());
-var_dump(readline_list_history(1));
 
 ?>
 --EXPECTF--
 array(0) {
 }
-
-Warning: readline_list_history() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index c463bb72c1bf5b46a4acd4243a8ed4ce4d6c5e60..05825ba97efe9708fa5359254d565a7f3a460a43 100644 (file)
@@ -4,7 +4,7 @@ ReflectionClass::__constructor() - bad arguments
 <?php
 try {
        var_dump(new ReflectionClass());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 
@@ -34,7 +34,7 @@ try {
 
 try {
        var_dump(new ReflectionClass("stdClass", 1));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 
@@ -46,21 +46,12 @@ try {
 
 ?>
 --EXPECTF--
-Warning: ReflectionClass::__construct() expects exactly 1 parameter, 0 given in %s on line 3
-object(ReflectionClass)#%d (1) {
-  ["name"]=>
-  string(0) ""
-}
+ReflectionClass::__construct() expects exactly 1 parameter, 0 given
 Class  does not exist
 Class 1 does not exist
 Class 1 does not exist
 
 Notice: Array to string conversion in %s on line 27
 Class Array does not exist
-
-Warning: ReflectionClass::__construct() expects exactly 1 parameter, 2 given in %s on line 33
-object(ReflectionClass)#%d (1) {
-  ["name"]=>
-  string(0) ""
-}
+ReflectionClass::__construct() expects exactly 1 parameter, 2 given
 Class X does not exist
index 5260e719a33252ac5f57db803af6b82a6ebd57e6..020ac6f7f5fb7eee4e8648086547c30eb20f1b63 100644 (file)
@@ -8,30 +8,14 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->getConstant());
-var_dump($rc->getConstant("myConst", "myConst"));
 var_dump($rc->getConstant(null));
 var_dump($rc->getConstant(1));
 var_dump($rc->getConstant(1.5));
 var_dump($rc->getConstant(true));
-var_dump($rc->getConstant(array(1,2,3)));
-var_dump($rc->getConstant(new C));
 ?>
---EXPECTF--
+--EXPECT--
 Check invalid params:
-
-Warning: ReflectionClass::getConstant() expects exactly 1 parameter, 0 given in %s on line 8
-NULL
-
-Warning: ReflectionClass::getConstant() expects exactly 1 parameter, 2 given in %s on line 9
-NULL
 bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: ReflectionClass::getConstant() expects parameter 1 to be string, array given in %s on line 14
-NULL
-
-Warning: ReflectionClass::getConstant() expects parameter 1 to be string, object given in %s on line 15
-NULL
index 1eb084214b4f508d685423b3acf5382e4a5f4375..424550f67a0fec28d0052967f55fb14f4f4b38ff 100644 (file)
@@ -13,12 +13,12 @@ $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
 try {
        var_dump($rc->getMethod());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->getMethod("f", "f"));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -43,32 +43,24 @@ try {
 }
 try {
        var_dump($rc->getMethod(array(1,2,3)));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->getMethod(new C));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 
 
 ?>
---EXPECTF--
+--EXPECT--
 Check invalid params:
-
-Warning: ReflectionClass::getMethod() expects exactly 1 parameter, 0 given in %s on line 9
-NULL
-
-Warning: ReflectionClass::getMethod() expects exactly 1 parameter, 2 given in %s on line 14
-NULL
+ReflectionClass::getMethod() expects exactly 1 parameter, 0 given
+ReflectionClass::getMethod() expects exactly 1 parameter, 2 given
 Method  does not exist
 Method 1 does not exist
 Method 1.5 does not exist
 Method 1 does not exist
-
-Warning: ReflectionClass::getMethod() expects parameter 1 to be string, array given in %s on line 39
-NULL
-
-Warning: ReflectionClass::getMethod() expects parameter 1 to be string, object given in %s on line 44
-NULL
+ReflectionClass::getMethod() expects parameter 1 to be string, array given
+ReflectionClass::getMethod() expects parameter 1 to be string, object given
index 382948d3d37ffeaefe2aa4b82121f07891084587..ef64de5ecb030e1cf71c53c37799de290048e7b3 100644 (file)
@@ -10,11 +10,14 @@ class Foo {}
 
 class Bar extends Foo {}
 
-$rc1 = new ReflectionClass("Bar");
-var_dump($rc1->getParentClass());
+$rc = new ReflectionClass("Bar");
+$parent = $rc->getParentClass();
+$grandParent = $parent->getParentClass();
+var_dump($parent, $grandParent);
 ?>
 --EXPECTF--
 object(ReflectionClass)#%d (1) {
   ["name"]=>
   string(3) "Foo"
 }
+bool(false)
diff --git a/ext/reflection/tests/ReflectionClass_getParentClass_001.phpt b/ext/reflection/tests/ReflectionClass_getParentClass_001.phpt
deleted file mode 100644 (file)
index be50dbb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---TEST--
-ReflectionClass::getParentClass()
---CREDITS--
-Robin Fernandes <robinf@php.net>
-Steve Seear <stevseea@php.net>
---FILE--
-<?php
-class A {}
-class B extends A {}
-
-$rc = new ReflectionClass('B');
-$parent = $rc->getParentClass();
-$grandParent = $parent->getParentClass();
-var_dump($parent, $grandParent);
-
-echo "\nTest bad params:\n";
-var_dump($rc->getParentClass(null));
-var_dump($rc->getParentClass('x'));
-var_dump($rc->getParentClass('x', 123));
-
-?>
---EXPECTF--
-object(ReflectionClass)#%d (1) {
-  ["name"]=>
-  string(1) "A"
-}
-bool(false)
-
-Test bad params:
-
-Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 2 given in %s on line %d
-NULL
index 68522e097ae3b459fefac2930c5c04b9cdb4a4b5..d9a2ebcd711e37a9535da39207c0b8d1cf9963c8 100644 (file)
@@ -13,12 +13,12 @@ $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
 try {
        var_dump($rc->getProperty());
-} catch (exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->getProperty("a", "a"));
-} catch (exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -43,30 +43,22 @@ try {
 }
 try {
        var_dump($rc->getProperty(array(1,2,3)));
-} catch (exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->getProperty(new C));
-} catch (exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 ?>
---EXPECTF--
+--EXPECT--
 Check invalid params:
-
-Warning: ReflectionClass::getProperty() expects exactly 1 parameter, 0 given in %s on line 9
-NULL
-
-Warning: ReflectionClass::getProperty() expects exactly 1 parameter, 2 given in %s on line 14
-NULL
+ReflectionClass::getProperty() expects exactly 1 parameter, 0 given
+ReflectionClass::getProperty() expects exactly 1 parameter, 2 given
 Property  does not exist
 Property 1 does not exist
 Property 1.5 does not exist
 Property 1 does not exist
-
-Warning: ReflectionClass::getProperty() expects parameter 1 to be string, array given in %s on line 39
-NULL
-
-Warning: ReflectionClass::getProperty() expects parameter 1 to be string, object given in %s on line 44
-NULL
+ReflectionClass::getProperty() expects parameter 1 to be string, array given
+ReflectionClass::getProperty() expects parameter 1 to be string, object given
index 52fa378eb65799f301cc4b9a5af379f25b518f4a..7c071e5ba0fed139818d6e3735a01f16cbcfe9a4 100644 (file)
@@ -12,12 +12,12 @@ class C {
 $rc = new ReflectionClass('C');
 try {
        var_dump($rc->getStaticPropertyValue("x", "default value", 'blah'));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->getStaticPropertyValue());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -32,20 +32,15 @@ try {
 }
 try {
        var_dump($rc->getStaticPropertyValue(array(1,2,3)));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 
 
 ?>
---EXPECTF--
-Warning: ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given in %s on line 8
-NULL
-
-Warning: ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given in %s on line 13
-NULL
+--EXPECT--
+ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given
+ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given
 Class C does not have a property named 
 string(3) "def"
-
-Warning: ReflectionClass::getStaticPropertyValue() expects parameter 1 to be string, array given in %s on line 28
-NULL
+ReflectionClass::getStaticPropertyValue() expects parameter 1 to be string, array given
index 14c847401d10b478dabb06ea582b9813fbb452b1..257d9aa9daab7f5ba4c5c8f25b8e1fa55cda6259 100644 (file)
@@ -11,30 +11,14 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->hasConstant());
-var_dump($rc->hasConstant("myConst", "myConst"));
 var_dump($rc->hasConstant(null));
 var_dump($rc->hasConstant(1));
 var_dump($rc->hasConstant(1.5));
 var_dump($rc->hasConstant(true));
-var_dump($rc->hasConstant(array(1,2,3)));
-var_dump($rc->hasConstant(new C));
 ?>
---EXPECTF--
+--EXPECT--
 Check invalid params:
-
-Warning: ReflectionClass::hasConstant() expects exactly 1 parameter, 0 given in %s on line 8
-NULL
-
-Warning: ReflectionClass::hasConstant() expects exactly 1 parameter, 2 given in %s on line 9
-NULL
 bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: ReflectionClass::hasConstant() expects parameter 1 to be string, array given in %s on line 14
-NULL
-
-Warning: ReflectionClass::hasConstant() expects parameter 1 to be string, object given in %s on line 15
-NULL
index 63fe8791fc3f62cc82c6bf452d06f820a9d9542f..77f2865a31ac35e11f8c796fdea4eab01bba16fb 100644 (file)
@@ -11,30 +11,14 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->hasMethod());
-var_dump($rc->hasMethod("f", "f"));
 var_dump($rc->hasMethod(null));
 var_dump($rc->hasMethod(1));
 var_dump($rc->hasMethod(1.5));
 var_dump($rc->hasMethod(true));
-var_dump($rc->hasMethod(array(1,2,3)));
-var_dump($rc->hasMethod(new C));
 ?>
---EXPECTF--
+--EXPECT--
 Check invalid params:
-
-Warning: ReflectionClass::hasMethod() expects exactly 1 parameter, 0 given in %s on line 8
-NULL
-
-Warning: ReflectionClass::hasMethod() expects exactly 1 parameter, 2 given in %s on line 9
-NULL
 bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: ReflectionClass::hasMethod() expects parameter 1 to be string, array given in %s on line 14
-NULL
-
-Warning: ReflectionClass::hasMethod() expects parameter 1 to be string, object given in %s on line 15
-NULL
index 753890394f12d361a48a69ba6427b630daed5aa5..a1bbb9e73cb690a03088666eafd7ab0d47327f9c 100644 (file)
@@ -11,30 +11,14 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->hasProperty());
-var_dump($rc->hasProperty("a", "a"));
 var_dump($rc->hasProperty(null));
 var_dump($rc->hasProperty(1));
 var_dump($rc->hasProperty(1.5));
 var_dump($rc->hasProperty(true));
-var_dump($rc->hasProperty(array(1,2,3)));
-var_dump($rc->hasProperty(new C));
 ?>
 --EXPECTF--
 Check invalid params:
-
-Warning: ReflectionClass::hasProperty() expects exactly 1 parameter, 0 given in %s on line 8
-NULL
-
-Warning: ReflectionClass::hasProperty() expects exactly 1 parameter, 2 given in %s on line 9
-NULL
 bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: ReflectionClass::hasProperty() expects parameter 1 to be string, array given in %s on line 14
-NULL
-
-Warning: ReflectionClass::hasProperty() expects parameter 1 to be string, object given in %s on line 15
-NULL
index 91398867ecd8319cf5a24285b61ea33005256a2a..b0deab33dad214bdbc41d0aaafc2685a38f9822e 100644 (file)
@@ -41,12 +41,12 @@ foreach ($rcs as $childName => $child) {
 echo "\n\nTest bad arguments:\n";
 try {
        var_dump($rcs['A']->implementsInterface());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rcs['A']->implementsInterface('C', 'C'));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -144,12 +144,8 @@ Does I2 implement I2?
 
 
 Test bad arguments:
-
-Warning: ReflectionClass::implementsInterface() expects exactly 1 parameter, 0 given in %s on line 37
-NULL
-
-Warning: ReflectionClass::implementsInterface() expects exactly 1 parameter, 2 given in %s on line 42
-NULL
+ReflectionClass::implementsInterface() expects exactly 1 parameter, 0 given
+ReflectionClass::implementsInterface() expects exactly 1 parameter, 2 given
 Parameter one must either be a string or a ReflectionClass object
 Interface ThisClassDoesNotExist does not exist
 Parameter one must either be a string or a ReflectionClass object
index 10a86d9136ed9c35d970a976cdd59c4deafe12b0..af4ce9d2f4c17d185a6595e16af91480e546803c 100644 (file)
@@ -35,16 +35,6 @@ foreach($classes as $class) {
        var_dump($rc->isIterateable());
 }
 
-echo "\nTest invalid params:\n";
-$rc = new ReflectionClass('IteratorImpl');
-var_dump($rc->isIterateable(null));
-var_dump($rc->isIterateable(null, null));
-var_dump($rc->isIterateable(1));
-var_dump($rc->isIterateable(1.5));
-var_dump($rc->isIterateable(true));
-var_dump($rc->isIterateable('X'));
-var_dump($rc->isIterateable(null));
-
 echo "\nTest static invocation:\n";
 ReflectionClass::isIterateable();
 
@@ -61,32 +51,9 @@ Is ExtendsIteratorImpl iterable? bool(true)
 Is ExtendsIteratorAggregateImpl iterable? bool(true)
 Is A iterable? bool(false)
 
-Test invalid params:
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 1 given in %s on line 34
-NULL
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 2 given in %s on line 35
-NULL
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 1 given in %s on line 36
-NULL
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 1 given in %s on line 37
-NULL
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 1 given in %s on line 38
-NULL
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 1 given in %s on line 39
-NULL
-
-Warning: ReflectionClass::isIterateable() expects exactly 0 parameters, 1 given in %s on line 40
-NULL
-
 Test static invocation:
 
-Fatal error: Uncaught Error: Non-static method ReflectionClass::isIterateable() cannot be called statically in %s:43
+Fatal error: Uncaught Error: Non-static method ReflectionClass::isIterateable() cannot be called statically in %s:%d
 Stack trace:
 #0 {main}
-  thrown in %s on line 43
+  thrown in %s on line %d
index 368ea7d7ec7951e9c6f1ab6d3b5eb6ae94cd36dc..03d17e223efd7ae11c86dee25591692ab0648f92 100644 (file)
@@ -11,12 +11,12 @@ $rc = new ReflectionClass('A');
 echo "\n\nTest bad arguments:\n";
 try {
        var_dump($rc->isSubclassOf());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->isSubclassOf('C', 'C'));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -35,14 +35,10 @@ try {
        echo $e->getMessage() . "\n";
 }
 ?>
---EXPECTF--
+--EXPECT--
 Test bad arguments:
-
-Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given in %s on line 7
-NULL
-
-Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given in %s on line 12
-NULL
+ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given
+ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given
 Parameter one must either be a string or a ReflectionClass object
 Class ThisClassDoesNotExist does not exist
 Parameter one must either be a string or a ReflectionClass object
index fb472681ca4dac4ff734bcb08b1259d5aaf5f915..6d3cf3a44f262c8a601207919d16b2010855b65a 100644 (file)
@@ -12,17 +12,17 @@ class C {
 $rc = new ReflectionClass('C');
 try {
        var_dump($rc->setStaticPropertyValue("x", "default value", 'blah'));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->setStaticPropertyValue());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($rc->setStaticPropertyValue(null));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -37,23 +37,16 @@ try {
 }
 try {
        var_dump($rc->setStaticPropertyValue(array(1,2,3), 'blah'));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 
 
 ?>
---EXPECTF--
-Warning: ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 3 given in %s on line 8
-NULL
-
-Warning: ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 0 given in %s on line 13
-NULL
-
-Warning: ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 1 given in %s on line 18
-NULL
+--EXPECT--
+ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 3 given
+ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 0 given
+ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 1 given
 Class C does not have a property named 
 Class C does not have a property named 1.5
-
-Warning: ReflectionClass::setStaticPropertyValue() expects parameter 1 to be string, array given in %s on line 33
-NULL
+ReflectionClass::setStaticPropertyValue() expects parameter 1 to be string, array given
index 627dc96f32ee638bf2de10e98bc05b484a21f7cb..81f8116d77c3f0422ceb7e5077bcfa8795589f61 100644 (file)
@@ -17,79 +17,7 @@ try {
        echo "Ok - ".$re->getMessage().PHP_EOL;
 }
 
-class C {
-    public function f() {}
-}
-
-$rm = new ReflectionMethod('C', 'f');
-
-var_dump($rm->isFinal(1));
-var_dump($rm->isAbstract(1));
-var_dump($rm->isPrivate(1));
-var_dump($rm->isProtected(1));
-var_dump($rm->isPublic(1));
-var_dump($rm->isStatic(1));
-var_dump($rm->isConstructor(1));
-var_dump($rm->isDestructor(1));
-var_dump($rm->getModifiers(1));
-var_dump($rm->isInternal(1));
-var_dump($rm->isUserDefined(1));
-var_dump($rm->getFileName(1));
-var_dump($rm->getStartLine(1));
-var_dump($rm->getEndLine(1));
-var_dump($rm->getStaticVariables(1));
-var_dump($rm->getName(1));
-
-
 ?>
---EXPECTF--
+--EXPECT--
 Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given
 Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given
-
-Warning: ReflectionMethod::isFinal() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isAbstract() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isPrivate() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isProtected() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isPublic() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isStatic() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isConstructor() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::isDestructor() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::isInternal() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::isUserDefined() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::getStaticVariables() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionFunctionAbstract::getName() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index d3b9ca3c81b3bcff4fdd8feea888bfe8c1635253..d1e7ee68fbdd25a97864b06bacbd973d6fcd255e 100644 (file)
@@ -35,15 +35,7 @@ $staticmethod = $staticclass->getMethod( 'foo' );
 $object = new Example();
 $fakeobj = new StdClass();
 
-echo "\n-- Testing ReflectionMethod::getClosure() function with more than expected no. of arguments --\n";
-var_dump( $staticmethod->getClosure( 'foobar' ) );
-var_dump( $staticmethod->getClosure( 'foo', 'bar' ) );
-var_dump( $method->getClosure( $object, 'foobar' ) );
-
-echo "\n-- Testing ReflectionMethod::getClosure() function with Zero arguments --\n";
-$closure = $method->getClosure();
-
-echo "\n-- Testing ReflectionMethod::getClosure() function with Zero arguments --\n";
+echo "\n-- Testing ReflectionMethod::getClosure() function with invalid object --\n";
 try {
         var_dump( $method->getClosure( $fakeobj ) );
 } catch( Exception $e ) {
@@ -55,19 +47,6 @@ try {
 --EXPECTF--
 *** Testing ReflectionMethod::getClosure() : error conditions ***
 
--- Testing ReflectionMethod::getClosure() function with more than expected no. of arguments --
-object(Closure)#%d (0) {
-}
-object(Closure)#%d (0) {
-}
-
-Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Testing ReflectionMethod::getClosure() function with Zero arguments --
-
-Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 0 given in %s on line %d
-
--- Testing ReflectionMethod::getClosure() function with Zero arguments --
+-- Testing ReflectionMethod::getClosure() function with invalid object --
 string(72) "Given object is not an instance of the class this method was declared in"
 ===DONE===
index d1a19c7116191d36cfbca817685d9fb13dda51ca..d867993599bbc8f3528f1040f2067de53833296e 100644 (file)
@@ -75,13 +75,9 @@ reflectMethodModifiers("DerivedClass");
 reflectMethodModifiers("TestInterface");
 reflectMethodModifiers("AbstractClass");
 
-echo "Wrong number of params:\n";
-$a = new ReflectionMethod('TestClass::foo');
-$a->getModifiers(1);
-
 $a = new ReflectionMethod('ReflectionMethod::getModifiers');
 
-echo "\nReflectionMethod::getModifiers() modifiers:\n";
+echo "ReflectionMethod::getModifiers() modifiers:\n";
 printf("0x%08x\n", $a->getModifiers());
 
 ?>
@@ -234,9 +230,5 @@ Modifiers for method AbstractClass::foo():
 0x00000041
 
 
-Wrong number of params:
-
-Warning: ReflectionMethod::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
-
 ReflectionMethod::getModifiers() modifiers:
 0x00000001
index 0c87a66153394a4d90aa13f4f075e96f16a701ba..156cc9db52657f278ad8db97113a0731f9c1e36f 100644 (file)
@@ -37,10 +37,6 @@ $foo = new ReflectionMethod($testClassInstance, 'foo');
 $staticMethod = new ReflectionMethod('TestClass::staticMethod');
 $privateMethod = new ReflectionMethod("TestClass::privateMethod");
 
-echo "Wrong number of parameters:\n";
-var_dump($foo->invokeArgs());
-var_dump($foo->invokeArgs(true));
-
 echo "\nNon-instance:\n";
 try {
     var_dump($foo->invokeArgs(new stdClass(), array()));
@@ -48,14 +44,8 @@ try {
     var_dump($e->getMessage());
 }
 
-echo "\nNon-object:\n";
-var_dump($foo->invokeArgs(true, array()));
-
 echo "\nStatic method:\n";
 
-var_dump($staticMethod->invokeArgs());
-var_dump($staticMethod->invokeArgs(true));
-var_dump($staticMethod->invokeArgs(true, array()));
 var_dump($staticMethod->invokeArgs(null, array()));
 
 echo "\nPrivate method:\n";
@@ -80,32 +70,10 @@ try {
 
 ?>
 --EXPECTF--
-Wrong number of parameters:
-
-Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Non-instance:
 string(72) "Given object is not an instance of the class this method was declared in"
 
-Non-object:
-
-Warning: ReflectionMethod::invokeArgs() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
 Static method:
-
-Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::invokeArgs() expects parameter 1 to be object, bool given in %s on line %d
-NULL
 Called staticMethod()
 Exception: Using $this when not in object context
 NULL
index 0a2b15fb83936dcc8ea8aec31f8153e18946a708..6711feb4ac924b0bc6a27e8e4d04ee589c1943af 100644 (file)
@@ -60,8 +60,16 @@ var_dump($methodWithArgs->invoke($testClassInstance, 1, "arg2", 3));
 
 echo "\nStatic method:\n";
 
-var_dump($staticMethod->invoke());
-var_dump($staticMethod->invoke(true));
+try {
+    var_dump($staticMethod->invoke());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump($staticMethod->invoke(true));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($staticMethod->invoke(new stdClass()));
 
 echo "\nMethod that throws an exception:\n";
@@ -94,12 +102,8 @@ Called methodWithArgs(1, arg2)
 NULL
 
 Static method:
-
-Warning: ReflectionMethod::invoke() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: ReflectionMethod::invoke() expects parameter 1 to be object, bool given in %s on line %d
-NULL
+ReflectionMethod::invoke() expects at least 1 parameter, 0 given
+ReflectionMethod::invoke() expects parameter 1 to be object, bool given
 Called staticMethod()
 Exception: Using $this when not in object context
 NULL
index 411299f0c75f9029f2f560d5b5f8f901adcdc2db..4fa86eb363948fdb7f4ae97e8ea479690d911246 100644 (file)
@@ -30,7 +30,7 @@ $testClassInstance->prop = "Hello";
 echo "invoke() on a non-object:\n";
 try {
     var_dump($foo->invoke(true));
-} catch (ReflectionException $e) {
+} catch (TypeError $e) {
     var_dump($e->getMessage());
 }
 
@@ -59,9 +59,7 @@ try {
 ?>
 --EXPECTF--
 invoke() on a non-object:
-
-Warning: ReflectionMethod::invoke() expects parameter 1 to be object, bool given in %s%eReflectionMethod_invoke_error1.php on line %d
-NULL
+string(71) "ReflectionMethod::invoke() expects parameter 1 to be object, bool given"
 
 invoke() on a non-instance:
 string(72) "Given object is not an instance of the class this method was declared in"
index 68cea6a1cde1a7f7b5dd986108bad90cc545e571..1885695cb19114b60526344c24407906c6e26309 100644 (file)
@@ -2,8 +2,6 @@
 ReflectionObject::getName() - basic function test
 --FILE--
 <?php
-$r0 = new ReflectionObject();
-var_dump($r0->getName());
 
 $r1 = new ReflectionObject(new stdClass);
 var_dump($r1->getName());
@@ -18,8 +16,6 @@ var_dump($r3->getName());
 
 ?>
 --EXPECTF--
-Warning: ReflectionObject::__construct() expects exactly 1 parameter, 0 given in %s on line 2
-string(0) ""
 string(8) "stdClass"
 string(1) "C"
 string(16) "ReflectionObject"
index f05197ebafafc4bc1ccec14d6e21fe6d08bb7ca6..a2484f9dc237cbbaefea5be0ac71bc8a381218b1 100644 (file)
@@ -11,12 +11,12 @@ $ro = new ReflectionObject(new C);
 echo "\n\nTest bad arguments:\n";
 try {
        var_dump($ro->isSubclassOf());
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
        var_dump($ro->isSubclassOf('C', 'C'));
-} catch (Exception $e) {
+} catch (TypeError $e) {
        echo $e->getMessage() . "\n";
 }
 try {
@@ -35,14 +35,10 @@ try {
        echo $e->getMessage() . "\n";
 }
 ?>
---EXPECTF--
+--EXPECT--
 Test bad arguments:
-
-Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given in %s on line 7
-NULL
-
-Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given in %s on line 12
-NULL
+ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given
+ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given
 Parameter one must either be a string or a ReflectionClass object
 Class ThisClassDoesNotExist does not exist
 Parameter one must either be a string or a ReflectionClass object
index 11994ed7057cf58f9f5700c79906cdcf6b34f82f..582bcffe65f13948f7fa83abf65eb5fe1e8c81c7 100644 (file)
@@ -5,20 +5,12 @@ ReflectionObject::isSubclassOf() - invalid params
 class A {}
 $ro = new ReflectionObject(new A);
 
-var_dump($ro->isSubclassOf());
-var_dump($ro->isSubclassOf('A',5));
 var_dump($ro->isSubclassOf('X'));
 
 ?>
 --EXPECTF--
-Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given in %s on line 5
-NULL
-
-Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given in %s on line 6
-NULL
-
-Fatal error: Uncaught ReflectionException: Class X does not exist in %s:7
+Fatal error: Uncaught ReflectionException: Class X does not exist in %s:%d
 Stack trace:
-#0 %s(7): ReflectionClass->isSubclassOf('X')
+#0 %s(%d): ReflectionClass->isSubclassOf('X')
 #1 {main}
-  thrown in %s on line 7
+  thrown in %s on line %d
index c8a2f11ee1d3cf67913f5b1425c9e9d50164fb08..a7fdff5000f3c2173607d9d755d20193900fbdb1 100644 (file)
@@ -24,39 +24,8 @@ try {
        echo "Ok - ".$re->getMessage().PHP_EOL;
 }
 
-
-$rp = new ReflectionProperty('C', 'p');
-var_dump($rp->getName(1));
-var_dump($rp->isPrivate(1));
-var_dump($rp->isProtected(1));
-var_dump($rp->isPublic(1));
-var_dump($rp->isStatic(1));
-var_dump($rp->getModifiers(1));
-var_dump($rp->isDefault(1));
-
 ?>
---EXPECTF--
+--EXPECT--
 Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 0 given
 Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 1 given
 Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 3 given
-
-Warning: ReflectionProperty::getName() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::isPrivate() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::isProtected() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::isPublic() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::isStatic() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::isDefault() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index ab09ed01f0d4de869dd179308909891478fe4f7b..5acf9de6c3d1d948abb5a2ffa87a90fdd11ebfd1 100644 (file)
@@ -32,10 +32,6 @@ catch(Exception $e) {
     echo $e->getMessage();
 }
 
-echo "\n\nIncorrect number of args:\n";
-ReflectionProperty::export();
-ReflectionProperty::export('TestClass', "nonExistentProperty", true, false);
-
 ?>
 --EXPECTF--
 Non-existent class:
@@ -46,9 +42,3 @@ The parameter class is expected to be either a string or an object
 
 Non-existent property:
 Property TestClass::$nonExistentProperty does not exist
-
-Incorrect number of args:
-
-Warning: ReflectionProperty::export() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: ReflectionProperty::export() expects at most 3 parameters, 4 given in %s on line %d
index c7c9366471c467f7ba76f3cec836a3b7d812b603..7ee787a3483020c488e17e53f0daea7d6ecfd8ea 100644 (file)
@@ -13,15 +13,9 @@ class B extends A {
 $propInfo = new ReflectionProperty('B', 'prop');
 var_dump($propInfo->getDeclaringClass());
 
-echo "Wrong number of params:\n";
-$propInfo->getDeclaringClass(1);
-
 ?>
 --EXPECTF--
 object(ReflectionClass)#%d (1) {
   ["name"]=>
   string(1) "A"
 }
-Wrong number of params:
-
-Warning: ReflectionProperty::getDeclaringClass() expects exactly 0 parameters, 1 given in %s on line %d
index 3bca85e4b63fd24ff7fc234c01961c5dfe58208f..52e9d1d2ef79b4cd9a16d698fd48318f55f4da14 100644 (file)
@@ -18,15 +18,6 @@ $instance = new TestClass();
 $invalidInstance = new AnotherClass();
 $propInfo = new ReflectionProperty('TestClass', 'pub2');
 
-echo "Too few args:\n";
-var_dump($propInfo->getValue());
-
-echo "\nToo many args:\n";
-var_dump($propInfo->getValue($instance, true));
-
-echo "\nWrong type of arg:\n";
-var_dump($propInfo->getValue(true));
-
 echo "\nInstance without property:\n";
 $propInfo = new ReflectionProperty('TestClass', 'stat');
 
@@ -51,21 +42,6 @@ var_dump($propInfo->getValue($invalidInstance));
 
 ?>
 --EXPECTF--
-Too few args:
-
-Warning: ReflectionProperty::getValue() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Too many args:
-
-Warning: ReflectionProperty::getValue() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Wrong type of arg:
-
-Warning: ReflectionProperty::getValue() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
 Instance without property:
 
 Static property / too many args:
@@ -79,8 +55,8 @@ Cannot access non-public member TestClass::$prot
 
 Invalid instance:
 
-Fatal error: Uncaught ReflectionException: Given object is not an instance of the class this property was declared in in %s:47
+Fatal error: Uncaught ReflectionException: Given object is not an instance of the class this property was declared in in %s:%d
 Stack trace:
-#0 %s(47): ReflectionProperty->getValue(Object(AnotherClass))
+#0 %s(%d): ReflectionProperty->getValue(Object(AnotherClass))
 #1 {main}
-  thrown in %s on line 47
+  thrown in %s on line %d
index 2aa630d9d039fda147e856a19bc14e76b001dbc2..14726151781aaed57bf907a37f6d37870997f09e 100644 (file)
@@ -24,10 +24,6 @@ reflectProperty("TestClass", "stat");
 reflectProperty("TestClass", "prot");
 reflectProperty("TestClass", "priv");
 
-echo "Wrong number of params:\n";
-$propInfo = new ReflectionProperty('TestClass', 'pub');
-$propInfo->isDefault(1);
-
 ?>
 --EXPECTF--
 **********************************
@@ -58,6 +54,3 @@ isDefault():
 bool(true)
 
 **********************************
-Wrong number of params:
-
-Warning: ReflectionProperty::isDefault() expects exactly 0 parameters, 1 given in %s on line %d
index 0bf223daa7f9d3822938b51d18a374a75a317197..f58590b3eab44ff9e30605df5895416fe2ce5781 100644 (file)
@@ -18,30 +18,6 @@ $instance = new TestClass();
 $instanceWithNoProperties = new AnotherClass();
 $propInfo = new ReflectionProperty('TestClass', 'pub2');
 
-echo "Too few args:\n";
-var_dump($propInfo->setValue());
-var_dump($propInfo->setValue($instance));
-
-echo "\nToo many args:\n";
-var_dump($propInfo->setValue($instance, "NewValue", true));
-
-echo "\nWrong type of arg:\n";
-var_dump($propInfo->setValue(true, "NewValue"));
-$propInfo = new ReflectionProperty('TestClass', 'stat');
-
-echo "\nStatic property / too many args:\n";
-var_dump($propInfo->setValue($instance, "NewValue", true));
-
-echo "\nStatic property / too few args:\n";
-var_dump($propInfo->setValue("A new value"));
-var_dump(TestClass::$stat);
-var_dump($propInfo->setValue());
-var_dump(TestClass::$stat);
-
-echo "\nStatic property / wrong type of arg:\n";
-var_dump($propInfo->setValue(true, "Another new value"));
-var_dump(TestClass::$stat);
-
 echo "\nProtected property:\n";
 try {
     $propInfo = new ReflectionProperty('TestClass', 'prot');
@@ -57,41 +33,6 @@ var_dump($propInfo->setValue($instanceWithNoProperties, "NewValue"));
 var_dump($instanceWithNoProperties->pub2);
 ?>
 --EXPECTF--
-Too few args:
-
-Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Too many args:
-
-Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Wrong type of arg:
-
-Warning: ReflectionProperty::setValue() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
-Static property / too many args:
-
-Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Static property / too few args:
-NULL
-string(11) "A new value"
-
-Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-string(11) "A new value"
-
-Static property / wrong type of arg:
-NULL
-string(17) "Another new value"
-
 Protected property:
 Cannot access non-public member TestClass::$prot
 
index 8c0052fd851f1f5b06f8681f928b5935ac0d998b..e6eab834157e53971238af3373aaa11cb52db39d 100644 (file)
@@ -11,12 +11,17 @@ class MyClass
 }
 
 $r = new ReflectionMethod('MyClass', 'doSomething');
-$r->invoke('WTF?');
-$r->invokeArgs('WTF?', array());
+try {
+    $r->invoke('WTF?');
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $r->invokeArgs('WTF?', array());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
-===DONE===
---EXPECTF--
-Warning: ReflectionMethod::invoke() expects parameter 1 to be object, string given in %s%erequest38992.php on line %d
-
-Warning: ReflectionMethod::invokeArgs() expects parameter 1 to be object, string given in %s%erequest38992.php on line %d
-===DONE===
+--EXPECT--
+ReflectionMethod::invoke() expects parameter 1 to be object, string given
+ReflectionMethod::invokeArgs() expects parameter 1 to be object, string given
index 42b2cb069469de1606d2e339932e2cce46516a9f..284649e277760d0a2c4e6dfc884441ac95c29b6f 100644 (file)
@@ -75,9 +75,6 @@ $inputs = array(
 
        // Unset data
 /*23*/ @$unset_var,
-
-       // Resource variable
-/*24*/ $fp
 );
 
 
@@ -163,9 +160,4 @@ string(12) "Hello World!"
 
 -- Iteration 23 --
 string(0) ""
-
--- Iteration 24 --
-
-Warning: session_cache_limiter() expects parameter 1 to be string, resource given in %s on line %d
-NULL
 Done
index b7bcc3fca65a08ec3a0bef7b06957b3aea0232a3..f0a9139ade830ba9b6d2212522b22d6939bd4a66 100644 (file)
@@ -38,25 +38,23 @@ class MySession extends SessionHandler {
 $oldHandler = ini_get('session.save_handler');
 $handler = new MySession;
 session_set_save_handler($handler);
-var_dump(session_start());
+try {
+    var_dump(session_start());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 var_dump(session_id(), $oldHandler, ini_get('session.save_handler'), $handler->i, $_SESSION);
 --EXPECTF--
 *** Testing session_set_save_handler() : incorrect arguments for existing handler open ***
 Open 
 
-Warning: SessionHandler::open() expects exactly 2 parameters, 0 given in %s on line %d
-Read %s
-
-Warning: SessionHandler::read(): Parent session handler is not open in %s on line %d
+Warning: session_start(): Failed to initialize storage module: user (path: ) in %s on line %d
+SessionHandler::open() expects exactly 2 parameters, 0 given
 
-Warning: SessionHandler::close(): Parent session handler is not open in %s on line %d
-
-Warning: session_start(): Failed to read session data: user (%s) in %s on line %d
-bool(false)
+Notice: Undefined variable: _SESSION in %s on line %d
 string(0) ""
 string(5) "files"
 string(4) "user"
-int(2)
-array(0) {
-}
+int(1)
+NULL
index 28e49c9f98d53e30dda33913157a53eaf507b300..79c732f30ce42bf849f1985d5ff0bdf5779540db 100644 (file)
@@ -41,6 +41,7 @@ session_set_save_handler($handler);
 session_start();
 
 var_dump(session_id(), $oldHandler, ini_get('session.save_handler'), $handler->i, $_SESSION);
+?>
 --EXPECTF--
 *** Testing session_set_save_handler() : incorrect arguments for existing handler close ***
 Open 
@@ -52,4 +53,10 @@ int(2)
 array(0) {
 }
 
-Warning: SessionHandler::close() expects exactly 0 parameters, 1 given in %s on line %d
+Fatal error: Uncaught ArgumentCountError: SessionHandler::close() expects exactly 0 parameters, 1 given in %s:%d
+Stack trace:
+#0 %s(%d): SessionHandler->close(false)
+#1 [internal function]: MySession->close()
+#2 [internal function]: session_write_close()
+#3 {main}
+  thrown in %s on line %d
index bc9f801a5ebe7c8ea31317b207d566bed4c067a4..cf01d8badb2697046edb2465c40ab61bd52e6b43 100644 (file)
@@ -76,14 +76,15 @@ $ret = session_set_save_handler(array($handler, 'open'), array($handler, 'close'
        array($handler, 'read'), 'good_write', array($handler, 'destroy'), array($handler, 'gc'));
 
 var_dump($ret);
-$ret = session_set_save_handler($handler);
-var_dump($ret);
+try {
+    $ret = session_set_save_handler($handler);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 session_start();
 --EXPECTF--
 *** Testing session_set_save_handler() function: interface wrong ***
 bool(true)
-
-Warning: session_set_save_handler() expects parameter 1 to be SessionHandlerInterface, object given in %s
-bool(false)
+session_set_save_handler() expects parameter 1 to be SessionHandlerInterface, object given
 good handler writing
index 3206f90776b15c86a614f5596752721049688d2f..a06f454445ed0cebd04cc028662605309d548b5e 100644 (file)
@@ -18,9 +18,6 @@ edgarsandi - <edgar.r.sandi@gmail.com>
        };
 
 echo PHP_EOL, '## shmop_open function tests ##';
-       // warning outputs: 4 parameters expected
-       var_dump($shm_id = shmop_open());
-
        // warning outputs: invalid flag when the flags length != 1
        var_dump(shmop_open($hex_shm_id(), '', 0644, 1024));
 
@@ -34,9 +31,6 @@ echo PHP_EOL, '## shmop_open function tests ##';
        var_dump(shmop_open($hex_shm_id(), "c", 0666, 0));
 
 echo PHP_EOL, '## shmop_read function tests ##';
-       // warning outputs: 3 parameters expected
-       var_dump(shmop_read());
-
        // warning outputs: start is out of range
        $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024);
        var_dump(shmop_read($shm_id, -10, 0));
@@ -48,31 +42,13 @@ echo PHP_EOL, '## shmop_read function tests ##';
        shmop_delete($shm_id);
 
 echo PHP_EOL, '## shmop_write function tests ##';
-       // warning outputs: 3 parameters expected
-       var_dump(shmop_write());
-
        // warning outputs: offset out of range
        $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024);
        var_dump(shmop_write($shm_id, 'text to try write', -10));
        shmop_delete($shm_id);
-
-echo PHP_EOL, '## shmop_size function tests ##';
-       // warning outputs: 1 parameter expected
-       var_dump(shmop_size());
-
-echo PHP_EOL, '## shmop_delete function tests ##';
-       // warning outputs: 1 parameter expected
-       var_dump(shmop_delete());
-
-echo PHP_EOL, '## shmop_close function tests ##';
-       // warning outputs: 1 parameter expected
-       var_dump(shmop_close());
 ?>
 --EXPECTF--
 ## shmop_open function tests ##
-Warning: shmop_open() expects exactly 4 parameters, 0 given in %s on line %d
-NULL
-
 Warning: shmop_open():  is not a valid flag in %s on line %d
 bool(false)
 
@@ -86,9 +62,6 @@ Warning: shmop_open(): Shared memory segment size must be greater than zero in %
 bool(false)
 
 ## shmop_read function tests ##
-Warning: shmop_read() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
 Warning: shmop_read(): start is out of range in %s on line %d
 bool(false)
 
@@ -96,20 +69,5 @@ Warning: shmop_read(): count is out of range in %s on line %d
 bool(false)
 
 ## shmop_write function tests ##
-Warning: shmop_write() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
 Warning: shmop_write(): offset out of range in %s on line %d
 bool(false)
-
-## shmop_size function tests ##
-Warning: shmop_size() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-## shmop_delete function tests ##
-Warning: shmop_delete() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-## shmop_close function tests ##
-Warning: shmop_close() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt
deleted file mode 100644 (file)
index 8682cf8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-Testing xpath() with invalid XML
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
-?>
---FILE--
-<?php
-$xml = simplexml_load_string("XXXXXXX^",$x,0x6000000000000001);
-var_dump($xml->xpath("BBBB"));
-?>
---EXPECTF--
-Notice: Undefined variable: x in %s on line %d
-
-Warning: simplexml_load_string() expects parameter 3 to be int, float given in %s on line %d
-
-Fatal error: Uncaught Error: Call to a member function xpath() on null in %s:%d
-Stack trace:
-#0 {main}
-  thrown in %s on line %d
index 0af93deaf3219b2d3da0806c2e87f8d273233cc5..d20fbd5aca76db2bc20e06c945acc264759bddf8 100644 (file)
@@ -31,7 +31,5 @@ try {
 ===DONE===
 --EXPECT--
 Error: simplexml_load_string() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given
-Error: Argument 1 passed to Reflection::export() must implement interface Reflector, null given
 Error: simplexml_load_file() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given
-Error: Argument 1 passed to Reflection::export() must implement interface Reflector, null given
 ===DONE===
index 413529bcaac091cd3370d45cfd1a344eb848d7c2..e6f5e7582ead9d9b0ac86633fa9fb44d35dff68d 100644 (file)
@@ -12,18 +12,17 @@ try
     $options = NULL;
     $sClient = new SoapClient("test.wsdl", $options);
 } 
-catch(SoapFault $e)
+catch(TypeError $e)
 {
     var_dump($e);
 }
 
 ?>
 --EXPECTF--
-Warning: SoapClient::__construct() expects parameter 2 to be array, null given in %sbug77088.php on line %d
-object(SoapFault)#%d (%d) {
+object(TypeError)#%d (%d) {
   ["message":protected]=>
-  string(%d) "SoapClient::__construct(): Invalid parameters"
-  ["string":"Exception":private]=>
+  string(%d) "SoapClient::__construct() expects parameter 2 to be array, null given"
+  ["string":"Error":private]=>
   string(0) ""
   ["code":protected]=>
   int(0)
@@ -31,7 +30,7 @@ object(SoapFault)#%d (%d) {
   string(%d) "%sbug77088.php"
   ["line":protected]=>
   int(6)
-  ["trace":"Exception":private]=>
+  ["trace":"Error":private]=>
   array(1) {
     [0]=>
     array(6) {
@@ -54,12 +53,6 @@ object(SoapFault)#%d (%d) {
       }
     }
   }
-  ["previous":"Exception":private]=>
+  ["previous":"Error":private]=>
   NULL
-  ["faultstring"]=>
-  string(%d) "SoapClient::__construct(): Invalid parameters"
-  ["faultcode"]=>
-  string(6) "Client"
-  ["faultcodens"]=>
-  string(41) "http://schemas.xmlsoap.org/soap/envelope/"
 }
index 4889b10d8ed829d7c11fb306139e70fe1d29285e..152781a4ecf97500b45a20d79107be4f76f781ee 100644 (file)
@@ -39,7 +39,6 @@ $server->handle($HTTP_RAW_POST_DATA);
 echo "ok\n";
 ?>
 --EXPECTF--
-PHP Warning:  fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d
-PHP Fatal error:  Hello in %sbug31422.php on line %d
 <?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>fopen() expects at least 2 parameters, 0 given</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
+ok
index 94c38de1cb923ef590b003f384ca78f70f36f908..f1fdf55a81e38a9a3ad2bb549bbba1cf45de1433 100644 (file)
@@ -14,8 +14,11 @@ fa@php.net
     $rand = rand(1,999);
     $s_c = socket_create_listen(31330+$rand);
     // wrong parameter count
-    $s_w = socket_connect();
-    $s_w = socket_connect($s_c);
+    try {
+        $s_w = socket_connect($s_c);
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
     $s_w = socket_connect($s_c, '0.0.0.0');
     $s_w = socket_connect($s_c, '0.0.0.0', 31330+$rand);
 
@@ -23,9 +26,7 @@ fa@php.net
 
 ?>
 --EXPECTF--
-Warning: socket_connect() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: socket_connect() expects at least 2 parameters, 1 given in %s on line %d
+socket_connect() expects at least 2 parameters, 1 given
 
 Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %d
 
index b41e2caefca2a8bb202cdd0d48a5d330418c3f7e..2dfec4fbf79680b76ba0c76886472ddd15400b2c 100644 (file)
@@ -18,7 +18,6 @@ fa@php.net
     // default invocation
     $s_c_l2 = socket_create_listen(31330+$rand);
     var_dump($s_c_l2);
-    socket_close($s_c_l2);
     socket_close($s_c_l);
 ?>
 --EXPECTF--
@@ -26,5 +25,3 @@ resource(%i) of type (Socket)
 
 Warning: socket_create_listen(): unable to bind to given address [%i]: %a in %s on line %d
 bool(false)
-
-Warning: socket_close() expects parameter 1 to be resource, bool given in %s on line %d
index 554819ac991ec2d05e9e831007c70f483ba9d300..5cf054458a9235b67aafa7ec5ae08c638bd34bf0 100644 (file)
@@ -10,10 +10,6 @@ if (!extension_loaded('sockets')) {
 }
 --FILE--
 <?php
-var_dump(socket_create_pair(AF_INET, null, null));
-
-$domain = 'unknown';
-var_dump(socket_create_pair($domain, SOCK_STREAM, 0, $sockets));
 
 var_dump(socket_create_pair(AF_INET, null, null, $sockets));
 
@@ -21,11 +17,6 @@ var_dump(socket_create_pair(31337, null, null, $sockets));
 
 var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
 --EXPECTF--
-Warning: socket_create_pair() expects exactly 4 parameters, 3 given in %s on line %d
-NULL
-
-Warning: socket_create_pair() expects parameter 1 to be int, string given in %s on line %d
-NULL
 bool(true)
 
 Warning: socket_create_pair(): invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d
index 856d2cdc52024bf84181dd43c5ed8490b3260001..41154620ad07fa5477a825905fb9cd41589beb87 100644 (file)
@@ -10,23 +10,15 @@ if (!extension_loaded('sockets')) {
 }
 --FILE--
 <?php
-var_dump(socket_create_pair(AF_INET, null, null));
-
-$domain = 'unknown';
-var_dump(socket_create_pair($domain, SOCK_STREAM, 0, $sockets));
 
 var_dump(socket_create_pair(AF_INET, null, null, $sockets));
 
 var_dump(socket_create_pair(31337, null, null, $sockets));
 
 var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
---EXPECTF--
-Warning: socket_create_pair() expects exactly 4 parameters, 3 given in %s on line %d
-NULL
-
-Warning: socket_create_pair() expects parameter 1 to be int, string given in %s on line %d
-NULL
 
+?>
+--EXPECTF--
 Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d
 bool(false)
 
index d3db5e36c8a0ce86486471a574a34737c1fb51d6..fb89bd28d723974ac14be5dd2e48433eabad13b8 100644 (file)
@@ -8,10 +8,6 @@ if (!extension_loaded('sockets')) {
 --FILE--
 <?php
 
-var_dump(socket_export_stream());
-var_dump(socket_export_stream(1, 2));
-var_dump(socket_export_stream(1));
-var_dump(socket_export_stream(new stdclass));
 var_dump(socket_export_stream(fopen(__FILE__, "rb")));
 var_dump(socket_export_stream(stream_socket_server("udp://127.0.0.1:58392", $errno, $errstr, STREAM_SERVER_BIND)));
 $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
@@ -21,19 +17,8 @@ var_dump(socket_export_stream($s));
 
 
 echo "Done.";
+?>
 --EXPECTF--
-Warning: socket_export_stream() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: socket_export_stream() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: socket_export_stream() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Warning: socket_export_stream() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
 Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d
 bool(false)
 
index e1fada608e51ce55cf67115d76ffb6fdd632ef50..8464b460399e1e2d9c74a98ed83c0541514f2439 100644 (file)
@@ -8,10 +8,6 @@ if (!extension_loaded('sockets')) {
 --FILE--
 <?php
 
-var_dump(socket_import_stream());
-var_dump(socket_import_stream(1, 2));
-var_dump(socket_import_stream(1));
-var_dump(socket_import_stream(new stdclass));
 var_dump(socket_import_stream(fopen(__FILE__, "rb")));
 var_dump(socket_import_stream(socket_create(AF_INET, SOCK_DGRAM, SOL_UDP)));
 $s = stream_socket_server("udp://127.0.0.1:58392", $errno, $errstr, STREAM_SERVER_BIND);
@@ -19,21 +15,9 @@ var_dump($s);
 var_dump(fclose($s));
 var_dump(socket_import_stream($s));
 
-
 echo "Done.";
+?>
 --EXPECTF--
-Warning: socket_import_stream() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: socket_import_stream() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: socket_import_stream() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Warning: socket_import_stream() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
 Warning: socket_import_stream(): cannot represent a stream of type STDIO as a Socket Descriptor in %s on line %d
 bool(false)
 
index 41d7ac1f108b9003ffda31dba56670324d348299..b5715a5ff55e754596897ea2c245cb322205da22 100644 (file)
@@ -10,13 +10,9 @@ if (!extension_loaded('sockets')) {
 }
 --FILE--
 <?php
-var_dump(socket_listen(null));
 $socket = socket_create(AF_UNIX, SOCK_STREAM, 0);
 var_dump(socket_listen($socket));
 --EXPECTF--
-Warning: socket_listen() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
 Warning: socket_listen(): unable to listen on socket [%d]: Invalid argument in %s on line %d
 bool(false)
 --CREDITS--
index acf1d2f35d38880ae6c161231049afae31fe4b77..4d462ce3a7e5c9cebf4d80946d2e39efa211cfcd 100644 (file)
@@ -12,16 +12,9 @@ fa@php.net
 --FILE--
 <?php
     $rand = rand(1,999);
-    // wrong parameter count
-    $s_c = socket_read();
-    $s_c = socket_read(14);
     $s_c_l = socket_create_listen(31330+$rand);
     $s_c = socket_read($s_c_l, 25);
     socket_close($s_c_l);
 ?>
 --EXPECTF--
-Warning: socket_read() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: socket_read() expects at least 2 parameters, 1 given in %s on line %d
-
 Warning: socket_read(): unable to read from socket [%i]: %a in %s on line %d
index c149973e703e193ffad4151b086cb9b0c28c3ddf..a7c423df1bf99f8a1f56d1abcc3ea2138cde788c 100644 (file)
@@ -12,12 +12,9 @@ $write   = null;
 $except  = null;
 $time    = 0;
 var_dump(socket_select($sockets, $write, $except, $time));
-socket_select($sockets, $write, $except);
 --EXPECTF--
 Warning: socket_select(): no resource arrays were passed to select in %s on line %d
 bool(false)
-
-Warning: socket_select() expects at least 4 parameters, 3 given in %s on line %d
 --CREDITS--
 Till Klampaeckel, till@php.net
 Berlin TestFest 2009
index 689421011eaf10a929e0e1efb0c50fc056d7e098..0720b319b7f006a824482ccaad5afcdb6957ae78 100644 (file)
@@ -16,7 +16,6 @@ if (!extension_loaded('sockets')) {
     }
 
     $address = '127.0.0.1';
-    socket_sendto($socket, '', 1, 0, $address); // cause warning
     if (!socket_bind($socket, $address, 1223)) {
         die("Unable to bind to $address:1223");
     }
@@ -34,8 +33,6 @@ if (!extension_loaded('sockets')) {
 
     $from = "";
     $port = 0;
-    socket_recvfrom($socket, $buf, 12, 0); // cause warning
-    socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning
     $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port);
     if ($bytes_received == -1) {
         die('An error occurred while receiving from the socket');
@@ -45,13 +42,8 @@ if (!extension_loaded('sockets')) {
     echo "Received $buf from remote address $from and remote port $port" . PHP_EOL;
 
     socket_close($socket);
---EXPECTF--
-Warning: Wrong parameter count for socket_sendto() in %s on line %d
+--EXPECT--
 bool(false)
-
-Warning: socket_recvfrom() expects at least 5 parameters, 4 given in %s on line %d
-
-Warning: Wrong parameter count for socket_recvfrom() in %s on line %d
 Received Ping! from remote address 127.0.0.1 and remote port 1223
 --CREDITS--
 Falko Menge <mail at falko-menge dot de>
index 8754028f84b43d6da7cf4cb235689a700410531e..fbc4da3861cc5e4cacff971138419accef8a9dbc 100644 (file)
@@ -20,7 +20,6 @@ require 'ipv6_skipif.inc';
     }
     socket_recvfrom($socket, $buf, 12, 0, $from, $port); // cause warning
     $address = '::1';
-    socket_sendto($socket, '', 1, 0, $address); // cause warning
     if (!socket_bind($socket, $address, 1223)) {
         die("Unable to bind to $address:1223");
     }
@@ -36,8 +35,6 @@ require 'ipv6_skipif.inc';
 
     $from = "";
     $port = 0;
-    socket_recvfrom($socket, $buf, 12, 0); // cause warning
-    socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning
     $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port);
     if ($bytes_received == -1) {
         die('An error occurred while receiving from the socket');
@@ -50,12 +47,6 @@ require 'ipv6_skipif.inc';
 --EXPECTF--
 Warning: socket_recvfrom(): unable to recvfrom [10022]: %s
  in %s on line %d
-
-Warning: Wrong parameter count for socket_sendto() in %s on line %d
-
-Warning: socket_recvfrom() expects at least 5 parameters, 4 given in %s on line %d
-
-Warning: Wrong parameter count for socket_recvfrom() in %s on line %d
 Received Ping! from remote address ::1 and remote port 1223
 --CREDITS--
 Falko Menge <mail at falko-menge dot de>
index bd0790427773bd83bfe24cee7e2477aedc0fdf02..ef44109b81aaef2441fcc9f3e26eff5c46c1bd37 100644 (file)
@@ -20,7 +20,6 @@ require 'ipv6_skipif.inc';
     }
     var_dump(socket_recvfrom($socket, $buf, 12, 0, $from, $port)); // false (EAGAIN, no warning)
     $address = '::1';
-    socket_sendto($socket, '', 1, 0, $address); // cause warning
     if (!socket_bind($socket, $address, 1223)) {
         die("Unable to bind to $address:1223");
     }
@@ -36,8 +35,6 @@ require 'ipv6_skipif.inc';
 
     $from = "";
     $port = 0;
-    socket_recvfrom($socket, $buf, 12, 0); // cause warning
-    socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning
     $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port);
     if ($bytes_received == -1) {
         die('An error occurred while receiving from the socket');
@@ -47,14 +44,8 @@ require 'ipv6_skipif.inc';
     echo "Received $buf from remote address $from and remote port $port" . PHP_EOL;
 
     socket_close($socket);
---EXPECTF--
+--EXPECT--
 bool(false)
-
-Warning: Wrong parameter count for socket_sendto() in %s on line %d
-
-Warning: socket_recvfrom() expects at least 5 parameters, 4 given in %s on line %d
-
-Warning: Wrong parameter count for socket_recvfrom() in %s on line %d
 Received Ping! from remote address ::1 and remote port 1223
 --CREDITS--
 Falko Menge <mail at falko-menge dot de>
index e25bf4df1a54775dbf5865b9c6bcf30fab08b13c..600cbea59564807504479d6559890d0505da0337 100644 (file)
@@ -26,7 +26,6 @@ if (!extension_loaded('sockets')) {
 
     $msg = "Ping!";
     $len = strlen($msg);
-    $bytes_sent = socket_sendto($socket, $msg, $len, 0); // cause warning
     $bytes_sent = socket_sendto($socket, $msg, $len, 0, $address);
     if ($bytes_sent == -1) {
                @unlink($address);
@@ -54,8 +53,6 @@ if (!extension_loaded('sockets')) {
 --EXPECTF--
 Warning: socket_create(): Unable to create socket [%d]: Protocol not supported in %s on line %d
 bool(false)
-
-Warning: socket_sendto() expects at least 5 parameters, 4 given in %s on line %d
 bool(false)
 Received Ping!
 --CREDITS--
index aef56e5a84be8f3bdd7621fa549a4734d671ebd4..4f1237e8908c9e7cf2d5729b3ac98d9685022c0a 100644 (file)
@@ -14,13 +14,11 @@ fa@php.net
 ?>
 --FILE--
 <?php
-    $s_s = socket_strerror();
     for ($i=0;$i<=132;$i++) {
         var_dump(socket_strerror($i));
     }
 ?>
 --EXPECTF--
-Warning: socket_strerror() expects exactly 1 parameter, 0 given in %s on line %d
 string(7) "Success"
 string(23) "Operation not permitted"
 string(25) "No such file or directory"
index 7443998013ce55e95e699791ab3c2892d720257c..db0186f21817ed5aaf00aace8bf82113347a1868 100644 (file)
@@ -7,7 +7,7 @@ $info = new SplFileInfo(__FILE__);
 
 try {
     $info->setFileClass('stdClass');
-} catch (UnexpectedValueException $e) {
+} catch (TypeError $e) {
     echo $e->getMessage(), "\n";
 }
 
index a280a6e1474f26ed5ff3f25a2088cec02aa8395e..9a2e71defe52f45fec4c80fc611b5eb96701774b 100644 (file)
@@ -7,7 +7,7 @@ $info = new SplFileInfo(__FILE__);
 
 try {
     $info->setInfoClass('stdClass');
-} catch (UnexpectedValueException $e) {
+} catch (TypeError $e) {
     echo $e->getMessage(), "\n";
 }
 
index 4de5bcdd4d2c7464761d7b58f05d6913ded19d46..8741e3b7887d5462c024fcb0645f581423ba7438 100644 (file)
@@ -2,9 +2,7 @@
 SplFileObject::seek function - test parameters
 --FILE--
 <?php
-$obj = New SplFileObject(__FILE__);
-$obj->seek(1,2);
-$obj->seek();
+$obj = new SplFileObject(__FILE__);
 try {
        $obj->seek(-1);
 } catch (LogicException $e) {
@@ -12,7 +10,4 @@ try {
 }
 ?>
 --EXPECTF--
-Warning: SplFileObject::seek() expects exactly 1 parameter, 2 given in %s
-
-Warning: SplFileObject::seek() expects exactly 1 parameter, 0 given in %s
-Can't seek file %s to negative line %s
+Can't seek file %s to negative line -1
index 6c6fd2949ffc051c67e7fb016a1931a56f88b699..094d825bb6250aa7dc1bb116747b2f3ded58a2e7 100644 (file)
@@ -15,7 +15,11 @@ $ao1 = new ArrayObject(array(4,2,3));
 $ao2 = new ArrayObject(array('a'=>4,'b'=>2,'c'=>3));
 var_dump($ao1->asort());
 var_dump($ao1);
-var_dump($ao2->asort('blah'));
+try {
+    var_dump($ao2->asort('blah'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($ao2);
 var_dump($ao2->asort(SORT_NUMERIC));
 var_dump($ao2);
@@ -35,9 +39,7 @@ object(ArrayObject)#%d (1) {
     int(4)
   }
 }
-
-Warning: asort() expects parameter 2 to be int, string given in %sarrayObject_asort_basic1.php on line %d
-bool(false)
+asort() expects parameter 2 to be int, string given
 object(ArrayObject)#%d (1) {
   ["storage":"ArrayObject":private]=>
   array(3) {
index 41e1527f933a1d84a399b64ad46e62e128d140eb..3271090d08218479b033433f8b0cfdc5e1c4a4eb 100644 (file)
@@ -25,9 +25,6 @@ var_dump(count($c), count($ao));
 unset($c[0]);
 unset($ao[0]);
 var_dump($c->count(), $ao->count());
-
-//Extra args are ignored.
-var_dump($ao->count('blah'));
 ?>
 ==ArrayIterator==
 <?php
@@ -53,11 +50,8 @@ var_dump(count($c), count($ao));
 unset($c[0]);
 unset($ao[0]);
 var_dump($c->count(), $ao->count());
-
-//Extra args are ignored.
-var_dump($ao->count('blah'));
 ?>
---EXPECTF--
+--EXPECT--
 ==ArrayObject==
 int(99)
 int(0)
@@ -67,9 +61,6 @@ int(99)
 int(2)
 int(99)
 int(1)
-
-Warning: ArrayObject::count() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 ==ArrayIterator==
 int(99)
 int(0)
@@ -79,6 +70,3 @@ int(99)
 int(2)
 int(99)
 int(1)
-
-Warning: ArrayIterator::count() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
index 823256edbcc50ab9b92ac7cd7eba7de4d5c9fb99..c6759a31cf4da66e0621e6885c700e51dae54b77 100644 (file)
@@ -29,8 +29,8 @@ $ao = new ArrayObject($original);
 try {
        $copy = $ao->exchangeArray();
        $copy['addedToCopy'] = 'added To Copy';
-} catch (Exception $e) {
-       echo "Exception:" . $e->getMessage() . "\n";
+} catch (TypeError $e) {
+       echo "Exception: " . $e->getMessage() . "\n";
 }
 $original->addedToOriginal = 'added To Original';
 var_dump($ao, $original, $copy);
@@ -81,8 +81,9 @@ array(2) {
 
 
 --> exchangeArray() with no arg:
+Exception: ArrayObject::exchangeArray() expects exactly 1 parameter, 0 given
 
-Warning: ArrayObject::exchangeArray() expects exactly 1 parameter, 0 given in %s on line 27
+Notice: Undefined variable: copy in %s on line %d
 object(ArrayObject)#2 (1) {
   ["storage":"ArrayObject":private]=>
   object(C)#3 (2) {
@@ -98,10 +99,7 @@ object(C)#3 (2) {
   ["addedToOriginal"]=>
   string(17) "added To Original"
 }
-array(1) {
-  ["addedToCopy"]=>
-  string(13) "added To Copy"
-}
+NULL
 
 
 --> exchangeArray() with bad arg type:
index 1692a02ef1d3c37bbac2880c2deaaae8416888e0..aa1abbf239a5f57178143ffbd3f2b2ae7f90ea9a 100644 (file)
@@ -14,7 +14,11 @@ $ao1 = new ArrayObject(array(4,2,3));
 $ao2 = new ArrayObject(array('b'=>4,'a'=>2,'q'=>3, 99=>'x'));
 var_dump($ao1->ksort());
 var_dump($ao1);
-var_dump($ao2->ksort('blah'));
+try {
+    var_dump($ao2->ksort('blah'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($ao2);
 var_dump($ao2->ksort(SORT_STRING));
 var_dump($ao2);
@@ -34,9 +38,7 @@ object(ArrayObject)#%d (1) {
     int(3)
   }
 }
-
-Warning: ksort() expects parameter 2 to be int, string given in %sarrayObject_ksort_basic1.php on line %d
-bool(false)
+ksort() expects parameter 2 to be int, string given
 object(ArrayObject)#2 (1) {
   ["storage":"ArrayObject":private]=>
   array(4) {
index 89efdb6a9f6a2a19af9e28681ff9565a11cea078..d0910b3a0a95a6e57e5be7ce96dc432274d80e24 100644 (file)
@@ -8,7 +8,7 @@ try {
   foreach($ao as $key=>$value) {
     echo "  $key=>$value\n";
   }
-} catch (Exception $e) {
+} catch (TypeError $e) {
        var_dump($e->getMessage());
 }
 
@@ -18,7 +18,7 @@ try {
   foreach($ao as $key=>$value) {
     echo "  $key=>$value\n";
   }
-} catch (Exception $e) {
+} catch (TypeError $e) {
        var_dump($e->getMessage());
 }
 
@@ -43,14 +43,7 @@ try {
 
 ?>
 --EXPECTF--
-Warning: ArrayObject::setIteratorClass() expects parameter 1 to be a class name derived from Iterator, 'nonExistentClass' given in %s on line 4
-  a=>1
-  b=>2
-  c=>3
-
-Warning: ArrayObject::setIteratorClass() expects parameter 1 to be a class name derived from Iterator, 'stdClass' given in %s on line 14
-  a=>1
-  b=>2
-  c=>3
+string(118) "ArrayObject::setIteratorClass() expects parameter 1 to be a class name derived from Iterator, 'nonExistentClass' given"
+string(110) "ArrayObject::setIteratorClass() expects parameter 1 to be a class name derived from Iterator, 'stdClass' given"
 string(113) "ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'nonExistentClass' given"
 string(105) "ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'stdClass' given"
index e993951ffa1b8159e648fb90f7934892229f18da..d53f87bc47090b6fcfcc6b86f9206e52163a9bb2 100644 (file)
@@ -6,8 +6,8 @@ Bug #46051 (SplFileInfo::openFile - memory overlap)
 $x = new splfileinfo(__FILE__);
 
 try {
-$x->openFile(NULL, NULL, NULL);
-} catch (Exception $e) { }
+    $x->openFile(NULL, NULL, NULL);
+} catch (TypeError $e) { }
 
 var_dump($x->getPathName());
 --EXPECTF--
index 76c29cbf48f251e20f16f3f4edeba73002b16d23..bd5a7f06dbfd8ed6bbe6ca2c4feb92e494db8bc8 100644 (file)
@@ -6,9 +6,6 @@ $obj = new SplFileObject(__FILE__, 'r');
 $data = $obj->fread(5);
 var_dump($data);
 
-$data = $obj->fread();
-var_dump($data);
-
 $data = $obj->fread(0);
 var_dump($data);
 
@@ -20,9 +17,6 @@ var_dump(strlen($data) === filesize(__FILE__) - 5);
 --EXPECTF--
 string(5) "<?php"
 
-Warning: SplFileObject::fread() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: SplFileObject::fread(): Length parameter must be greater than 0 in %s on line %d
 bool(false)
 bool(true)
index 7b012e7710765c0b0193f1a9e00511f4c3d8aa72..672c8065385e04f9277f9f77d02fed3bcff4c826 100644 (file)
@@ -16,14 +16,11 @@ $fo->fwrite("blahlubba");
 var_dump($fo->ftruncate(4));
 
 $fo->rewind();
-var_dump($fo->fgets(8));
+var_dump($fo->fgets());
 
 $fo->rewind();
 $fo->fwrite("blahlubba");
 
-// This should throw a warning and return NULL since an argument is missing
-var_dump($fo->ftruncate());
-
 ?>
 ==DONE==
 --CLEAN--
@@ -33,10 +30,5 @@ unlink($path);
 ?>
 --EXPECTF--
 bool(true)
-
-Warning: SplFileObject::fgets() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: SplFileObject::ftruncate() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+string(4) "blah"
 ==DONE==
index 1271ccaa6495f57a8a3363621cd4350b3e58e126..66d03dc3593645d178993a9a746a490dd4fcceac 100644 (file)
@@ -24,8 +24,16 @@ class MyCachingIterator extends CachingIterator
                {
                        echo "===$k===\n";
                        var_dump($v);
-                       var_dump($this->offsetExists($v));
-                       var_dump($this->offsetGet($v));
+                       try {
+                var_dump($this->offsetExists($v));
+            } catch (TypeError $e) {
+                echo $e->getMessage(), "\n";
+            }
+                       try {
+                var_dump($this->offsetGet($v));
+            } catch (TypeError $e) {
+                echo $e->getMessage(), "\n";
+            }
                }
        }
 }
@@ -52,9 +60,6 @@ catch(Exception $e)
 
 $it = new MyCachingIterator(new ArrayIterator(array(0, 'foo'=>1, 2, 'bar'=>3, 4)), CachingIterator::FULL_CACHE);
 
-var_dump($it->offsetExists());
-var_dump($it->offsetGet());
-
 $checks = array(0, new stdClass, new MyFoo, NULL, 2, 'foo', 3);
 
 $it->test($checks);
@@ -71,12 +76,6 @@ $it->test($checks);
 --EXPECTF--
 Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct)
 Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct)
-
-Warning: CachingIterator::offsetExists() expects exactly 1 parameter, 0 given in %siterator_044.php on line %d
-NULL
-
-Warning: CachingIterator::offsetGet() expects exactly 1 parameter, 0 given in %siterator_044.php on line %d
-NULL
 ===0===
 int(0)
 bool(false)
@@ -86,12 +85,8 @@ NULL
 ===1===
 object(stdClass)#%d (0) {
 }
-
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string, object given in %siterator_044.php on line %d
-NULL
-
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string, object given in %siterator_044.php on line %d
-NULL
+CachingIterator::offsetExists() expects parameter 1 to be string, object given
+CachingIterator::offsetGet() expects parameter 1 to be string, object given
 ===2===
 object(MyFoo)#%d (0) {
 }
@@ -131,12 +126,8 @@ int(0)
 ===1===
 object(stdClass)#1 (0) {
 }
-
-Warning: CachingIterator::offsetExists() expects parameter 1 to be string, object given in %siterator_044.php on line %d
-NULL
-
-Warning: CachingIterator::offsetGet() expects parameter 1 to be string, object given in %siterator_044.php on line %d
-NULL
+CachingIterator::offsetExists() expects parameter 1 to be string, object given
+CachingIterator::offsetGet() expects parameter 1 to be string, object given
 ===2===
 object(MyFoo)#2 (0) {
 }
index c8ffae77a5e8b685e9b11007cd14f0b431811b3a..fce7ab3655401ccc085153cc3ddd773e1b14fe9a 100644 (file)
@@ -73,10 +73,6 @@ catch(Exception $e)
 
 $it = new MyCachingIterator(new ArrayIterator(array(0, 1, 2, 3)), CachingIterator::FULL_CACHE);
 
-var_dump($it->offsetSet());
-var_dump($it->offsetSet(0));
-var_dump($it->offsetUnset());
-
 $checks = array(0 => 25, 1 => 42, 3 => 'FooBar');
 $unsets = array(0, 2);
 
@@ -97,15 +93,6 @@ $it->show();
 --EXPECTF--
 Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct)
 Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct)
-
-Warning: CachingIterator::offsetSet() expects exactly 2 parameters, 0 given in %siterator_045.php on line %d
-NULL
-
-Warning: CachingIterator::offsetSet() expects exactly 2 parameters, 1 given in %siterator_045.php on line %d
-NULL
-
-Warning: CachingIterator::offsetUnset() expects exactly 1 parameter, 0 given in %siterator_045.php on line %d
-NULL
 MyCachingIterator::testSet()
 set(0,25)
 set(1,42)
index c0dad0f4223c298a7ed30580664b81d0f28856f7..944b40dd961eb4fb5a8fbe3e2757240e438b0919 100644 (file)
@@ -9,20 +9,10 @@ $array=array('a','b');
 
 $iterator = new ArrayIterator($array);
 
-iterator_count();
-
-
-iterator_count($iterator,'1');
-
 iterator_count('1');
 
-
 ?>
 --EXPECTF--
-Warning: iterator_count() expects exactly 1 parameter, 0 given in %s
-
-Warning: iterator_count() expects exactly 1 parameter, 2 given in %s
-
 Fatal error: Uncaught TypeError: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d
 Stack trace:
 #0 %s(%d): iterator_count('1')
index f36b99db23f56e271e35e068c881c0958187ab93..a5a8e5a9b7e33bdaaa124308779cac5e00c0da15 100644 (file)
@@ -9,19 +9,10 @@ $array=array('a','b');
 
 $iterator = new ArrayIterator($array);
 
-iterator_to_array();
-
-
-iterator_to_array($iterator,'test','test');
-
 iterator_to_array('test','test');
 
 ?>
 --EXPECTF--
-Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s
-
-Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s
-
 Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d
 Stack trace:
 #0 %s(%d): iterator_to_array('test', 'test')
index 77732b058c4166334c5e7cc0bf1161676e9183da..046086102be526493912c58bca9b8a02644abe4b 100644 (file)
@@ -17,12 +17,8 @@ try {
        var_dump($e->getCode());
 }
 
-$regexIterator->setMode('foo');
-
 ?>
 --EXPECTF--
 int(0)
 string(14) "Illegal mode 7"
 int(0)
-
-Warning: RegexIterator::setMode() expects parameter 1 to be int, string given in %s on line %d
index 60de68b82a948bcd821255f8d837e8f9ca6a322f..72458446e1c37d4513957eaffc445a8893ad10e4 100644 (file)
@@ -44,11 +44,19 @@ var_dump(iterator_apply($it, 'test'));
 echo "===ERRORS===\n";
 try {
        var_dump(iterator_apply($it, 'test', 1));
-} catch (Error $e) {
-       my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump(iterator_apply($it, 'non_existing_function'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump(iterator_apply($it, 'non_existing_function', NULL, 2));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
-var_dump(iterator_apply($it, 'non_existing_function'));
-var_dump(iterator_apply($it, 'non_existing_function', NULL, 2));
 
 ?>
 ===DONE===
@@ -78,9 +86,7 @@ int(5)
 int(6)
 int(4)
 ===ERRORS===
-Error: Argument 3 passed to iterator_apply() must be of the type array or null, int given
-Error: iterator_apply() expects parameter 2 to be a valid callback, function 'non_existing_function' not found or invalid function name
-NULL
-Error: iterator_apply() expects at most 3 parameters, 4 given
-NULL
+Argument 3 passed to iterator_apply() must be of the type array or null, int given
+iterator_apply() expects parameter 2 to be a valid callback, function 'non_existing_function' not found or invalid function name
+iterator_apply() expects at most 3 parameters, 4 given
 ===DONE===
index 47d7ccce9a3f510af885945e996a2450a3fb7d01..4a90734ad44158a92235c04e9e986c161d3ee892 100644 (file)
@@ -21,11 +21,8 @@ $heap->insert(1);
 var_dump($heap->isEmpty());
 $heap->extract();
 var_dump($heap->isEmpty());
-$heap->isEmpty('var');
 ?>
 --EXPECTF--
 bool(true)
 bool(false)
 bool(true)
-
-Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s
index ca13b03feee413ca8f1b1ee7f4d655cfc3b08e3d..a4e8518eafda7153d555da0a3792779ae0e4f6af 100644 (file)
@@ -4,18 +4,10 @@ SPL: spl_object_id()
 <?php
 
 var_dump(spl_object_id(new stdClass));
-var_dump(spl_object_id(42));
-var_dump(spl_object_id());
 $a = new stdClass();
 var_dump(spl_object_id(new stdClass) === spl_object_id($a));
 
 ?>
 --EXPECTF--
 int(%d)
-
-Warning: spl_object_id() expects parameter 1 to be object, int given in %sspl_object_id.php on line %d
-NULL
-
-Warning: spl_object_id() expects exactly 1 parameter, 0 given in %sspl_object_id.php on line %d
-NULL
 bool(false)
index 531874ceb6024491e33a66f123cb2e9d36a80afe..48abc829c7f663b0917316f5cb486abb52e898e7 100644 (file)
@@ -15,13 +15,11 @@ $db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')");
 
 $stmt = $db->prepare('SELECT bar FROM foo WHERE id=:id');
 $stmt->bindValue(':id', 1, SQLITE3_INTEGER);
-$stmt->reset("dummy");
 $stmt->reset();
 
 //var_dump($db);
 //var_dump($db->close());
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: SQLite3Stmt::reset() expects exactly 0 parameters, 1 given in %s on line %d
+--EXPECT--
 Done
index 767f9d00650d4375e54759dced9ad3b05a213ea3..d921b99dd7ac6b03860a35894f27a8230aa853c1 100644 (file)
@@ -17,7 +17,6 @@ try{
 }
 var_dump($db->enableExceptions(false));
 $db->query("SELECT * FROM non_existent_table");
-var_dump($db->enableExceptions("wrong_type","wrong_type"));
 echo "Closing database\n";
 var_dump($db->close());
 echo "Done\n";
@@ -28,9 +27,6 @@ no such table: non_existent_table
 bool(true)
 
 Warning: SQLite3::query(): no such table: non_existent_table in %s on line %d
-
-Warning: SQLite3::enableExceptions() expects at most 1 parameter, 2 given in %s on line %d
-NULL
 Closing database
 bool(true)
 Done
index c82f5f7fd0bebe4cd0b3944b94f948b50816bb9a..c51e98a67b28e6e166b655e809083a39683c0e1d 100644 (file)
@@ -33,18 +33,6 @@ $mixed_array = array(
 /* Testing Error Conditions */
 echo "\n*** Testing Error Conditions ***\n";
 
-/* Zero argument  */
-var_dump( array_shift() );
-
-/* Scalar argument */
-var_dump( array_shift($number) );
-
-/* String argument */
-var_dump( array_shift($str) );
-
-/* Invalid Number of arguments */
-var_dump( array_shift($mixed_array[1],$mixed_array[2]) );
-
 /* Empty Array as argument */
 var_dump( array_shift($empty_array) );
 
@@ -83,18 +71,6 @@ echo"Done";
 ?>
 --EXPECTF--
 *** Testing Error Conditions ***
-
-Warning: array_shift() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 NULL
 
 *** Testing with various array inputs ***
index 017456917ebfe3251f2809474e83668e6ea17064..c62be0d27c2c271a68c2e51d3bdb73153b2a80ef 100644 (file)
@@ -69,51 +69,6 @@ foreach ($varient_arrays as $sub_array )  {
   echo "\n";
 }
 
-/*test these functions on array which is already unset */
-echo "\n-- Testing variation: when array is unset --\n";
-$unset_array = array (1);
-unset($unset_array);
-
-var_dump( current($unset_array) );
-var_dump( key($unset_array) );
-var_dump( next($unset_array) );
-var_dump( reset($unset_array) );
-
-
-echo "\n*** Testing error conditions ***\n";
-//Zero argument, expected 1 argument
-var_dump( key() );
-var_dump( current() );
-var_dump( reset() );
-var_dump( next() );
-
-// args more than expected, expected 1 argument
-$temp_array = array(1);
-var_dump( key($temp_array, $temp_array) );
-var_dump( current($temp_array, $temp_array) );
-var_dump( reset($temp_array, $temp_array) );
-var_dump( next($temp_array, $temp_array) );
-
-// invalid args type, valid argument: array
-$int_var = 1;
-$float_var = 1.5;
-$string = "string";
-var_dump( key($int_var) );
-var_dump( key($float_var) );
-var_dump( key($string) );
-
-var_dump( current($int_var) );
-var_dump( current($float_var) );
-var_dump( current($string) );
-
-var_dump( next($int_var) );
-var_dump( next($float_var) );
-var_dump( next($string) );
-
-var_dump( reset($int_var) );
-var_dump( reset($float_var) );
-var_dump( reset($string) );
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -456,84 +411,4 @@ array(5) {
   string(4) "zero"
 }
 
-
--- Testing variation: when array is unset --
-
-Notice: Undefined variable: unset_array in %s on line %d
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Notice: Undefined variable: unset_array in %s on line %d
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-*** Testing error conditions ***
-
-Warning: key() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: reset() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: next() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: key() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: next() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: key() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: current() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
 Done
index 3f8d502ffe60e9b97900ec0bc450323f6014c452..f2b185523f32d1d381e265ff853e67cce153b7d3 100644 (file)
@@ -6,13 +6,16 @@ Test array_change_key_case() function - 2
 $item = array ("one" => 1, "two" => 2, "THREE" => 3, "FOUR" => "four");
 
 /* use 'case' argument other than CASE_LOWER & CASE_UPPER */
-var_dump(array_change_key_case($item, "CASE_UPPER"));
+try {
+    var_dump(array_change_key_case($item, "CASE_UPPER"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(array_change_key_case($item, 5));
 
 /* when keys are different in terms of only case */
 /* should return one value key pair with key being in lowercase */
 var_dump( array_change_key_case( array("ONE" => 1, "one" => 3, "One" => 4) ) );
-var_dump( array_change_key_case( array("ONE" => 1, "one" => 6, "One" => 5), "CASE_UPPER" ) );
 
 /* should return one value key pair with key being in uppercase */
 var_dump( array_change_key_case( array("ONE" => 1, "one" => 2, "One" => 3), CASE_UPPER ) );
@@ -21,8 +24,7 @@ var_dump( array_change_key_case( array("ONE" => 1, "one" => 1, "One" => 2), 5 )
 echo "end\n";
 ?>
 --EXPECTF--
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
+array_change_key_case() expects parameter 2 to be int, string given
 array(4) {
   ["ONE"]=>
   int(1)
@@ -37,9 +39,6 @@ array(1) {
   ["one"]=>
   int(4)
 }
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
 array(1) {
   ["ONE"]=>
   int(3)
index 26a09aff2488198a2cdb37d60207c65002b5426a..92232485202f879a95389cac5517bc8fbcde91fe 100644 (file)
@@ -11,18 +11,6 @@ Test array_column() function: error conditions
 
 echo "*** Testing array_column() : error conditions ***\n";
 
-echo "\n-- Testing array_column() function with Zero arguments --\n";
-var_dump(array_column());
-
-echo "\n-- Testing array_column() function with One argument --\n";
-var_dump(array_column(array()));
-
-echo "\n-- Testing array_column() function with string as first parameter --\n";
-var_dump(array_column('foo', 0));
-
-echo "\n-- Testing array_column() function with int as first parameter --\n";
-var_dump(array_column(1, 'foo'));
-
 echo "\n-- Testing array_column() column key parameter should be a string or an integer (testing bool) --\n";
 var_dump(array_column(array(), true));
 
@@ -40,26 +28,6 @@ echo "Done\n";
 --EXPECTF--
 *** Testing array_column() : error conditions ***
 
--- Testing array_column() function with Zero arguments --
-
-Warning: array_column() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing array_column() function with One argument --
-
-Warning: array_column() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing array_column() function with string as first parameter --
-
-Warning: array_column() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Testing array_column() function with int as first parameter --
-
-Warning: array_column() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
 -- Testing array_column() column key parameter should be a string or an integer (testing bool) --
 
 Warning: array_column(): The column key should be either a string or an integer in %s on line %d
index d90c80f20b793a4c8f70b84d3bf6754507ba5d8d..f6c6905780b57f5e2902eb30925fc1f47b252bca 100644 (file)
@@ -27,36 +27,32 @@ function key_compare_func($a, $b)
 
 //Test array_diff_uassoc with one more than the expected number of arguments
 echo "\n-- Testing array_diff_uassoc() function with more than expected no. of arguments --\n";
-var_dump( array_diff_uassoc($array1, $array2, "key_compare_func", $extra_arg) );
-var_dump( array_diff_uassoc($array1, $array2, $array3, $array4, "key_compare_func", $extra_arg) );
+try {
+    var_dump( array_diff_uassoc($array1, $array2, "key_compare_func", $extra_arg) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump( array_diff_uassoc($array1, $array2, $array3, $array4, "key_compare_func", $extra_arg) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 // Testing array_diff_uassoc with one less than the expected number of arguments
 echo "\n-- Testing array_diff_uassoc() function with less than expected no. of arguments --\n";
 var_dump( array_diff_uassoc($array1, $array2) );
 
-// Testing array_diff_uassoc with no arguments
-echo "\n-- Testing array_diff_uassoc() function with no arguments --\n";
-var_dump( array_diff_uassoc() );
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing array_diff_uassoc() : error conditions ***
 
 -- Testing array_diff_uassoc() function with more than expected no. of arguments --
-
-Warning: array_diff_uassoc() expects parameter 4 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_diff_uassoc() expects parameter 6 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
+array_diff_uassoc() expects parameter 4 to be a valid callback, array must have exactly two members
+array_diff_uassoc() expects parameter 6 to be a valid callback, array must have exactly two members
 
 -- Testing array_diff_uassoc() function with less than expected no. of arguments --
 
 Warning: array_diff_uassoc(): at least 3 parameters are required, 2 given in %s on line %d
 NULL
-
--- Testing array_diff_uassoc() function with no arguments --
-
-Warning: array_diff_uassoc(): at least 3 parameters are required, 0 given in %s on line %d
-NULL
 ===DONE===
index 2f07428c05c431ffaf57e5212761ee0d69c3c978..e80f02629ea42795298d485ec18d1b9e4030fc07 100644 (file)
@@ -14,19 +14,23 @@ $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
 $array2 = array("a" => "green", "yellow", "red");
 
 //function name within double quotes
-var_dump( array_diff_ukey($array1, $array1, "unknown_function") );
+try {
+    var_dump( array_diff_ukey($array1, $array1, "unknown_function") );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 //function name within single quotes
-var_dump( array_diff_ukey($array1, $array1, 'unknown_function') );
+try {
+    var_dump( array_diff_ukey($array1, $array1, 'unknown_function') );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 *** Testing array_diff_ukey() : usage variation ***
-
-Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
+array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
+array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
 ===DONE===
index 2fbdb850c3570e712e8a33743c76aeb28f4bb8b9..386404a33629e8ee786733b106c1f59c3b2eee38 100644 (file)
@@ -10,44 +10,16 @@ Test array_fill() function : error conditions
 
 echo "*** Testing array_fill() : error conditions ***\n";
 
-// Zero arguments
-echo "-- Testing array_fill() function with Zero arguments --\n";
-var_dump( array_fill() );
-
-// More than  expected number of arguments
-echo "-- Testing array_fill() function with more than expected no. of arguments --\n";
+// calling array_fill with negative values for 'num' parameter
 $start_key = 0;
-$num = 2;
-$val = 1;
-$extra_arg = 10;
-var_dump( array_fill($start_key,$num,$val, $extra_arg) );
-
-// Less than the expected number of arguments
-echo "-- Testing array_fill() function with less than expected no. of arguments --\n";
-$start_key = 0;
-$num = 2;
-var_dump( array_fill($start_key,$num) );
-
-//calling array_fill with negative values for 'num' parameter
 $num = -1;
+$val = 1;
 var_dump( array_fill($start_key,$num,$val) );
 
 echo "Done";
 ?>
 --EXPECTF--
 *** Testing array_fill() : error conditions ***
--- Testing array_fill() function with Zero arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
--- Testing array_fill() function with more than expected no. of arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
--- Testing array_fill() function with less than expected no. of arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
 
 Warning: array_fill(): Number of elements can't be negative in %s on line %d
 bool(false)
index 12adde72e72b10de52f4acfa998062d2d6078075..fb222a414bae34f5bd375549283fe166cc157d03 100644 (file)
@@ -4,15 +4,12 @@ basic array_fill_keys test
 precision=14
 --FILE--
 <?php
-       var_dump(array_fill_keys('test', 1));
        var_dump(array_fill_keys(array(), 1));
        var_dump(array_fill_keys(array('foo', 'bar'), NULL));
        var_dump(array_fill_keys(array('5', 'foo', 10, 1.23), 123));
        var_dump(array_fill_keys(array('test', TRUE, 10, 100), ''));
 ?>
---EXPECTF--
-Warning: array_fill_keys() expects parameter 1 to be array, string given in %s on line %d
-NULL
+--EXPECT--
 array(0) {
 }
 array(2) {
index 84cc928cbc35875979d69be13222935bcbc5df3f..b1abbcfe1b9c42a4ede9e8de4828aa5e2f58d579 100644 (file)
@@ -12,33 +12,18 @@ Test array_fill_keys() function : variation of parameter
 
 echo "*** Testing array_fill_keys() : parameter variations ***\n";
 
-$simpleStr = "simple";
 $fp = fopen(__FILE__, "r");
-$bool = false;
-$float = 2.4;
 $array = array("one", "two");
-$nullVal = null;
-
-echo "\n-- Testing array_fill_keys() function with both wrong arguments --\n";
-var_dump( array_fill_keys($bool, $float) );
 
 echo "\n-- Testing array_fill_keys() function with unusual second arguments --\n";
 var_dump( array_fill_keys($array, $fp) );
 
-echo "\n-- Testing array_fill_keys() function with mixed array --\n";
-var_dump( array_fill_keys($nullVal, $simpleStr) );
-
 fclose($fp);
 echo "Done";
 ?>
 --EXPECTF--
 *** Testing array_fill_keys() : parameter variations ***
 
--- Testing array_fill_keys() function with both wrong arguments --
-
-Warning: array_fill_keys() expects parameter 1 to be array, bool given in %sarray_fill_keys_variation3.php on line %d
-NULL
-
 -- Testing array_fill_keys() function with unusual second arguments --
 array(2) {
   ["one"]=>
@@ -46,9 +31,4 @@ array(2) {
   ["two"]=>
   resource(%d) of type (stream)
 }
-
--- Testing array_fill_keys() function with mixed array --
-
-Warning: array_fill_keys() expects parameter 1 to be array, null given in %sarray_fill_keys_variation3.php on line %d
-NULL
 Done
index ba27a59c963f3a964f80947b61326821c75a0d53..1488aedd0919475801384ca5fc89f90fc81e6ac2 100644 (file)
@@ -26,9 +26,6 @@ var_dump(array_filter($array2, "even"));
 var_dump(array_filter($array3, "even"));
 
 var_dump(array_filter(array()));
-var_dump(array_filter(array(), array()));
-var_dump(array_filter("", null));
-var_dump(array_filter($array1, 1));
 
 echo '== DONE ==';
 ?>
@@ -81,13 +78,4 @@ array(2) {
 }
 array(0) {
 }
-
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
 == DONE ==
index 4749fe8e45d5d7430feb092da5b554631aab5a3d..a32fdadc05ff080ca5c6adc1d488d0a19a3ac4e7 100644 (file)
@@ -48,7 +48,11 @@ var_dump(array_filter($mixed, 'is_numeric', ARRAY_FILTER_USE_KEY));
 
 var_dump(array_filter($mixed, 'is_numeric', 0));
 
-var_dump(array_filter($mixed, 'is_numeric', ARRAY_FILTER_USE_BOTH));
+try {
+    var_dump(array_filter($mixed, 'is_numeric', ARRAY_FILTER_USE_BOTH));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done"
 ?>
@@ -88,14 +92,5 @@ array(2) {
   ["b"]=>
   int(2)
 }
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-array(0) {
-}
+is_numeric() expects exactly 1 parameter, 2 given
 Done
index ed89d13d35b24f966029a23002f19c3e6f7b376a..1755a322b0fc5dcd0bcae45f6fee933fb427c13d 100644 (file)
@@ -22,10 +22,18 @@ var_dump( array_filter($input, 'is_int') );
 var_dump( array_filter($input, 'chr') );
 
 // using language construct 'echo' as 'callback'
-var_dump( array_filter($input, 'echo') );
+try {
+    var_dump( array_filter($input, 'echo') );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 // using language construct 'exit' as 'callback'
-var_dump( array_filter($input, 'exit') );
+try {
+    var_dump( array_filter($input, 'exit') );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done"
 ?>
@@ -63,10 +71,6 @@ array(8) {
   [7]=>
   NULL
 }
-
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
+array_filter() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name
+array_filter() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name
 Done
index 65432379d71e16035faf7cd460d8d2a276a6077c..f4b91503bc092d34050e5edc518c9905c4e051a4 100644 (file)
@@ -14,19 +14,23 @@ $array1 = array('blue'  => 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
 $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);
 
 //function name within double quotes
-var_dump( array_intersect_ukey($array1, $array2, "unknown_function") );
+try {
+    var_dump( array_intersect_ukey($array1, $array2, "unknown_function") );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 //function name within single quotes
-var_dump( array_intersect_ukey($array1, $array2, 'unknown_function') );
+try {
+    var_dump( array_intersect_ukey($array1, $array2, 'unknown_function') );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing array_intersect_ukey() : usage variation ***
-
-Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
+array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
+array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
 ===DONE===
index 61faf0158ddcfd1ca1f4b8015730bba6704ef84e..e917815337219470309dc056940f5c7b080e2831 100644 (file)
@@ -69,24 +69,8 @@ foreach ($search_arrays_v as $search_array) {
 }
 
 echo "\n*** Testing error conditions ***\n";
-//Zeor args
-var_dump( array_key_exists() );
 // first args as array
 var_dump( array_key_exists(array(), array()) );
-// second args as string
-var_dump( array_key_exists("", "") );
-// second args a integer
-var_dump( array_key_exists(1, 1) );
-// second args as NULL
-var_dump( array_key_exists(1, NULL) );
-// second args as boolean
-var_dump( array_key_exists(1, true) );
-// first args as boolean
-var_dump( array_key_exists(false, true) );
-// second args as float
-var_dump( array_key_exists(false, 17.5) );
-// args more than expected
-var_dump( array_key_exists(1, array(), array()) );
 // first argument as floating point value
 var_dump( array_key_exists(17.5, array(1,23) ) ) ;
 
@@ -249,33 +233,9 @@ bool(true)
 
 *** Testing error conditions ***
 
-Warning: array_key_exists() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
 Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
 bool(false)
 
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
 bool(false)
 
index 46a989b839c6711388b83d9f2aa8e72437fa79a8..0febae29c7f546af7d31bc622f04a07cd4bb3ea1 100644 (file)
@@ -3,32 +3,19 @@ Test array_keys() function (error conditions)
 --FILE--
 <?php
 
-echo "\n*** Testing error conditions ***";
-var_dump(array_keys(100));
-var_dump(array_keys("string"));
-var_dump(array_keys(new stdclass));  // object
-var_dump(array_keys());  // Zero arguments
-var_dump(array_keys(array(), "", TRUE, 100));  // args > expected
+echo "\n*** Testing error conditions ***\n";
+try {
+    var_dump(array_keys(new stdclass));  // object
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(array_keys(array(1,2,3, new stdClass => array())));  // (W)illegal offset
 
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing error conditions ***
-Warning: array_keys() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_keys() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_keys() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_keys() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_keys() expects at most 3 parameters, 4 given in %s on line %d
-NULL
+array_keys() expects parameter 1 to be array, object given
 
 Warning: Illegal offset type in %s on line %d
 array(3) {
index 56dd033521e06586d6c2c52b0c969ed9257045b5..d15f28425eeb5d99e6f738194bb04c54e62b5191 100644 (file)
@@ -9,10 +9,6 @@ Test array_map() function : error conditions
 
 echo "*** Testing array_map() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing array_map() function with Zero arguments --\n";
-var_dump( array_map() );
-
 // Testing array_map with one less than the expected number of arguments
 echo "\n-- Testing array_map() function with one less than expected no. of arguments --\n";
 function callback1() {
@@ -45,15 +41,8 @@ echo "Done";
 --EXPECTF--
 *** Testing array_map() : error conditions ***
 
--- Testing array_map() function with Zero arguments --
-
-Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d%d
-NULL
-
 -- Testing array_map() function with one less than expected no. of arguments --
-
-Warning: array_map() expects at least 2 parameters, 1 given in %s on line %d%d
-NULL
+Exception: array_map() expects at least 2 parameters, 1 given
 
 -- Testing array_map() function with less no. of arrays than callback function arguments --
 Exception: Too few arguments to function callback2(), 1 passed and exactly 2 expected
index 944fc8c2c86bb8a0a63e92309e5c8444fd60a3f8..43cc4484e698f43695fcab30678a4f638c5eda42 100644 (file)
@@ -28,7 +28,11 @@ class SimpleClass
 }
 function test($cb, $args) {
   echo join('::', $cb) . "\n";
-  var_dump(array_map($cb, $args));
+  try {
+    var_dump(array_map($cb, $args));
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
 }
 test(array('SimpleClass', 'square'), array(1, 2));
 
@@ -135,21 +139,15 @@ array(2) {
 
 -- simple class with private variable and method --
 SimpleClassPri::add
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access private method SimpleClassPri::add() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access private method SimpleClassPri::add()
 
 -- simple class with protected variable and method --
 SimpleClassPro::mul
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access protected method SimpleClassPro::mul() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access protected method SimpleClassPro::mul()
 
 -- class without members --
 EmptyClass
-
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, array must have exactly two members
 
 -- abstract class --
 ChildClass::emptyFunction
@@ -182,13 +180,9 @@ array(2) {
   int(4)
 }
 StaticClass::cube
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access private method StaticClass::cube() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access private method StaticClass::cube()
 StaticClass::retVal
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access protected method StaticClass::retVal() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access protected method StaticClass::retVal()
 -- class implementing an interface --
 InterClass::square
 array(2) {
index 7cfb528bf28088c72b9d688a7abdee71038290cd..e5218ccbe4a20ed3cb64e11de17e0aeea74fd29f 100644 (file)
@@ -26,21 +26,25 @@ class SimpleClass
 }
 
 echo "-- with non-existent class --\n";
-var_dump( array_map(array('non-existent', 'square'), array(1, 2)) );
+try {
+    var_dump( array_map(array('non-existent', 'square'), array(1, 2)) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "-- with existent class and non-existent method --\n";
-var_dump( array_map(array('SimpleClass', 'non-existent'), array(1, 2)) );
+try {
+    var_dump( array_map(array('SimpleClass', 'non-existent'), array(1, 2)) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done";
 ?>
 --EXPECTF--
 *** Testing array_map() :  with non-existent class and method ***
 -- with non-existent class --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found
 -- with existent class and non-existent method --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent'
 Done
index 114d1d3134976deab9a748de9bed3091e73d4659..2f1536df5c2b29a841b811afd2fccd0d556f9eec 100644 (file)
@@ -51,13 +51,21 @@ echo "-- accessing parent method from child class --\n";
 var_dump( array_map(array('ChildClass', 'staticParent1'), $arr1) );
 
 echo "-- accessing child method from parent class --\n";
-var_dump( array_map(array('ParentClass', 'staticChild'), $arr1) );
+try {
+    var_dump( array_map(array('ParentClass', 'staticChild'), $arr1) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "-- accessing parent method using child class object --\n";
 var_dump( array_map(array($childobj, 'staticParent1'), $arr1) );
 
 echo "-- accessing child method using parent class object --\n";
-var_dump( array_map(array($parentobj, 'staticChild'), $arr1) );
+try {
+    var_dump( array_map(array($parentobj, 'staticChild'), $arr1) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done";
 ?>
@@ -73,9 +81,7 @@ array(3) {
   int(7)
 }
 -- accessing child method from parent class --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild' in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild'
 -- accessing parent method using child class object --
 array(3) {
   [0]=>
@@ -86,7 +92,5 @@ array(3) {
   int(7)
 }
 -- accessing child method using parent class object --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild' in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild'
 Done
index b258c2d31b98d69e744da4197f8ea70af063b122..67abde0108a275422e4940d01d9dd170d96a4414 100644 (file)
@@ -20,10 +20,18 @@ echo "-- with built-in function 'pow' and two parameters --\n";
 var_dump( array_map('pow', $array1, $array2));
 
 echo "-- with built-in function 'pow' and one parameter --\n";
-var_dump( array_map('pow', $array1));
+try {
+    var_dump( array_map('pow', $array1));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "-- with language construct --\n";
-var_dump( array_map('echo', $array1));
+try {
+    var_dump( array_map('echo', $array1));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done";
 ?>
@@ -39,22 +47,7 @@ array(3) {
   int(243)
 }
 -- with built-in function 'pow' and one parameter --
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-array(3) {
-  [0]=>
-  NULL
-  [1]=>
-  NULL
-  [2]=>
-  NULL
-}
+pow() expects exactly 2 parameters, 1 given
 -- with language construct --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name
 Done
index 771d3f949ef0b4ff20492e7984943768ddb6d45e..2764cb7374051d8080c38d88a6376eddc14d92b7 100644 (file)
@@ -36,10 +36,18 @@ echo "-- with undefined variable --\n";
 var_dump( array_map(@$undefined_var, $arr1) );
 
 echo "-- with empty string --\n";
-var_dump( array_map("", $arr1, $arr2) );
+try {
+    var_dump( array_map("", $arr1, $arr2) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "-- with empty array --\n";
-var_dump( array_map(array(), $arr1, $arr2) );
+try {
+    var_dump( array_map(array(), $arr1, $arr2) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done";
 ?>
@@ -115,11 +123,7 @@ array(2) {
   int(2)
 }
 -- with empty string --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name
 -- with empty array --
-
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, array must have exactly two members
 Done
index b29af47713ffb42182521a39671ddaa8c3c7a4ed..f36d55bd5f4ecf8630478f0012e57eb0e18586c7 100644 (file)
@@ -18,13 +18,15 @@ $arr1 = array(1, 2);
 $arr2 = array("one", "two");
 $arr3 = array(1.1, 2.2);
 
-var_dump( array_map('non_existent', $arr1, $arr2, $arr3) );
+try {
+    var_dump( array_map('non_existent', $arr1, $arr2, $arr3) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing array_map() : non existent 'callback' function ***
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name
 Done
index c4987cb385405f128e3ded2073cc8c5e349096bb..0c80337c769b97408b6cc23a8941b97447e42dfe 100644 (file)
@@ -30,8 +30,12 @@ $callback_names = array(
 );
 for($count = 0; $count < count($callback_names); $count++)
 {
-  echo "-- Iteration ".($count + 1)." --\n";
-  var_dump( array_map($callback_names[$count], $arr1) );
+    echo "-- Iteration ".($count + 1)." --\n";
+    try {
+        var_dump( array_map($callback_names[$count], $arr1) );
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 }
 
 echo "Done";
@@ -39,35 +43,19 @@ echo "Done";
 --EXPECTF--
 *** Testing array_map() : non-permmited built-in functions ***
 -- Iteration 1 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name
 -- Iteration 2 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid function name
 -- Iteration 3 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid function name
 -- Iteration 4 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid function name
 -- Iteration 5 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid function name
 -- Iteration 6 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid function name
 -- Iteration 7 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid function name
 -- Iteration 8 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name
 Done
index 1cfbdd7beb553228bdf691fbd71d790206cc45aa..4558dc999f0744d29411af7850c27d31e47f0987 100644 (file)
@@ -66,93 +66,77 @@ $unexpected_callbacks = array(
 
 // loop through each element of $inputs to check the behavior of array_map
 for($count = 0; $count < count($unexpected_callbacks); $count++) {
-  echo "\n-- Iteration ".($count + 1)." --";
-  var_dump( array_map($unexpected_callbacks[$count], $arr1));
+    echo "\n-- Iteration ".($count + 1)." --\n";
+    try {
+        var_dump( array_map($unexpected_callbacks[$count], $arr1));
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 };
 
 fclose($fp);
 echo "Done";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing array_map() : unexpected values for 'callback' argument ***
 
 -- Iteration 1 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 2 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 3 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 4 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 5 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 6 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 7 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 8 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 9 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 10 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 11 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 12 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 13 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 14 --
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name
 
 -- Iteration 15 --
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name
 
 -- Iteration 16 --
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, array must have exactly two members
 
 -- Iteration 17 --
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
 
 -- Iteration 18 --
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
 
 -- Iteration 19 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 
 -- Iteration 20 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
 Done
index e6a8096282c18a5442a55e804fab637cd84542a2..98cb3a318fbaa79c2750d4344c18e79ecdf36691 100644 (file)
@@ -78,12 +78,13 @@ var_dump(array_merge($begin_array[6]));
 echo "\n*** Testing array_merge() with typecasting non-array to array ***\n";
 var_dump(array_merge($begin_array[4], (array)"type1", (array)10, (array)12.34));
 
-echo "\n*** Testing error conditions ***";
+echo "\n*** Testing error conditions ***\n";
 /* Invalid arguments */
-var_dump(array_merge());
-var_dump(array_merge(100, 200));
-var_dump(array_merge($begin_array[0], $begin_array[1], 100));
-var_dump(array_merge($begin_array[0], $begin_array[1], $arr4));
+try {
+    var_dump(array_merge());
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
@@ -746,17 +747,5 @@ array(7) {
 }
 
 *** Testing error conditions ***
-Warning: array_merge() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_merge(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_merge(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
-Notice: Undefined variable: arr4 in %s on line %d
-
-Warning: array_merge(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
+array_merge() expects at least 1 parameter, 0 given
 Done
index ffa9cc998e6f06392d2c6ccc1906911548dbf8be..f741220837949a1a9e16686e2b798e84f86ecfe4 100644 (file)
@@ -11,7 +11,11 @@ echo "*** Testing array_merge_recursive() : error conditions ***\n";
 
 // Zero arguments
 echo "\n-- Testing array_merge_recursive() function with Zero arguments --\n";
-var_dump( array_merge_recursive() );
+try {
+    var_dump( array_merge_recursive() );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done";
 ?>
@@ -19,7 +23,5 @@ echo "Done";
 *** Testing array_merge_recursive() : error conditions ***
 
 -- Testing array_merge_recursive() function with Zero arguments --
-
-Warning: array_merge_recursive() expects at least 1 parameter, 0 given in %s on line %d
-NULL
+array_merge_recursive() expects at least 1 parameter, 0 given
 Done
index 3e78b78ac080f54549647d560859c557bd273918..105662be0709666e6231666049cec821fd8de4ba 100644 (file)
@@ -10,10 +10,6 @@ Test array_multisort() function : error conditions
 
 echo "*** Testing array_multisort() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing array_multisort() function with Zero arguments --\n";
-var_dump( array_multisort() );
-
 echo "\n-- Testing array_multisort() function with repeated flags --\n";
 $ar1 = array(1);
 var_dump( array_multisort($ar1, SORT_ASC, SORT_ASC) );
@@ -27,11 +23,6 @@ var_dump( array_multisort($ar1, SORT_STRING, SORT_NUMERIC) );
 --EXPECTF--
 *** Testing array_multisort() : error conditions ***
 
--- Testing array_multisort() function with Zero arguments --
-
-Warning: array_multisort() expects at least 1 parameter, 0 given in %sarray_multisort_error.php on line %d
-NULL
-
 -- Testing array_multisort() function with repeated flags --
 
 Warning: array_multisort(): Argument #3 is expected to be an array or sorting flag that has not already been specified in %sarray_multisort_error.php on line %d
index c2675167306a963511255ce48562c5705b753153..fd5fa520b62c85b35bba272af3cdf586c327c85b 100644 (file)
@@ -3,9 +3,6 @@ array_pad() tests
 --FILE--
 <?php
 
-var_dump(array_pad());
-var_dump(array_pad(array()));
-var_dump(array_pad(array(), 1));
 var_dump(array_pad(array(), 1, 0));
 
 var_dump(array_pad(array(), 0, 0));
@@ -16,19 +13,10 @@ var_dump(array_pad(array("", -1, 2.0), 2, array()));
 var_dump(array_pad(array("", -1, 2.0), -3, array()));
 var_dump(array_pad(array("", -1, 2.0), -4, array()));
 var_dump(array_pad(array("", -1, 2.0), 2000000, 0));
-var_dump(array_pad("", 2000000, 0));
 
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
 array(1) {
   [0]=>
   int(0)
@@ -95,7 +83,4 @@ array(4) {
 
 Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
 bool(false)
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
 Done
index 52e754f94ddf0d3851a928761523091ef46794f4..227a520ac1e5409c81681523a7ef937a2412a5aa 100644 (file)
@@ -31,16 +31,7 @@ $mixed_array = array(
 );
 
 /* Error Conditions */
-echo "\n*** Testing Error Conditions ***\n";
-
-/* Zero argument  */
-var_dump( array_push() );
-
-/* Scalar argument */
-var_dump( array_push($number, 22) );
-
-/* String argument */
-var_dump( array_push($str, 22) );
+echo "\n*** Testing Edge Conditions ***\n";
 
 /* Invalid Number of arguments */
 var_dump( array_push($mixed_array[1],1,2) );
@@ -70,16 +61,7 @@ var_dump( $mixed_array[2] );
 echo"\nDone";
 ?>
 --EXPECTF--
-*** Testing Error Conditions ***
-
-Warning: array_push() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_push() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
+*** Testing Edge Conditions ***
 int(11)
 int(1)
 
index db432dc9b46368210a4ac7a9349487aa653d7f8f..72999eda5fdd64187a188e8615a858b6e39a858e 100644 (file)
@@ -3,10 +3,8 @@ array_rand() tests
 --FILE--
 <?php
 
-var_dump(array_rand());
 var_dump(array_rand(array()));
 var_dump(array_rand(array(), 0));
-var_dump(array_rand(0, 0));
 var_dump(array_rand(array(1,2,3), 0));
 var_dump(array_rand(array(1,2,3), -1));
 var_dump(array_rand(array(1,2,3), 10));
@@ -16,18 +14,12 @@ var_dump(array_rand(array(1,2,3), 2));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: array_rand(): Array is empty in %s on line %d
 NULL
 
 Warning: array_rand(): Array is empty in %s on line %d
 NULL
 
-Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
 Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
 NULL
 
index 49563f9712559d8b12be5d7cce08475749c64dc4..10c1672e54939570ed8572422d326b6f26bec239 100644 (file)
@@ -5,8 +5,6 @@ array_search() tests
 
 $a = array(1=>0, 2=>1, 4=>3, "a"=>"b", "c"=>"d");
 
-var_dump(array_search(1));
-var_dump(array_search(1,1));
 var_dump(array_search("a",$a));
 var_dump(array_search("0",$a, true));
 var_dump(array_search("0",$a));
@@ -18,12 +16,7 @@ var_dump(array_search(-1,$a, true));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, int given in %s on line %d
-NULL
+--EXPECT--
 int(1)
 bool(false)
 int(1)
index 41b0b5bb206e7caeb7e10dbfd805c272e50b384a..596c36f805aacacffbb836204d7192506a37d5c4 100644 (file)
@@ -33,9 +33,17 @@ class array_search_check {
 
 $array_search_obj = new array_search_check();  //creating new object
 //error: as wrong datatype for second argument
-var_dump( array_search("array_var", $array_search_obj) );
+try {
+    var_dump( array_search("array_var", $array_search_obj) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 //error: as wrong datatype for second argument
-var_dump( array_search("foo", $array_search_obj) );
+try {
+    var_dump( array_search("foo", $array_search_obj) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 //element found as "one" exists in array $array_var
 var_dump( array_search("one", $array_search_obj->array_var) );
 
@@ -48,11 +56,7 @@ string(5) "three"
 int(5)
 
 *** Testing objects with array_search() ***
-
-Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
-NULL
+array_search() expects parameter 2 to be array, object given
+array_search() expects parameter 2 to be array, object given
 int(1)
 Done
index 59d804350b5d9f4262c776b7f6e68133e2388575..d19f5195d6f12919d189b006806764bff92f4694 100644 (file)
@@ -20,26 +20,6 @@ $var_array = array(
 $num = 4;
 $str = "john";
 
-/* Zero args */
-echo"\n*** Output for Zero Argument ***\n";
-array_slice();
-
-/* Single args */
-echo"\n*** Output for Single array Argument ***\n";
-array_slice($var_array);
-
-/* More than valid no. of args (ie. >4 )  */
-echo"\n*** Output for invalid number of Arguments ***\n";
-array_slice($var_array, 2, 4, true, 3);
-
-/* Scalar arg */
-echo"\n*** Output for scalar Argument ***\n";
-array_slice($num, 2);
-
-/* String arg */
-echo"\n*** Output for string Argument ***\n";
-array_slice($str, 2);
-
 $counter = 1;
 foreach ($var_array as $sub_array)
 {
@@ -89,26 +69,6 @@ foreach ($var_array as $sub_array)
 
 ?>
 --EXPECTF--
-*** Output for Zero Argument ***
-
-Warning: array_slice() expects at least 2 parameters, 0 given in %s on line %d
-
-*** Output for Single array Argument ***
-
-Warning: array_slice() expects at least 2 parameters, 1 given in %s on line %d
-
-*** Output for invalid number of Arguments ***
-
-Warning: array_slice() expects at most 4 parameters, 5 given in %s on line %d
-
-*** Output for scalar Argument ***
-
-Warning: array_slice() expects parameter 1 to be array, int given in %s on line %d
-
-*** Output for string Argument ***
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-
 *** Iteration 1 ***
 
 *** Variation with first two Arguments ***
index f0c30ba53d3909d08b1565ef9414e88cccadfc55..46f33b95034480a65d78e44257ba18f0799aaded 100644 (file)
@@ -15,8 +15,16 @@ var_dump(array_slice(range(1, 3), -1, NULL, 1));
 
 
 $a = 'foo';
-var_dump(array_slice(range(1, 3), 0, $a));
-var_dump(array_slice(range(1, 3), 0, $a));
+try {
+    var_dump(array_slice(range(1, 3), 0, $a));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump(array_slice(range(1, 3), 0, $a));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump($a);
 
 ?>
@@ -53,10 +61,6 @@ array(1) {
   [2]=>
   int(3)
 }
-
-Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d
-NULL
+array_slice() expects parameter 3 to be int, string given
+array_slice() expects parameter 3 to be int, string given
 string(3) "foo"
index 9b474277a95e4f7274e203df56d51dd95a427838..9ebe83391e142880f60c7969cc4d153ed698a01f 100644 (file)
@@ -7,8 +7,6 @@ $a = array();
 $s = "";
 var_dump(array_unshift($a, $s));
 var_dump($a);
-var_dump(array_unshift($s, $a));
-var_dump($a);
 var_dump(array_unshift($a, $a));
 var_dump($a);
 
@@ -20,13 +18,6 @@ array(1) {
   [0]=>
   string(0) ""
 }
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-array(1) {
-  [0]=>
-  string(0) ""
-}
 int(2)
 array(2) {
   [0]=>
index 7cd8a8cf7a170ce955db333efb0de573caca6d6a..cf792bfa19a56612a0669bee23dd1d51e33f3853 100644 (file)
@@ -3,12 +3,6 @@ array_walk() tests
 --FILE--
 <?php
 
-var_dump(array_walk());
-$var = 1;
-var_dump(array_walk($var,1));
-$var = array();
-var_dump(array_walk($var,""));
-
 function foo($v1, $v2, $v3) {
        var_dump($v1);
        var_dump($v2);
@@ -31,14 +25,6 @@ try {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
 int(1)
 int(0)
 string(4) "data"
index 0a5d8545828ea740f2876bb8d27c8ea6cafe8abc..7ac62d7484a74558eeab082811c76e38da7b61fe 100644 (file)
@@ -3,14 +3,6 @@ array_walk() closure tests
 --FILE--
 <?php
 
-var_dump(array_walk());
-
-$ar = false;
-var_dump(array_walk($ar, $ar));
-
-$ar = NULL;
-var_dump(array_walk($ar, $ar));
-
 $ar = ["one" => 1, "two"=>2, "three" => 3];
 var_dump(array_walk($ar, function(){ var_dump(func_get_args());}));
 
@@ -94,14 +86,6 @@ try {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
 array(2) {
   [0]=>
   int(1)
index a4026180fbf7bfb482f1cb0544c2df2a73ced042..73445892a6dd29fcc3a454a46bd78076f3ca1b71 100644 (file)
@@ -61,7 +61,5 @@ Exception: Too few arguments to function callback2(), 3 passed and exactly 4 exp
 Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
 Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
 -- Testing array_walk() function with too many callback parameters --
-
-Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
+Exception: array_walk() expects at most 3 parameters, 4 given
 Done
index fc04304fc5e1c3081e491d0cbd8a78cd8e414d7a..9f3ac8c1cd668f970dab6157dbad56080c03b513 100644 (file)
@@ -24,7 +24,11 @@ array_walk($t, "walk");
 $var = array();
 array_walk($var, "walk");
 $var = "";
-array_walk($var, "walk");
+try {
+    array_walk($var, "walk");
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
@@ -39,6 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro"
 string(14) "test_protected"
 string(7) "var_pub"
 string(11) "test_public"
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
+array_walk() expects parameter 1 to be array, string given
 Done
index a83c227a3bf9c5d6b8cdf2deeb0561c2a127c227..097143e8ecd5a9c66effe2b1f5f00a0e0f161f98 100644 (file)
@@ -24,7 +24,11 @@ array_walk_recursive($t, "walk");
 $var = array();
 array_walk_recursive($var, "walk");
 $var = "";
-array_walk_recursive($var, "walk");
+try {
+    array_walk_recursive($var, "walk");
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
@@ -39,6 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro"
 string(14) "test_protected"
 string(7) "var_pub"
 string(11) "test_public"
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
+array_walk_recursive() expects parameter 1 to be array, string given
 Done
index 962f133e4c3d2ece8178d5afed79ed5920fc1985..f952b4410b8a0dbb579bb770f2c91485469fd9c2 100644 (file)
@@ -3,12 +3,6 @@ array_walk_recursive() tests
 --FILE--
 <?php
 
-var_dump(array_walk_recursive());
-$var = 1;
-var_dump(array_walk_recursive($var,1));
-$var = array();
-var_dump(array_walk_recursive($var,""));
-
 function foo($v1, $v2, $v3) {
        var_dump($v1);
        var_dump($v2);
@@ -31,14 +25,6 @@ try {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
 int(1)
 int(0)
 string(4) "data"
index b162a1c9dcde296f7e0ebbe1f421c09834f737a0..e9bd7ea1758d0ab010dcc9cdd3c49b550bfc6ef0 100644 (file)
@@ -61,7 +61,5 @@ Exception: Too few arguments to function callback2(), 3 passed and exactly 4 exp
 Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
 Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
 -- Testing array_walk_recursive() function with too many callback parameters --
-
-Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
-NULL
+Exception: array_walk_recursive() expects at most 3 parameters, 4 given
 Done
index 06dc1aaa090a370633649fb94d2ab94c5a5ac62e..a0c159d71d15195bebb4b984142fb7a2fae3c66b 100644 (file)
@@ -29,9 +29,6 @@ var_dump( array_walk_recursive($input, function($value, $key) { var_dump($key);
 echo "-- Anonymous function with three arguments --\n";
 var_dump( array_walk_recursive($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 10));
 
-echo "-- Anonymous function with one more argument --\n";
-var_dump( array_walk_recursive($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 20, 30));
-
 echo "-- Anonymous function with null argument --\n";
 var_dump( array_walk_recursive( $input, function() { echo "1\n"; }));
 echo "Done"
@@ -80,10 +77,6 @@ int(0)
 int(10)
 
 bool(true)
--- Anonymous function with one more argument --
-
-Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
-NULL
 -- Anonymous function with null argument --
 1
 1
index 2db8067fe0962a71a4ed5319df343c4ac579c99a..51eba1e0e0e10d3137d1726b2fd151881cbac72d 100644 (file)
@@ -25,7 +25,11 @@ echo "-- With 'min' built-in function --\n";
 var_dump( array_walk_recursive($input, "min"));
 
 echo "-- With 'echo' language construct --\n";
-var_dump( array_walk_recursive($input, "echo"));
+try {
+    var_dump( array_walk_recursive($input, "echo"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done"
 ?>
@@ -36,7 +40,5 @@ bool(true)
 -- With 'min' built-in function --
 bool(true)
 -- With 'echo' language construct --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name
 Done
index 671ad44309c5f34fa629875be5eecd24d34bdb83..0354782eda1047643a1213815ff7f054e174160b 100644 (file)
@@ -29,9 +29,6 @@ var_dump( array_walk($input, function($value, $key) { var_dump($key); var_dump($
 echo "-- Anonymous function with three arguments --\n";
 var_dump( array_walk($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 10));
 
-echo "-- Anonymous function with one more argument --\n";
-var_dump( array_walk($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 20, 30));
-
 echo "-- Anonymous function with null argument --\n";
 var_dump( array_walk( $input, function() { echo "1\n"; }));
 echo "Done"
@@ -80,10 +77,6 @@ int(0)
 int(10)
 
 bool(true)
--- Anonymous function with one more argument --
-
-Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
 -- Anonymous function with null argument --
 1
 1
index 829baf1add2d79ce1f6b0d4b89ad75497e774e0b..baa5f3914bbcd7da90ee8b44ca21df080ba9a7b6 100644 (file)
@@ -25,7 +25,11 @@ echo "-- With 'min' built-in function --\n";
 var_dump( array_walk($input, "min"));
 
 echo "-- With 'echo' language construct --\n";
-var_dump( array_walk($input, "echo"));
+try {
+    var_dump( array_walk($input, "echo"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done"
 ?>
@@ -36,7 +40,5 @@ bool(true)
 -- With 'min' built-in function --
 bool(true)
 -- With 'echo' language construct --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name
 Done
index f858bf107b7c7560f5576dbb547939c8b4cd1954..b674590fd66922c8debaf16cf666ff5303bc6bd4 100644 (file)
@@ -7,7 +7,6 @@ precision=14
 --FILE--
 <?php
 $tests = array(
-       'foo',
        array(),
        array(0),
        array(3),
@@ -22,9 +21,7 @@ foreach ($tests as $v) {
        var_dump(array_product($v));
 }
 ?>
---EXPECTF--
-Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
-NULL
+--EXPECT--
 int(1)
 int(0)
 int(3)
index 5caf48c6ee4ce0ee4d7c12b13296600e43cae61a..3b3d29b5be18ebf6bf49f0c7d40eec245a32fa49 100644 (file)
@@ -7,7 +7,6 @@ precision=14
 --FILE--
 <?php
 $tests = array(
-       'foo',
        array(),
        array(0),
        array(3),
@@ -22,9 +21,7 @@ foreach ($tests as $v) {
        var_dump(array_product($v));
 }
 ?>
---EXPECTF--
-Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
-NULL
+--EXPECT--
 int(1)
 int(0)
 int(3)
index f5e439821db06d1bdbbd6b5431f6eda1a01feafd..b94e7093640600c40d2d0561ae6da74796a9bfef 100644 (file)
@@ -8,12 +8,14 @@ $arrObj->append('foo');
 $arrObj->append('bar');
 $arrObj->append('foo');
 
-$arr = array_unique($arrObj);
-var_dump($arr);
+try {
+    $arr = array_unique($arrObj);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: array_unique() expects parameter 1 to be array, object given in %s on line %d
-NULL
+--EXPECT--
+array_unique() expects parameter 1 to be array, object given
 Done
index 6d81c16621de58a0c9620d73f4fe3a37befc95c7..1fd2e8e6cafced228113f94009cdc3f43885d483 100644 (file)
@@ -111,16 +111,6 @@ for( $i =0; $i < count( $mode_arr ); $i++) {
   var_dump(count($arr, $mode_arr[$i]));
 }
 
-
-echo "\n-- Testing error conditions --";
-var_dump( count() );  // No. of args = 0
-var_dump( count(array(), COUNT_NORMAL, 100) );  // No. of args > expected
-
-/* Testing Invalid type arguments */
-var_dump( count("string", "ABCD") );
-var_dump( count(100, "string") );
-var_dump( count(array(), "") );
-
 echo "\nDone";
 
 /* closing the resource handles */
@@ -230,20 +220,4 @@ For mode '1' count is => int(9)
 For mode '' count is => int(3)
 For mode '' count is => int(3)
 
--- Testing error conditions --
-Warning: count() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: count() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: count() expects parameter 2 to be int, %s given in %s on line %d
-NULL
-
-Warning: count() expects parameter 2 to be int, %s given in %s on line %d
-NULL
-
-Warning: count() expects parameter 2 to be int, %s given in %s on line %d
-NULL
-
 Done
index dc3f2eb75e8f1d135ee93fb6d4d71a64e26d7a01..496b6c9566c9a5eb66cef0db47795580cd97f83d 100644 (file)
@@ -106,21 +106,6 @@ $resources = array($file_handle, $dir_handle);
 var_dump( end($resources) );
 var_dump( current($resources) );
 
-echo "\n*** Testing error conditions ***\n";
-/* checking for unexpected number of arguments */
-var_dump( end() );
-var_dump( end($array[0], $array[0]) );
-
-/* checking for unexpected type of arguments */
-$var=1;
-$var1="string";
-var_dump( end($var) );
-var_dump( end($var1) );
-
-/* checking null array */
-$null_array = array();
-var_dump( end($null_array) );
-
 echo "Done\n";
 
 
@@ -219,19 +204,4 @@ array(2) {
 *** Testing end() on resource type ***
 resource(%d) of type (stream)
 resource(%d) of type (stream)
-
-*** Testing error conditions ***
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-bool(false)
 Done
index 0af5064e8215b975fc41e6c20c3f380b4a446827..55f0d2e53b3e7dac86be3ee17084ae67fcf457a9 100644 (file)
@@ -106,21 +106,6 @@ $resources = array($file_handle, $dir_handle);
 var_dump( end($resources) );
 var_dump( current($resources) );
 
-echo "\n*** Testing error conditions ***\n";
-/* checking for unexpected number of arguments */
-var_dump( end() );
-var_dump( end($array[0], $array[0]) );
-
-/* checking for unexpected type of arguments */
-$var=1;
-$var1="string";
-var_dump( end($var) );
-var_dump( end($var1) );
-
-/* checking null array */
-$null_array = array();
-var_dump( end($null_array) );
-
 echo "Done\n";
 
 ?>
@@ -218,19 +203,4 @@ array(2) {
 *** Testing end() on resource type ***
 resource(%d) of type (stream)
 resource(%d) of type (stream)
-
-*** Testing error conditions ***
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-bool(false)
 Done
index e8bcf8f5d8d87abd404f016e7ab7a48d6656164b..08e1824b0fb301416e7007bf34b2a6bf5ffd7ead 100644 (file)
@@ -6,25 +6,11 @@ Test extract() function (error conditions)
 /* Testing Error Conditions */
 echo "*** Testing Error Conditions ***\n";
 
-/* Zero Arguments */
-var_dump( extract() );
-
 /* Invalid second argument ( only 0-6 is valid) */
 $arr = array(1);
 var_dump( extract($arr, -1 . "wddr") );
 var_dump( extract($arr, 7 , "wddr") );
 
-/* scalar argument */
-$val = 1;
-var_dump( extract($val) );
-
-/* string argument */
-$str = "test";
-var_dump( extract($str) );
-
-/* More than valid number of arguments i.e. 3 args */
-var_dump( extract($arr, EXTR_SKIP, "aa", "ee") );
-
 /* Two Arguments, second as prefix but without prefix string as third argument */
 var_dump( extract($arr,EXTR_PREFIX_IF_EXISTS) );
 
@@ -33,9 +19,6 @@ echo "Done\n";
 --EXPECTF--
 *** Testing Error Conditions ***
 
-Warning: extract() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Notice: A non well formed numeric value encountered in %s on line %d
 
 Warning: extract(): Invalid extract type in %s on line %d
@@ -44,15 +27,6 @@ NULL
 Warning: extract(): Invalid extract type in %s on line %d
 NULL
 
-Warning: extract() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: extract() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: extract() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 Warning: extract(): specified extract type requires the prefix parameter in %s on line %d
 NULL
 Done
index f07d1dea8999ea68ce4fc91df6cc84a614bd954c..0b58990041852738ce2df598fee2a9b65e394e39 100644 (file)
@@ -36,9 +36,17 @@ class in_array_check {
 
 $in_array_obj = new in_array_check();  //creating new object
 //error: as wrong datatype for second argument
-var_dump( in_array("array_var", $in_array_obj) );
+try {
+    var_dump( in_array("array_var", $in_array_obj) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 //error: as wrong datatype for second argument
-var_dump( in_array("foo", $in_array_obj) );
+try {
+    var_dump( in_array("foo", $in_array_obj) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 //element found as "one" exists in array $array_var
 var_dump( in_array("one", $in_array_obj->array_var) );
 
@@ -51,11 +59,7 @@ bool(true)
 bool(true)
 
 *** Testing objects with in_array() ***
-
-Warning: in_array() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: in_array() expects parameter 2 to be array, object given in %s on line %d
-NULL
+in_array() expects parameter 2 to be array, object given
+in_array() expects parameter 2 to be array, object given
 bool(true)
 Done
index ae4f304eae8bc8d17cd1e4a88eb374f1c114c636..df471ef25594527dd4e9ec06247a09f45dee7044 100644 (file)
@@ -5,7 +5,6 @@ precision=14
 --FILE--
 <?php
 
-var_dump(max());
 var_dump(max(1));
 var_dump(max(array()));
 var_dump(max(new stdclass));
@@ -20,16 +19,13 @@ var_dump(max(0, true, false, true));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: max() expects at least 1 parameter, 0 given in %s on line 3
+Warning: max(): When only one parameter is given, it must be an array in %s on line %d
 NULL
 
-Warning: max(): When only one parameter is given, it must be an array in %s on line 4
-NULL
-
-Warning: max(): Array must contain at least one element in %s on line 5
+Warning: max(): Array must contain at least one element in %s on line %d
 bool(false)
 
-Warning: max(): When only one parameter is given, it must be an array in %s on line 6
+Warning: max(): When only one parameter is given, it must be an array in %s on line %d
 NULL
 int(2)
 float(2.11)
index cb8c7cfdcae5d3d5a5d9215835edcf9984b288a6..031e9b2c96b00a66be6431af547a4d9a78eb1041 100644 (file)
@@ -5,7 +5,6 @@ precision=14
 --FILE--
 <?php
 
-var_dump(min());
 var_dump(min(1));
 var_dump(min(array()));
 var_dump(min(new stdclass));
@@ -20,16 +19,13 @@ var_dump(min(0, true, false, true));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: min() expects at least 1 parameter, 0 given in %s on line 3
+Warning: min(): When only one parameter is given, it must be an array in %s on line %d
 NULL
 
-Warning: min(): When only one parameter is given, it must be an array in %s on line 4
-NULL
-
-Warning: min(): Array must contain at least one element in %s on line 5
+Warning: min(): Array must contain at least one element in %s on line %d
 bool(false)
 
-Warning: min(): When only one parameter is given, it must be an array in %s on line 6
+Warning: min(): When only one parameter is given, it must be an array in %s on line %d
 NULL
 int(1)
 float(2.09)
index b63e9874bf0bfb36ab47439b5aeef45090d88fc4..3a3b2bdf606052ad6e8896397eff9ed8ab4533a8 100644 (file)
@@ -21,10 +21,7 @@ var_dump( range(1.0, 7.0, 6.5) );
 echo "\n\n-- Testing ( (low > high) && (low-high < step) ) --";
 var_dump( range(7.0, 1.0, 6.5) );
 
-echo "\n-- Testing Invalid number of arguments --";
-var_dump( range() );  // No.of args = 0
-var_dump( range(1) );  // No.of args < expected
-var_dump( range(1,2,3,4) );  // No.of args > expected
+echo "\n-- Testing other conditions --";
 var_dump( range(-1, -2, 2) );
 var_dump( range("a", "j", "z") );
 var_dump( range(0, 1, "140962482048819216326.24") );
@@ -67,16 +64,7 @@ bool(false)
 Warning: range(): step exceeds the specified range in %s on line %d
 bool(false)
 
--- Testing Invalid number of arguments --
-Warning: range() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: range() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: range() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
-
+-- Testing other conditions --
 Warning: range(): step exceeds the specified range in %s on line %d
 bool(false)
 
index 2bb2b465125795ce9d4f696428aa77ba350c62d6..d27cd569c009bf8473797ce07581ceed849ba507 100644 (file)
@@ -10,7 +10,6 @@ Test uasort() function : usage variations - built-in function as 'cmp_function'
 /*
 * Passing different built-in library functions in place of 'cmp_function'
 *   valid comparison functions: strcmp() & strcasecmp()
-*   language constructs:  echo & exit
 */
 
 echo "*** Testing uasort() : built in function as 'cmp_function' ***\n";
@@ -28,13 +27,6 @@ echo "-- Testing uasort() with built-in 'cmp_function': strcmp() --\n";
 var_dump( uasort($array_arg, 'strcmp') );  // expecting: bool(true)
 var_dump($array_arg);
 
-// Testing with language construct as comparison function
-echo "-- Testing uasort() with language construct as 'cmp_function' --\n";
-var_dump( uasort($languageConstruct_fun_arg, 'echo') );  // expecting: bool(false)
-
-echo "-- Testing uasort() with language construct as 'cmp_function' --\n";
-var_dump( uasort($languageConstruct_fun_arg, 'exit') );  // expecting: bool(false)
-
 echo "Done"
 ?>
 --EXPECTF--
@@ -67,12 +59,4 @@ array(5) {
   ["o"]=>
   string(6) "orange"
 }
--- Testing uasort() with language construct as 'cmp_function' --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
--- Testing uasort() with language construct as 'cmp_function' --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
 Done
index 3296c4a36ab05bd8691aa153c5934a480176aba7..98c303e0833075f54085a660fb5261ce71829a0d 100644 (file)
@@ -30,14 +30,6 @@ $temp_array2 = $array_arg;
 var_dump( usort($temp_array2, 'strcmp') );
 var_dump($temp_array2);
 
-// Testing with language construct as comparison function
-echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
-$temp_array3 = $array_arg;
-var_dump( usort($temp_array3, 'echo') );
-
-echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
-$temp_array4 = $array_arg;
-var_dump( usort($temp_array4, 'exit') );
 ?>
 ===DONE===
 --EXPECTF--
@@ -72,14 +64,4 @@ array(5) {
   [4]=>
   string(6) "orange"
 }
-
--- Testing usort() with language construct as 'cmp_function' --
-
-Warning: usort() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-
--- Testing usort() with language construct as 'cmp_function' --
-
-Warning: usort() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
 ===DONE===
index f20aaf8e2b3709419597e9a8b5983cd8f527ab83..35f7668ce18d74249e94df3754876147b0359098 100644 (file)
@@ -11,17 +11,8 @@ assert.bail = 0
 assert_options(ASSERT_ACTIVE, 0);
 assert(1);
 
-
 /* Wrong parameter count in assert */
 assert_options(ASSERT_ACTIVE, 1);
-assert(2, "failure", 3);
-
-/* Wrong parameter count in assert_options */
-assert_options(ASSERT_ACTIVE, 0, 2);
-
-/* Wrong parameter name in assert_options */
-$test="ASSERT_FRED";
-assert_options($test, 1);
 
 /* Assert false */
 assert(0);
@@ -35,12 +26,6 @@ echo "not reached\n";
 
 ?>
 --EXPECTF--
-Warning: assert() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: assert_options() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: assert_options() expects parameter 1 to be int, string given in %s on line %d
-
 Warning: assert(): assert(0) failed in %s on line %d
 
 Warning: assert(): assert(0) failed in %s on line %d
index 217a5c61f995490204ff2a9e2f686b53a55ff738..7a2f4712da0ac5d3290bc5e3ba88d9a894b6340c 100644 (file)
@@ -10,19 +10,8 @@ Test property_exists() function : error conditions
 
 echo "*** Testing property_exists() : error conditions ***\n";
 
-$object_or_class = "obj";
-$property_name = 'string_val';
-$extra_arg = 10;
-
-
-echo "\n-- Testing property_exists() function with more than expected no. of arguments --\n";
-var_dump( property_exists($object_or_class, $property_name, $extra_arg) );
-
-
-echo "\n-- Testing property_exists() function with less than expected no. of arguments --\n";
-var_dump( property_exists($object_or_class) );
-
 echo "\n-- Testing property_exists() function with incorrect arguments --\n";
+$property_name = 'string_val';
 var_dump( property_exists(10, $property_name) );
 
 ?>
@@ -30,16 +19,6 @@ var_dump( property_exists(10, $property_name) );
 --EXPECTF--
 *** Testing property_exists() : error conditions ***
 
--- Testing property_exists() function with more than expected no. of arguments --
-
-Warning: property_exists() expects exactly 2 parameters, 3 given in %sproperty_exists_error.php on line %d
-NULL
-
--- Testing property_exists() function with less than expected no. of arguments --
-
-Warning: property_exists() expects exactly 2 parameters, 1 given in %sproperty_exists_error.php on line %d
-NULL
-
 -- Testing property_exists() function with incorrect arguments --
 
 Warning: First parameter must either be an object or the name of an existing class in %sproperty_exists_error.php on line %d
diff --git a/ext/standard/tests/dir/closedir_error-win32-mb.phpt b/ext/standard/tests/dir/closedir_error-win32-mb.phpt
deleted file mode 100644 (file)
index e5ca80b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-Test closedir() function : error conditions - Pass incorrect number of arguments
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-  die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype  : void closedir([resource $dir_handle])
- * Description: Close directory connection identified by the dir_handle
- * Source code: ext/standard/dir.c
- * Alias to functions: close
- */
-
-/*
- * Pass incorrect number of arguments to closedir() to test behaviour
- */
-
-echo "*** Testing closedir() : error conditions ***\n";
-
-
-//Test closedir with one more than the expected number of arguments
-echo "\n-- Testing closedir() function with more than expected no. of arguments --\n";
-
-$dir_path = dirname(__FILE__) . '\私はガラスを食べられますclosedir_error';
-mkdir($dir_path);
-$dir_handle = opendir($dir_path);
-
-$extra_arg = 10;
-var_dump( closedir($dir_handle, $extra_arg) );
-
-//successfully close the directory handle so can delete in CLEAN section
-closedir($dir_handle);
-?>
-===DONE===
---CLEAN--
-<?php
-$base_dir = dirname(__FILE__);
-$dir_path = $base_dir . '\私はガラスを食べられますclosedir_error';
-rmdir($dir_path);
-?>
---EXPECTF--
-*** Testing closedir() : error conditions ***
-
--- Testing closedir() function with more than expected no. of arguments --
-
-Warning: closedir() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt
deleted file mode 100644 (file)
index ffb0284..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test scandir() function : usage variations - diff data types as $context arg
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-  die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
- * Description: List files & directories inside the specified path
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass different data types as $context argument to test how scandir() behaves
- */
-
-echo "*** Testing scandir() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation3';
-mkdir($dir);
-$sorting_order = SCANDIR_SORT_ASCENDING;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
-  public function __toString() {
-    return "Class A object";
-  }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $context argument
-$inputs = array(
-
-       // int data
-/*1*/  0,
-       1,
-       12345,
-       -2345,
-
-       // float data
-/*5*/  10.5,
-       -10.5,
-       12.3456789000e10,
-       12.3456789000E-10,
-       .5,
-
-       // null data
-/*10*/ NULL,
-       null,
-
-       // boolean data
-/*12*/ true,
-       false,
-       TRUE,
-       FALSE,
-
-       // empty data
-/*16*/ "",
-       '',
-       array(),
-
-       // string data
-/*19*/ "string",
-       'string',
-       $heredoc,
-
-       // object data
-/*22*/ new classA(),
-
-       // undefined data
-/*23*/ @$undefined_var,
-
-       // unset data
-/*24*/ @$unset_var,
-
-       // resource variable
-/*25*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of scandir()
-$iterator = 1;
-foreach($inputs as $input) {
-  echo "\n-- Iteration $iterator --\n";
-  var_dump( scandir($dir, $sorting_order, $input) );
-  $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---CLEAN--
-<?php
-$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation3';
-rmdir($dir);
-?>
---EXPECTF--
-*** Testing scandir() : usage variations ***
-
--- Iteration 1 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: scandir() expects parameter 3 to be resource, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: scandir() expects parameter 3 to be resource, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: scandir(): supplied resource is not a valid Stream-Context resource in %s on line %d
-array(2) {
-  [0]=>
-  string(1) "."
-  [1]=>
-  string(2) ".."
-}
-===DONE===
index cba61d3fbf97fd5506de4cafff070d07f5d3b797..ed68c2a7d77a296803bcc62c65c44163cf7f8976 100644 (file)
@@ -21,12 +21,6 @@ var_dump($d->read());
 var_dump($d->rewind());
 var_dump($d->close());
 
-echo "\n--> Try all methods with wrong number of args:\n";
-$d = new Directory($d);
-var_dump($d->read(1,2));
-var_dump($d->rewind(1,2));
-var_dump($d->close(1,2));
-
 ?>
 --CLEAN--
 <?php
@@ -56,14 +50,3 @@ bool(false)
 
 Warning: Directory::close(): Unable to find my handle property in %s on line %d
 bool(false)
-
---> Try all methods with wrong number of args:
-
-Warning: Directory::read() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::rewind() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::close() expects at most 1 parameter, 2 given in %s on line %d
-NULL
index 5b2771eef6cbcabf95d36058be0417661f19100c..0a693dd9b75aaa12a1b7479a4f5fc9b38a49b193 100644 (file)
@@ -17,12 +17,6 @@ var_dump($d->read());
 var_dump($d->rewind());
 var_dump($d->close());
 
-echo "\n--> Try all methods with wrong number of args:\n";
-$d = new Directory(getcwd());
-var_dump($d->read(1,2));
-var_dump($d->rewind(1,2));
-var_dump($d->close(1,2));
-
 ?>
 --EXPECTF--
 --> Try all methods with bad handle:
@@ -46,14 +40,3 @@ bool(false)
 
 Warning: Directory::close(): Unable to find my handle property in %s on line %d
 bool(false)
-
---> Try all methods with wrong number of args:
-
-Warning: Directory::read() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::rewind() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::close() expects at most 1 parameter, 2 given in %s on line %d
-NULL
index e3ce551b3de9403db96936249ade505fad0f4c26..bc2bf3f9784b3b241149a7bc52eef0a47ccd838a 100644 (file)
@@ -29,31 +29,6 @@ var_dump( filemtime("/no/such/file/or/dir") );
 var_dump( filectime("/no/such/file/or/dir") );
 var_dump( touch("/no/such/file/or/dir", 10) );
 
-/* Only one invalid argument */
-var_dump( fileatime(__FILE__, "string") );
-var_dump( filemtime(__FILE__, 100) );
-var_dump( filectime(__FILE__, TRUE) );
-var_dump( touch(__FILE__, 10, 100, 123) );
-
-echo "\n-- Testing No.of arguments less than expected --";
-var_dump( fileatime() );
-var_dump( filemtime() );
-var_dump( filectime() );
-var_dump( touch() );
-
-echo "\n-- Testing No.of arguments greater than expected --";
-/* Both invalid arguments */
-var_dump( fileatime("/no/such/file/or/dir", "string") );
-var_dump( filemtime("/no/such/file/or/dir", 100) );
-var_dump( filectime("/no/such/file/or/dir", TRUE) );
-var_dump( touch("/no/such/file/or/dir", 10, 100, 123) );
-
-/* Only one invalid argument */
-var_dump( fileatime(__FILE__, "string") );
-var_dump( filemtime(__FILE__, 100) );
-var_dump( filectime(__FILE__, TRUE) );
-var_dump( touch(__FILE__, 10, 100, 123) );
-
 echo "\nDone";
 ?>
 --EXPECTF--
@@ -72,54 +47,4 @@ bool(false)
 Warning: touch(): Unable to create file /no/such/file/or/dir because No such file or directory in %s on line %d
 bool(false)
 
-Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing No.of arguments less than expected --
-Warning: fileatime() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: touch() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing No.of arguments greater than expected --
-Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 Done
index c35eba21287a28c4524a9ebcb338296b1fcdca34..e3bdda1b52dda5ebad10b80e1d1331d4b9fa29ec 100644 (file)
@@ -46,19 +46,6 @@ var_dump( chmod("/no/such/file/dir", 0777) );
 var_dump( fileperms("/no/such/file/dir") );
 echo "\n";
 
-/* With args less than expected */
-$fp = fopen(dirname(__FILE__)."/006_error.tmp", "w");
-fclose($fp);
-var_dump( chmod(dirname(__FILE__)."/006_error.tmp") );
-var_dump( chmod("nofile") );
-var_dump( chmod() );
-var_dump( fileperms() );
-
-/* With args greater than expected */
-var_dump( chmod(dirname(__FILE__)."/006_error.tmp", 0755, TRUE) );
-var_dump( fileperms(dirname(__FILE__)."/006_error.tmp", 0777) );
-var_dump( fileperms("nofile", 0777) );
-
 echo "\n*** Done ***\n";
 ?>
 --CLEAN--
@@ -83,25 +70,4 @@ Warning: fileperms(): stat failed for /no/such/file/dir in %s on line %d
 bool(false)
 
 
-Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: chmod() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: fileperms() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Done ***
index 19bbf60fe9aa9b53434937bb752daa3f6372d324..cf81a83ea08d792b89d046e32c0439ca23fcce67 100644 (file)
@@ -68,15 +68,23 @@ $perms_array = array(
 $count = 1;
 foreach($perms_array as $permission) {
   echo "-- Iteration $count --\n";
-  var_dump( chmod($file_name, $permission) );
-  printf("%o", fileperms($file_name) );
-  echo "\n";
-  clearstatcache();
-
-  var_dump( chmod($dir_name, $permission) );
-  printf("%o", fileperms($dir_name) );
-  echo "\n";
-  clearstatcache();
+  try {
+    var_dump( chmod($file_name, $permission) );
+    printf("%o", fileperms($file_name) );
+    echo "\n";
+    clearstatcache();
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
+
+  try {
+    var_dump( chmod($dir_name, $permission) );
+    printf("%o", fileperms($dir_name) );
+    echo "\n";
+    clearstatcache();
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $count++;
 }
 echo "*** Done ***\n";
@@ -148,39 +156,15 @@ bool(true)
 bool(true)
 43567
 -- Iteration 12 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
 -- Iteration 13 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
 -- Iteration 14 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
 -- Iteration 15 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
 *** Done ***
diff --git a/ext/standard/tests/file/007_error.phpt b/ext/standard/tests/file/007_error.phpt
deleted file mode 100644 (file)
index 93a6a23..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test fopen, fclose() & feof() functions: error conditions
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/*
- Prototype: resource fopen(string $filename, string $mode
-                            [, bool $use_include_path [, resource $context]] );
- Description: Opens file or URL.
-
- Prototype: bool fclose ( resource $handle );
- Description: Closes an open file pointer
-
- Prototype: bool feof ( resource $handle )
- Description: Returns TRUE if the file pointer is at EOF or an error occurs
-   (including socket timeout); otherwise returns FALSE.
-*/
-
-echo "*** Testing error conditions for fopen(), fclsoe() & feof() ***\n";
-/* Arguments less than minimum no.of args */
-
-// fopen ()
-var_dump(fopen(__FILE__)); // one valid argument
-var_dump(fopen());  // zero argument
-
-// fclose()
-$fp = fopen(__FILE__, "r");
-fclose($fp);
-var_dump( fclose($fp) ); // closed handle
-var_dump( fclose(__FILE__) ); // invalid handle
-var_dump( fclose() ); // zero argument
-
-//feof()
-var_dump( feof($fp) );  // closed handle
-var_dump( feof(__FILE__) );  // invalid handle
-var_dump( feof() );  //zero argument
-
-/* Arguments greater than maximum no.of ags */
-var_dump(fopen(__FILE__, "r", TRUE, "www.example.com", 100));
-
-$fp = fopen(__FILE__, "r");
-var_dump( fclose($fp, "handle") );
-
-var_dump( feof($fp, "handle"));
-fclose($fp);
-
-/* test invalid arguments : non-resources */
-echo "-- Testing fopen(), fclose() & feof() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-  NULL,
-  ""
-);
-
-/* loop to test fclose with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( fopen($invalid_args[$loop_counter - 1], "r") );
-  var_dump( fclose($invalid_args[$loop_counter - 1]) );
-  var_dump( feof($invalid_args[$loop_counter - 1]) );
-}
-
-?>
---EXPECTF--
-*** Testing error conditions for fopen(), fclsoe() & feof() ***
-
-Warning: fopen() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: fopen() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: fclose(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: fclose() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: feof() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: fopen() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-
-Warning: fclose() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: feof() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
--- Testing fopen(), fclose() & feof() with invalid arguments --
--- Iteration 1 --
-
-Warning: fopen(string): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fopen(10): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fopen(10.5): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fopen(1): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fopen() expects parameter 1 to be a valid path, array given in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fopen() expects parameter 1 to be a valid path, object given in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: fopen(): Filename cannot be empty in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: fopen(): Filename cannot be empty in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
index 996b060ceac002b8fe0ef3e67d2b73ab3408cf2b..703861dec708235941e20335b78a42c0dc6ecad1 100644 (file)
@@ -115,23 +115,6 @@ check_basename( $file_paths );
 echo "\n*** Testing possible variations in path and suffix ***\n";
 check_basename( $file_path_variations );
 
-echo "\n*** Testing error conditions ***\n";
-// zero arguments
-var_dump( basename() );
-
-// more than expected no. of arguments
-var_dump( basename("\\blah\\tmp\\bar.zip", ".zip", ".zip") );
-
-// passing invalid type arguments
-$object = new stdclass;
-var_dump( basename( array("string\\bar") ) );
-var_dump( basename( array("string\\bar"), "bar" ) );
-var_dump( basename( "bar", array("string\\bar") ) );
-var_dump( basename( $object, "bar" ) );
-var_dump( basename( $object ) );
-var_dump( basename( $object, $object ) );
-var_dump( basename( "bar", $object ) );
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -309,33 +292,4 @@ string(0) ""
 
 --Iteration 32--
 string(0) ""
-
-*** Testing error conditions ***
-
-Warning: basename() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: basename() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 2 to be string, object given in %s on line %d
-NULL
 Done
index a9b4389b5a512da4956067baa4f7d9824f8ea6a8..8352f4da4b62d4bd6339a22a85b1905291097901 100644 (file)
Binary files a/ext/standard/tests/file/basename.phpt and b/ext/standard/tests/file/basename.phpt differ
index 5460203e056ddbc1c72d4308f4d7433fb83c8cfd..174e349b15fd3ea2639f5bc8d3cd8155bdb63e73 100644 (file)
@@ -7,16 +7,11 @@ Andrew van der Stock, vanderaj @ owasp.org
 
 $filename = __FILE__ . chr(0). ".ridiculous";
 
-if (file_exists($filename)) {
-    echo "FAIL\n";
-}
-else {
-    echo "PASS\n";
+try {
+    var_dump(file_exists($filename));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
 }
 ?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d
-PASS
-===DONE===
+--EXPECT--
+file_exists() expects parameter 1 to be a valid path, string given
index 3b234c741ff0876afd5cd7c05d006f7f7fc018c7..b7999aa03dcd6a37a9f5e34a86087ea1d8c2db12 100644 (file)
@@ -10,19 +10,6 @@ Test chmod() function : error conditions
 
 echo "*** Testing chmod() : error conditions ***\n";
 
-
-//Test chmod with one more than the expected number of arguments
-echo "\n-- Testing chmod() function with more than expected no. of arguments --\n";
-$filename = 'string_val';
-$mode = 10;
-$extra_arg = 10;
-var_dump( chmod($filename, $mode, $extra_arg) );
-
-// Testing chmod with one less than the expected number of arguments
-echo "\n-- Testing chmod() function with less than expected no. of arguments --\n";
-$filename = 'string_val';
-var_dump( chmod($filename) );
-
 // testing chmod with a non-existing file
 $filename = "___nonExisitingFile___";
 var_dump(chmod($filename, 0777));
@@ -32,16 +19,6 @@ var_dump(chmod($filename, 0777));
 --EXPECTF--
 *** Testing chmod() : error conditions ***
 
--- Testing chmod() function with more than expected no. of arguments --
-
-Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
--- Testing chmod() function with less than expected no. of arguments --
-
-Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: chmod(): No such file or directory in %s on line %d
 bool(false)
 ===DONE===
index 2d6395167b3386ae9b7136b7a90346afddc1b39b..36eb58fc2a5475de2dbaefa3861868f425572fc6 100644 (file)
@@ -11,13 +11,6 @@ echo "*** Testing copy() function: error conditions --\n";
 /* Invalid args */
 var_dump( copy("/no/file", "file") );
 
-/* No.of args less than expected */
-var_dump( copy() );
-var_dump( copy(__FILE__) );
-
-/* No.of args less than expected */
-var_dump( copy(__FILE__, "file1", "file1") );
-
 echo "*** Done ***\n";
 ?>
 --EXPECTF--
@@ -25,13 +18,4 @@ echo "*** Done ***\n";
 
 Warning: copy(/no/file): failed to open stream: No such file or directory in %s on line %d
 bool(false)
-
-Warning: copy() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: copy() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: copy() expects parameter 3 to be resource, string given in %s on line %d
-NULL
 *** Done ***
index 3c3abea05a1ab00456237f73a3da4ae12e59f4e9..8a2f8972fcdc3767bed2270b20a96f85ded9c892 100644 (file)
Binary files a/ext/standard/tests/file/copy_variation4.phpt and b/ext/standard/tests/file/copy_variation4.phpt differ
index a048af6ccbf611f047155ce3477a95a447ebd4c0..fe415535ba48f5959521a4deacdaa60282f0a604 100644 (file)
@@ -11,9 +11,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 --FILE--
 <?php
 
-var_dump(disk_free_space());
-var_dump(disk_total_space());
-
 var_dump(disk_free_space(-1));
 var_dump(disk_total_space(-1));
 
@@ -26,12 +23,6 @@ var_dump(disk_total_space("/some/path/here"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: disk_free_space(): No such file or directory in %s on line %d
 bool(false)
 
index acb0fdd717a2857bd287db3a76fc809085c09dbf..35140d23fb5b7e8c562e24b00ac7cfd3ce102257 100644 (file)
@@ -16,12 +16,6 @@ if(substr(PHP_OS, 0, 3) != 'WIN' )
 
 echo "*** Testing error conditions ***\n";
 $file_path = dirname(__FILE__);
-var_dump( disk_free_space() ); // Zero Arguments
-var_dump( diskfreespace() );
-
-var_dump( disk_free_space( $file_path, "extra argument") ); // More than valid number of arguments
-var_dump( diskfreespace( $file_path, "extra argument") );
-
 
 var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory
 var_dump( diskfreespace( $file_path."/dir1" ));
@@ -43,18 +37,6 @@ unlink($file_path."/disk_free_space.tmp");
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: disk_free_space(): The system cannot find the path specified.
  in %s on line %d
 bool(false)
index 6433cde7029e955f7ad9f15358b65d76febb62f8..00ec271f8d89a2387452010c0a4cad7b4d84d2e0 100644 (file)
@@ -16,12 +16,6 @@ if(substr(PHP_OS, 0, 3) == 'WIN')
 
 echo "*** Testing error conditions ***\n";
 $file_path = dirname(__FILE__);
-var_dump( disk_free_space() ); // Zero Arguments
-var_dump( diskfreespace() );
-
-var_dump( disk_free_space( $file_path, "extra argument") ); // More than valid number of arguments
-var_dump( diskfreespace( $file_path, "extra argument") );
-
 
 var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory
 var_dump( diskfreespace( $file_path."/dir1" ));
@@ -43,18 +37,6 @@ unlink($file_path."/disk_free_space.tmp");
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: disk_free_space(): No such file or directory in %s on line %d
 bool(false)
 
index 6c6575d8965f1461384ea6cb491f4c00b29fc6c2..912648f1007b456bce6f7a82c2fed70e0e47fe4f 100644 (file)
@@ -48,8 +48,16 @@ $count = 1;
 /* loop through to test each element the above array */
 foreach($dirs_arr as $dir1) {
   echo "\n-- Iteration $count --\n";
-  var_dump( disk_free_space( $dir1 ) );
-  var_dump( diskfreespace( $dir1 ) );
+  try {
+    var_dump( disk_free_space( $dir1 ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
+  try {
+    var_dump( diskfreespace( $dir1 ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $count++;
 }
 
@@ -102,35 +110,19 @@ float(%d)
 float(%d)
 
 -- Iteration 9 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
 
 -- Iteration 10 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
 
 -- Iteration 11 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
 
 -- Iteration 12 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
 
 --- Done ---
index 0d511b37a7f8667cae2f316ecea2a89d12649ebd..29462bb31c8fe9783b2dd90aaca635a9a6a56b6c 100644 (file)
@@ -16,10 +16,6 @@ if(substr(PHP_OS, 0, 3) != 'WIN' )
 
 echo "*** Testing error conditions ***\n";
 $file_path = dirname(__FILE__);
-var_dump( disk_total_space() ); // Zero Arguments
-
-var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments
-
 
 var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory
 
@@ -38,12 +34,6 @@ unlink($file_path."/disk_total_space.tmp");
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_total_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: disk_total_space(): The system cannot find the path specified.
  in %s on line %d
 bool(false)
index 2c8a940117dfea5b07bb00a90db61a6916b1ae57..b50472708939f194326cb3a9c6c83e7c6fc7be69 100644 (file)
@@ -16,10 +16,6 @@ if(substr(PHP_OS, 0, 3) == 'WIN')
 
 echo "*** Testing error conditions ***\n";
 $file_path = dirname(__FILE__);
-var_dump( disk_total_space() ); // Zero Arguments
-
-var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments
-
 
 var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory
 
@@ -38,12 +34,6 @@ unlink($file_path."/disk_total_space.tmp");
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_total_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: disk_total_space(): No such file or directory in %s on line %d
 bool(false)
 float(%d)
index 071fa607492c2e6374f461e3e6c102d5063f58b6..89c47dcaba32489b53ecf0200d699989cb1dce85 100644 (file)
@@ -49,7 +49,11 @@ $count = 1;
 /* loop through to test each element the above array */
 foreach($dirs_arr as $dir1) {
   echo "\n-- Iteration $count --\n";
-  var_dump( disk_total_space( $dir1 ) );
+  try {
+    var_dump( disk_total_space( $dir1 ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $count++;
 }
 
@@ -96,25 +100,17 @@ float(%d)
 float(%d)
 
 -- Iteration 9 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
 
 -- Iteration 10 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
 
 -- Iteration 11 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
 
 -- Iteration 12 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
 *** Testing with Binary Input ***
-float(%d)
+float(%s)
 
 --- Done ---
index d444209af4291d5ee28e0a5779cac8f837b5c106..dd0dbb2096dd23b260d1bd692ca5baf8524f0a82 100644 (file)
@@ -26,15 +26,6 @@ fclose($file_handle);
 // read from closed file
 var_dump( fgetc($file_handle) );
 
-echo "-- Testing fgetc() with unset handle --\n";
-// open the file for reading
-$file_handle = fopen(__FILE__, "r");
-// unset the file handle
-unset($file_handle);
-
-//fgetc using unset handle
-var_dump( fgetc($file_handle) );
-
 echo "Done";
 ?>
 --EXPECTF--
@@ -43,10 +34,4 @@ echo "Done";
 
 Warning: fgetc(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
--- Testing fgetc() with unset handle --
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgetc() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 919343aa87505d40ecbae979926d307c3f8fd15f..eed35b30015e28e7fd698e6de8a33532e8cf839c 100644 (file)
@@ -8,14 +8,8 @@ Test fgets() function : error conditions
 */
 
 echo "*** Testing error conditions ***\n";
-// zero argument
-echo "-- Testing fgets() with zero argument --\n";
-var_dump( fgets() );
 
-// more than expected no. of args
-echo "-- Testing fgets() with more than expected number of arguments --\n";
 $fp = fopen(__FILE__, "r");
-var_dump( fgets($fp, 10, $fp) );
 
 // invalid length argument
 echo "-- Testing fgets() with invalid length arguments --\n";
@@ -26,45 +20,10 @@ var_dump( fgets($fp, $len) );
 $len = 1;
 var_dump( fgets($fp, $len) ); // return length - 1 always, expect false
 
-
-// test invalid arguments : non-resources
-echo "-- Testing fgets() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-);
-/* loop to test fgets() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( fgets($invalid_args[$loop_counter - 1], 10) );
-}
-
-// fgets() on a file handle which is already closed
-echo "-- Testing fgets() with closed/unset file handle --";
-fclose($fp);
-var_dump(fgets($fp,10));
-
-// fgets() on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( fgets(@$file_handle,10));
-
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing error conditions ***
--- Testing fgets() with zero argument --
-
-Warning: fgets() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing fgets() with more than expected number of arguments --
-
-Warning: fgets() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
 -- Testing fgets() with invalid length arguments --
 
 Warning: fgets(): Length parameter must be greater than 0 in %s on line %d
@@ -73,35 +32,4 @@ bool(false)
 Warning: fgets(): Length parameter must be greater than 0 in %s on line %d
 bool(false)
 bool(false)
--- Testing fgets() with invalid arguments --
--- Iteration 1 --
-
-Warning: fgets() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fgets() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fgets() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fgets() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fgets() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fgets() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Testing fgets() with closed/unset file handle --
-Warning: fgets(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 0bbcf220391b92e5d7d474f5e8ce6f336345ccbe..aa8beb2d4def10eec957b0165ad99a3df5e6453e 100644 (file)
@@ -27,16 +27,6 @@ fclose($file_handle);
 var_dump( fgets($file_handle) ); // default length
 var_dump( fgets($file_handle, 10) ); // with specific length
 
-echo "-- Testing fgets() with unset handle --\n";
-// open the file for reading
-$file_handle = fopen(__FILE__, "r");
-// unset the file handle
-unset($file_handle);
-
-//fgets using unset handle
-var_dump( fgets($file_handle) ); // default length
-var_dump( fgets($file_handle, 10) ); // with specific length
-
 echo "Done";
 ?>
 --EXPECTF--
@@ -48,15 +38,4 @@ bool(false)
 
 Warning: fgets(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
--- Testing fgets() with unset handle --
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 12148189e8282a958aaf982c895e9a12f97acfa7..2efacd1b31ac28d03c9a0f6b6f2c6ac04b722894 100644 (file)
@@ -8,14 +8,10 @@ Test file() function : error conditions
                 Returns the  file in an array
 */
 $file_path = dirname(__FILE__);
-echo "\n*** Testing error conditions ***";
+echo "\n*** Testing error conditions ***\n";
 $file_handle = fopen($file_path."/file.tmp", "w");
-var_dump( file() );  // Zero No. of args
 
 $filename = $file_path."/file.tmp";
-var_dump( file($filename, $filename, $filename, $filename) );  // more than expected number of arguments
-
-var_dump( file($filename, "INCORRECT_FLAG", NULL) );  //  Incorrect flag
 var_dump( file($filename, 10, NULL) );  //  Incorrect flag
 
 var_dump( file("temp.tmp") );  // non existing filename
@@ -30,14 +26,6 @@ unlink($file_path."/file.tmp");
 ?>
 --EXPECTF--
 *** Testing error conditions ***
-Warning: file() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: file() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: file() expects parameter 2 to be int, string given in %s on line %d
-NULL
 array(0) {
 }
 
index f06628f5161fc5bcd2ff33150e1969c4fc8153d1..6677d7886633013cdcd40411ba87369dca33fbfd 100644 (file)
@@ -17,14 +17,8 @@ include($file_path."/file.inc");
 echo "\n-- Testing with  Non-existing file --\n";
 print( file_get_contents("/no/such/file/or/dir") );
 
-echo "\n-- Testing No.of arguments less than expected --\n";
-print( file_get_contents() );
-
-echo "\n-- Testing No.of arguments greater than expected --\n";
-
 create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte");
 $file_handle = fopen($file_path."/file_put_contents_error.tmp", "w");
-print( file_get_contents($file_path."/file1.tmp", false, $file_handle, 1, 2, "extra_argument") );
 
 echo "\n-- Testing for invalid negative maxlen values --";
 var_dump( file_get_contents($file_path."/file1.tmp", FALSE, $file_handle, 0, -5) );
@@ -52,14 +46,6 @@ if(file_exists($file_path."/file_put_contents1.tmp")) {
 
 Warning: file_get_contents(/no/such/file/or/dir): failed to open stream: No such file or directory in %s on line %d
 
--- Testing No.of arguments less than expected --
-
-Warning: file_get_contents() expects at least 1 parameter, 0 given in %s on line %d
-
--- Testing No.of arguments greater than expected --
-
-Warning: file_get_contents() expects at most 5 parameters, 6 given in %s on line %d
-
 -- Testing for invalid negative maxlen values --
 Warning: file_get_contents(): length must be greater than or equal to zero in %s on line %d
 bool(false)
index b2a09798e311b84dcbaac7742793b8b71a4550f2..23c33b60d3566b98b2696b7735b1d6abaab7ebe3 100644 (file)
@@ -18,15 +18,7 @@ $file_path = dirname(__FILE__);
 echo "\n-- Testing with  Non-existing file --\n";
 print( file_get_contents("/no/such/file/or/dir") );
 
-echo "\n-- Testing No.of arguments less than expected --\n";
-print( file_get_contents() );
-print( file_put_contents() );
-print( file_put_contents($file_path."/".__FILE__) );
-
 $file_handle = fopen($file_path."/file_put_contents.tmp", "w");
-echo "\n-- Testing No.of arguments greater than expected --\n";
-print( file_put_contents("abc.tmp", 12345, 1, $file_handle, "extra_argument") );
-print( file_get_contents("abc.tmp", false, $file_handle, 1, 2, "extra_argument") );
 
 echo "\n-- Testing for invalid negative maxlen values --";
 file_put_contents($file_path."/file_put_contents1.tmp", "Garbage data in the file");
@@ -50,20 +42,6 @@ unlink($file_path."/file_put_contents1.tmp");
 
 Warning: file_get_contents(/no/such/file/or/dir): failed to open stream: No such file or directory in %s on line %d
 
--- Testing No.of arguments less than expected --
-
-Warning: file_get_contents() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: file_put_contents() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: file_put_contents() expects at least 2 parameters, 1 given in %s on line %d
-
--- Testing No.of arguments greater than expected --
-
-Warning: file_put_contents() expects at most 4 parameters, 5 given in %s on line %d
-
-Warning: file_get_contents() expects at most 5 parameters, 6 given in %s on line %d
-
 -- Testing for invalid negative maxlen values --
 Warning: file_get_contents(): length must be greater than or equal to zero in %s on line %d
 bool(false)
index 4928404098fe19002f2f1ac07d7f933ccaf85e37..25060ea0cf0808080666d17f5b68f3c0fec7eea1 100644 (file)
@@ -38,7 +38,11 @@ $names_arr = array(
 
 foreach($names_arr as $key =>$value) {
   echo "\n-- Filename: $key --\n";
-  var_dump(file_get_contents($value));
+  try {
+    var_dump(file_get_contents($value));
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
 }
 
 ?>
@@ -77,14 +81,10 @@ Warning: file_get_contents( ): failed to open stream: Permission denied in %s on
 bool(false)
 
 -- Filename: \0 --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, string given
 
 -- Filename: array() --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, array given
 
 -- Filename: /no/such/file/dir --
 
index 97a3495d5439b188bdf06ecb370bdc00261d6eda..f826ad60c222550b304af5c42531b7ee3a354b03 100644 (file)
@@ -37,7 +37,11 @@ $names_arr = array(
 
 for( $i=0; $i<count($names_arr); $i++ ) {
   echo "-- Iteration $i --\n";
-  var_dump(file_get_contents($names_arr[$i]));
+  try {
+    var_dump(file_get_contents($names_arr[$i]));
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
 }
 
 echo "\n*** Done ***\n";
@@ -69,13 +73,9 @@ bool(false)
 Warning: file_get_contents( ): failed to open stream: No such file or directory in %s on line %d
 bool(false)
 -- Iteration 6 --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, string given
 -- Iteration 7 --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, array given
 -- Iteration 8 --
 
 Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d
index 095980b53627c74c1bd6e6ebdf7d835abbfe1f2d..4c03581c48397f56195708e5a6d57a3b5f3ceb63 100644 (file)
@@ -35,14 +35,18 @@ $names_arr = array(
 );
 
 foreach($names_arr as $key =>$value) {
-      echo "\n-- Filename: $key --\n";
-      $res = file_put_contents($value, "Some data");
-         if ($res !== false && $res != null) {
-        echo "$res bytes written to: $value\n";
-        unlink($value);
-         } else {
-         echo "Failed to write data to: $key\n";
-      }
+  echo "\n-- Filename: $key --\n";
+  try {
+    $res = file_put_contents($value, "Some data");
+    if ($res !== false && $res != null) {
+       echo "$res bytes written to: $value\n";
+       unlink($value);
+    } else {
+       echo "Failed to write data to: $key\n";
+    }
+  } catch (TypeError $e) {
+      echo $e->getMessage(), "\n";
+  }
 };
 
 ?>
@@ -77,14 +81,10 @@ Warning: file_put_contents( ): failed to open stream: Permission denied in %s on
 Failed to write data to: " "
 
 -- Filename: \0 --
-
-Warning: file_put_contents() expects parameter 1 to be a valid path, string given in %s on line %d
-Failed to write data to: \0
+file_put_contents() expects parameter 1 to be a valid path, string given
 
 -- Filename: array() --
-
-Warning: file_put_contents() expects parameter 1 to be a valid path, array given in %s on line %d
-Failed to write data to: array()
+file_put_contents() expects parameter 1 to be a valid path, array given
 
 -- Filename: /no/such/file/dir --
 
index 4aef0644f9339ac9e4a84fc56f99672fc18f83df..76b7b6f5c6fcc3eb1cfc799147eb2fd70cadb7ef 100644 (file)
Binary files a/ext/standard/tests/file/file_put_contents_variation8.phpt and b/ext/standard/tests/file/file_put_contents_variation8.phpt differ
index e32711cd5beae939f7d31ae7f7a52a3df9d02d57..e602f3441fd2651589bd860f9f04e5cf915a96c3 100644 (file)
@@ -15,10 +15,6 @@ var_dump( filegroup("/no/such/file/dir") );
 var_dump( filegroup("string") );
 var_dump( filegroup(100) );
 
-/* Invalid no.of arguments */
-var_dump( filegroup() );  // args < expected
-var_dump( filegroup("/no/such/file", "root") );  // args > expected
-
 echo "\n*** Done ***\n";
 ?>
 --EXPECTF--
@@ -33,10 +29,4 @@ bool(false)
 Warning: filegroup(): stat failed for 100 in %s on line %d
 bool(false)
 
-Warning: filegroup() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filegroup() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Done ***
index 809d61ba73794feca91718b75e62d3704a08457d..46a3dc9f35860a19c37d0432893561e7beba841a 100644 (file)
@@ -11,7 +11,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 /* Testing filegroup() with invalid arguments -int, float, bool, NULL, resource */
 
 $file_path = dirname(__FILE__);
-$file_handle = fopen($file_path."/filegroup_variation2.tmp", "w");
 
 echo "*** Testing Invalid file types ***\n";
 $filenames = array(
@@ -22,7 +21,6 @@ $filenames = array(
   TRUE,
   FALSE,
   NULL,
-  $file_handle,
 
   /* scalars */
   1234,
@@ -34,7 +32,6 @@ foreach( $filenames as $filename ) {
   var_dump( filegroup($filename) );
   clearstatcache();
 }
-fclose($file_handle);
 
 echo "\n*** Done ***";
 ?>
@@ -58,9 +55,6 @@ bool(false)
 bool(false)
 bool(false)
 
-Warning: filegroup() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
 Warning: filegroup(): stat failed for 1234 in %s on line %d
 bool(false)
 
index ebefeb7e3f24537dbe942ec4660e2d350a207b3d..a0d4b2fdeed31596c6d4ccb2861f25bfbaf70b16 100644 (file)
@@ -39,7 +39,11 @@ $count = 1;
 /* loop through to test each element in the above array */
 foreach($files_arr as $file) {
   echo "- Iteration $count -\n";
-  var_dump( filegroup( $file_path."/".$file ) );
+  try {
+    var_dump( filegroup( $file_path."/".$file ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   clearstatcache();
   $count++;
 }
@@ -74,12 +78,8 @@ bool(false)
 Warning: filegroup(): stat failed for %s/filegroup_variation3/filegroup*.tmp in %s on line %d
 bool(false)
 - Iteration 7 -
-
-Warning: filegroup() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+filegroup() expects parameter 1 to be a valid path, string given
 - Iteration 8 -
-
-Warning: filegroup() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+filegroup() expects parameter 1 to be a valid path, string given
 
 *** Done ***
index 462ab62367255a3cdbd65aa91a9c7e63ceec2e96..d080467f04bd0d7c39ec79bbaf5eb076eeda0857 100644 (file)
@@ -16,12 +16,6 @@ var_dump( fileinode("/no/such/file/dir") );
 var_dump( fileinode("string") );
 var_dump( fileinode(100) );
 
-/* No.of arguments less than expected */
-var_dump( fileinode() );
-
-/* No.of arguments greater than expected */
-var_dump( fileinode(__FILE__, "string") );
-
 echo "\n*** Done ***";
 --EXPECTF--
 *** Testing error conditions of fileinode() ***
@@ -34,10 +28,4 @@ bool(false)
 Warning: fileinode(): stat failed for 100 in %s on line 14
 bool(false)
 
-Warning: fileinode() expects exactly 1 parameter, 0 given in %s on line 17
-NULL
-
-Warning: fileinode() expects exactly 1 parameter, 2 given in %s on line 20
-NULL
-
 *** Done ***
index 90c7eb19e3b7733f42570f3a8ba4bb8762cfd817..d6397d33b81b5ffee40b9a68b06b972e85170d77 100644 (file)
@@ -12,7 +12,6 @@ Description: Returns the inode number of the file, or FALSE in case of an error.
 /* Testing fileinode() with invalid arguments -int, float, bool, NULL, resource */
 
 $file_path = dirname(__FILE__);
-$file_handle = fopen($file_path."/fileinode_variation2.tmp", "w");
 
 echo "*** Testing Invalid file types ***\n";
 $filenames = array(
@@ -23,7 +22,6 @@ $filenames = array(
   TRUE,
   FALSE,
   NULL,
-  $file_handle,
 
   /* scalars */
   1234,
@@ -35,7 +33,6 @@ foreach( $filenames as $filename ) {
   var_dump( fileinode($filename) );
   clearstatcache();
 }
-fclose($file_handle);
 
 echo "\n*** Done ***";
 ?>
@@ -59,9 +56,6 @@ bool(false)
 bool(false)
 bool(false)
 
-Warning: fileinode() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
 Warning: fileinode(): stat failed for 1234 in %s on line %d
 bool(false)
 
index 2f51e8f595a09bcb0dec040be675db15e3e9d025..e50fcfb76759e4612f039f17f2ffce86f220b743 100644 (file)
@@ -40,7 +40,11 @@ $count = 1;
 /* loop through to test each element in the above array */
 foreach($files_arr as $file) {
   echo "- Iteration $count -\n";
-  var_dump( fileinode( $file_path."/".$file ) );
+  try {
+    var_dump( fileinode( $file_path."/".$file ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   clearstatcache();
   $count++;
 }
@@ -75,12 +79,8 @@ bool(false)
 Warning: fileinode(): stat failed for %s/fileinode_variation3/fileinode*.tmp in %s on line %d
 bool(false)
 - Iteration 7 -
-
-Warning: fileinode() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileinode() expects parameter 1 to be a valid path, string given
 - Iteration 8 -
-
-Warning: fileinode() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileinode() expects parameter 1 to be a valid path, string given
 
 *** Done ***
index 967a541cc0a869792c1973a477eb851c71835dfa..807c09f0f0f295eaf440f83fd2f1f77c5af8d592 100644 (file)
@@ -15,10 +15,6 @@ var_dump( fileowner("/no/such/file/dir") );
 var_dump( fileowner("string") );
 var_dump( fileowner(100) );
 
-/* Invalid no.of arguments */
-var_dump( fileowner() );  // args < expected
-var_dump( fileowner("/no/such/file", "root") );  // args > expected
-
 echo "\n*** Done ***\n";
 ?>
 --EXPECTF--
@@ -33,10 +29,4 @@ bool(false)
 Warning: fileowner(): stat failed for 100 in %s on line %d
 bool(false)
 
-Warning: fileowner() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: fileowner() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Done ***
index 131d43bfaa7385e89b2d1d676742787b8611b0ef..f6741cb9ca2b5e04e467b38ed58f4481158c895a 100644 (file)
@@ -12,7 +12,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 /* Testing fileowner() with invalid arguments -int, float, bool, NULL, resource */
 
 $file_path = dirname(__FILE__);
-$file_handle = fopen($file_path."/fileowner_variation2.tmp", "w");
 
 echo "*** Testing Invalid file types ***\n";
 $filenames = array(
@@ -23,7 +22,6 @@ $filenames = array(
   TRUE,
   FALSE,
   NULL,
-  $file_handle,
 
   /* scalars */
   1234,
@@ -35,7 +33,6 @@ foreach( $filenames as $filename ) {
   var_dump( fileowner($filename) );
   clearstatcache();
 }
-fclose($file_handle);
 
 echo "\n*** Done ***";
 ?>
@@ -59,9 +56,6 @@ bool(false)
 bool(false)
 bool(false)
 
-Warning: fileowner() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
 Warning: fileowner(): stat failed for 1234 in %s on line %d
 bool(false)
 
index 5768f528f1b9826f129b2e69c4b30eda0e561b9d..6a2953aa6c1aad25890fb00c5d77e9439497adcd 100644 (file)
@@ -40,7 +40,11 @@ $count = 1;
 /* loop through to test each element in the above array */
 foreach($files_arr as $file) {
   echo "- Iteration $count -\n";
-  var_dump( fileowner( $file_path."/".$file ) );
+  try {
+    var_dump( fileowner( $file_path."/".$file ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   clearstatcache();
   $count++;
 }
@@ -75,12 +79,8 @@ bool(false)
 Warning: fileowner(): stat failed for %s/fileowner_variation3/fileowner*.tmp in %s on line %d
 bool(false)
 - Iteration 7 -
-
-Warning: fileowner() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileowner() expects parameter 1 to be a valid path, string given
 - Iteration 8 -
-
-Warning: fileowner() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileowner() expects parameter 1 to be a valid path, string given
 
 *** Done ***
index 6b1778e74e7f801285101138e4eca1c0502980ee..b2b8a198590ca28a9a7f5da8d4996ae9d94193df 100644 (file)
@@ -11,7 +11,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 /* Testing fileperms() with invalid arguments -int, float, bool, NULL, resource */
 
 $file_path = dirname(__FILE__);
-$file_handle = fopen($file_path."/fileperms_variation2.tmp", "w");
 
 echo "*** Testing Invalid file types ***\n";
 $filenames = array(
@@ -22,7 +21,6 @@ $filenames = array(
   TRUE,
   FALSE,
   NULL,
-  $file_handle,
 
   /* scalars */
   1234,
@@ -34,7 +32,6 @@ foreach( $filenames as $filename ) {
   var_dump( fileperms($filename) );
   clearstatcache();
 }
-fclose($file_handle);
 
 echo "\n*** Done ***";
 ?>
@@ -58,9 +55,6 @@ bool(false)
 bool(false)
 bool(false)
 
-Warning: fileperms() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
 Warning: fileperms(): stat failed for 1234 in %s on line %d
 bool(false)
 
index 6ae97d1601be4215d67cfd727c16ca4ba3d3d234..5b1160019ad65118aaa22a4fb1fde0b2b76dc526 100644 (file)
@@ -39,7 +39,11 @@ $count = 1;
 /* loop through to test each element in the above array */
 foreach($files_arr as $file) {
   echo "- Iteration $count -\n";
-  var_dump( fileperms( $file_path."/".$file ) );
+  try {
+    var_dump( fileperms( $file_path."/".$file ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   clearstatcache();
   $count++;
 }
@@ -74,12 +78,8 @@ bool(false)
 Warning: fileperms(): stat failed for %s/fileperms_variation3/fileperms*.tmp in %s on line %d
 bool(false)
 - Iteration 7 -
-
-Warning: fileperms() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileperms() expects parameter 1 to be a valid path, string given
 - Iteration 8 -
-
-Warning: fileperms() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileperms() expects parameter 1 to be a valid path, string given
 
 *** Done ***
index 9f721ff9211a7c855d4e1b9269019479b35c2cc4..5ad8ee99ca13858e457c9e3940e029d30aaba9e0 100644 (file)
@@ -14,13 +14,6 @@ echo "*** Testing filesize(): error conditions ***";
 var_dump( filesize("/no/such/file") );
 var_dump( filesize("/no/such/dir") );
 
-/* No.of arguments less than expected */
-var_dump( filesize() );
-
-/* No.of arguments greater than expected */
-var_dump( filesize(__FILE__, 2000) );
-echo "\n";
-
 echo "*** Done ***\n";
 ?>
 --EXPECTF--
@@ -30,11 +23,4 @@ bool(false)
 
 Warning: filesize(): stat failed for /no/such/dir in %s on line %d
 bool(false)
-
-Warning: filesize() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filesize() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Done ***
index b49a5286c67706796e873fe5e235d6d7ac5718ad..a34671d9b06e56670f7de367fe1e94064ff3196c 100644 (file)
@@ -16,12 +16,6 @@ print( filetype("/no/such/file/dir") );
 print( filetype("string") );
 print( filetype(100) );
 
-/* No.of args less than expected */
-print( filetype() );
-
-/* No.of args greater than expected */
-print( filetype("file", "file") );
-
 echo "\n*** Done ***\n";
 ?>
 --EXPECTF--
@@ -32,8 +26,4 @@ Warning: filetype(): Lstat failed for string in %s on line %d
 
 Warning: filetype(): Lstat failed for 100 in %s on line %d
 
-Warning: filetype() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: filetype() expects exactly 1 parameter, 2 given in %s on line %d
-
 *** Done ***
index 2330270113536f2ac006cbc6a4f38253c0ff77df..4c3cb45c065e23859002d261720bf67d8e808845 100644 (file)
@@ -5,9 +5,6 @@ flock() tests
 
 $file = dirname(__FILE__)."/flock.dat";
 
-var_dump(flock());
-var_dump(flock("", "", $var));
-
 $fp = fopen($file, "w");
 fclose($fp);
 
@@ -41,12 +38,6 @@ $file = dirname(__FILE__)."/flock.dat";
 unlink($file);
 ?>
 --EXPECTF--
-Warning: flock() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: flock() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
 Warning: flock(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
 bool(true)
index ccb6274756995755fe635892107a3aa34a53823c..0e3f1d949c243e75a2403009ba7e35a6d68645ee 100644 (file)
@@ -29,7 +29,11 @@ $operations = array(
 $i = 0;
 foreach($operations as $operation) {
   echo "\n--- Iteration $i ---";
-  var_dump(flock($fp, $operation));
+  try {
+    var_dump(flock($fp, $operation));
+  } catch (TypeError $e) {
+    echo "\n", $e->getMessage(), "\n";
+  }
   $i++;
 }
 
@@ -39,15 +43,6 @@ $fp = fopen($file, "w");
 fclose($fp);
 var_dump(flock($fp, LOCK_SH|LOCK_NB));
 
-var_dump(flock("", "", $var));
-
-/* No.of args leass than expected */
-var_dump(flock());
-var_dump(flock($fp));
-
-/* No.of args greater than expected */
-var_dump(flock($fp, "", $var, ""));
-
 echo "\n*** Done ***\n";
 ?>
 --CLEAN--
@@ -75,38 +70,21 @@ Warning: flock(): Illegal operation argument in %s on line %d
 bool(false)
 
 --- Iteration 4 ---
-Warning: flock() expects parameter 2 to be int, array given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, array given
 
 --- Iteration 5 ---
-Warning: flock() expects parameter 2 to be int, array given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, array given
 
 --- Iteration 6 ---
-Warning: flock() expects parameter 2 to be int, string given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, string given
 
 --- Iteration 7 ---
-Warning: flock() expects parameter 2 to be int, string given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, string given
 
 --- Iteration 8 ---
-Warning: flock() expects parameter 2 to be int, string given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, string given
 
 Warning: flock(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
 
-Warning: flock() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Warning: flock() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: flock() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: flock() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 *** Done ***
index b3607be58b9c93c7739b7534c44139171cdde101..048eb1475c9be55e9be010e172352da976cf7dfc 100644 (file)
@@ -66,7 +66,11 @@ $pattern_arr = array(
 
 for( $i = 0; $i<count($pattern_arr); $i++ ) {
   echo "-- Iteration $i --\n";
-  var_dump( fnmatch($pattern_arr[$i], $file_name) );
+  try {
+    var_dump( fnmatch($pattern_arr[$i], $file_name) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
 }
 unlink($file_name);
 
@@ -78,7 +82,11 @@ function match( $pattern, $string ) {
   for( $i = 0; $i<count($pattern); $i++ ) {
     echo "-- Iteration $i --\n";
     for( $j = 0; $j<count($string); $j++ ) {
-    var_dump( fnmatch($pattern[$i], $string[$j]) );
+      try {
+        var_dump( fnmatch($pattern[$i], $string[$j]) );
+      } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+      }
     }
   }
 }
@@ -134,7 +142,7 @@ match($null_arr, $null_arr);
 
 echo "\n*** Done ***\n";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing fnmatch() with file and various patterns ***
 -- Iteration 0 --
 bool(true)
@@ -183,13 +191,9 @@ bool(false)
 -- Iteration 22 --
 bool(false)
 -- Iteration 23 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
 -- Iteration 24 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -263,84 +267,44 @@ bool(true)
 --- With Strings ---
 -- Iteration 0 --
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(true)
 -- Iteration 1 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
 -- Iteration 2 --
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(true)
 -- Iteration 3 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
 -- Iteration 4 --
 bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(true)
 bool(false)
 -- Iteration 5 --
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(true)
 
@@ -441,64 +405,42 @@ bool(true)
 bool(true)
 bool(true)
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(false)
 -- Iteration 1 --
 bool(true)
 bool(true)
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(false)
 -- Iteration 2 --
 bool(true)
 bool(true)
 bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(false)
 -- Iteration 3 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
 -- Iteration 4 --
 bool(false)
 bool(false)
 bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(true)
 bool(false)
 -- Iteration 5 --
 bool(false)
 bool(false)
 bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
 bool(false)
 bool(true)
 
index 1c4068cd972309902717878118ec2d2e599bb228..f51f24c7548e6c09ce80b36d52091c4048b54638 100644 (file)
@@ -14,14 +14,6 @@ echo "*** Testing error conditions ***\n";
 $filename = __FILE__;
 $file_handle = fopen($filename, "r");
 
-// zero argument
-echo "-- Testing fread() with zero argument --\n";
-var_dump( fread() );
-
-// more than expected no. of args
-echo "-- Testing fread() with more than expected number of arguments --\n";
-var_dump( fread($file_handle, 10, $file_handle) );
-
 // invalid length argument
 echo "-- Testing fread() with invalid length arguments --\n";
 $len = 0;
@@ -29,44 +21,9 @@ var_dump( fread($file_handle, $len) );
 $len = -10;
 var_dump( fread($file_handle, $len) );
 
-// test invalid arguments : non-resources
-echo "-- Testing fread() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-);
-/* loop to test fread() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( fread($invalid_args[$loop_counter - 1], 10) );
-}
-
-// fwrite() on a file handle which is already closed
-echo "-- Testing fwrite() with closed/unset file handle --\n";
-fclose($file_handle);
-var_dump( fread($file_handle,$file_content_type) );
-
-// fwrite on a file handle which is unset
-$fp = fopen($filename, "r");
-unset($fp); //unset file handle
-var_dump( fread(@$fp,10) );
-var_dump( fclose(@$fp) );
-
 echo "Done\n";
 --EXPECTF--
 *** Testing error conditions ***
--- Testing fread() with zero argument --
-
-Warning: fread() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
--- Testing fread() with more than expected number of arguments --
-
-Warning: fread() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
 -- Testing fread() with invalid length arguments --
 
 Warning: fread(): Length parameter must be greater than 0 in %s on line %d
@@ -74,41 +31,4 @@ bool(false)
 
 Warning: fread(): Length parameter must be greater than 0 in %s on line %d
 bool(false)
--- Testing fread() with invalid arguments --
--- Iteration 1 --
-
-Warning: fread() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fread() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fread() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fread() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fread() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fread() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Testing fwrite() with closed/unset file handle --
-
-Notice: Undefined variable: file_content_type in %s on line %d
-
-Warning: fread(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fread() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 6d3d0a5b961c1b504e6718d44535fb6ee5beedc9..7e40d20b4876a65aa42bdb75d5c3274df22d3be3 100644 (file)
@@ -5,10 +5,6 @@ fscanf() tests
 
 $filename = dirname(__FILE__)."/fscanf.dat";
 
-var_dump(fscanf());
-var_dump(fscanf(array()));
-var_dump(fscanf(array(), array()));
-
 file_put_contents($filename, "data");
 
 $fp = fopen($filename, "rt");
@@ -64,14 +60,6 @@ $filename = dirname(__FILE__)."/fscanf.dat";
 unlink($filename);
 ?>
 --EXPECTF--
-Warning: fscanf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: fscanf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: fscanf() expects parameter 1 to be resource, array given in %s on line %d
-NULL
 int(0)
 NULL
 int(1)
index 0da1fc69aafbb3ae4fb55f78b0246c14ad1bb737..d5b2ba73aa911f066ea7354a512380c9d6865e2c 100644 (file)
@@ -17,16 +17,6 @@ if ($file_handle == false)
 fwrite($file_handle, "hello world");
 fclose($file_handle);
 
-// zero argument
-var_dump( fscanf() );
-
-// single argument
-$file_handle = fopen($filename, 'r');
-if ($file_handle == false)
-  exit("Error:failed to open file $filename");
-var_dump( fscanf($file_handle) );
-fclose($file_handle);
-
 // invalid file handle
 var_dump( fscanf($file_handle, "%s") );
 
@@ -63,12 +53,6 @@ unlink($filename);
 --EXPECTF--
 *** Testing fscanf() for error conditions ***
 
-Warning: fscanf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: fscanf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: fscanf(): supplied resource is not a valid File-Handle resource in %s on line %d
 bool(false)
 
index 9c1b3a822d1f158ccc394cf491840f2e6a8c0ca7..c39b3bcbe57d8db8f5a9b24db6f8a8f34b9cffcc 100644 (file)
@@ -14,86 +14,18 @@ Test fseek(), ftell() & rewind() functions : error conditions - fseek()
 */
 
 echo "*** Testing fseek() : error conditions ***\n";
-// zero argument
-echo "-- Testing fseek() with zero argument --\n";
-var_dump( fseek() );
-
-// unexpected no. of args
-echo "-- Testing fseek() with unexpected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( fseek($fp) );
-var_dump( fseek($fp, 10, $fp,10) );
-
-// test invalid arguments : non-resources
-echo "-- Testing fseek() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass
-);
-/* loop to test fseek() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( fseek($invalid_args[$loop_counter - 1], 10) );
-}
 
 // fseek() on a file handle which is already closed
 echo "-- Testing fseek() with closed/unset file handle --";
+$fp = fopen(__FILE__, "r");
 fclose($fp);
 var_dump(fseek($fp,10));
 
-// fseek() on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( fseek(@$file_handle,10));
-
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing fseek() : error conditions ***
--- Testing fseek() with zero argument --
-
-Warning: fseek() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
--- Testing fseek() with unexpected number of arguments --
-
-Warning: fseek() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: fseek() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
--- Testing fseek() with invalid arguments --
--- Iteration 1 --
-
-Warning: fseek() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fseek() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fseek() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fseek() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fseek() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fseek() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
 -- Testing fseek() with closed/unset file handle --
 Warning: fseek(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
-
-Warning: fseek() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 8835046f6cd08a98b5b5ea0e2cfe767e4c6b8216..87f70b87172bf1b894cc9c658467b21348f28684 100644 (file)
@@ -14,82 +14,18 @@ Test fseek(), ftell() & rewind() functions : error conditions - ftell()
 */
 
 echo "*** Testing ftell() : error conditions ***\n";
-// zero argument
-echo "-- Testing ftell() with zero argument --\n";
-var_dump( ftell() );
-
-// more than expected no. of args
-echo "-- Testing ftell() with more than expected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( ftell($fp, 10) );
-
-// test invalid arguments : non-resources
-echo "-- Testing ftell() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-);
-/* loop to test ftell with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( ftell($invalid_args[$loop_counter - 1]) );
-}
 
 // ftell on a file handle which is already closed
 echo "-- Testing ftell with closed/unset file handle --";
+$fp = fopen(__FILE__, "r");
 fclose($fp);
 var_dump(ftell($fp));
 
-// ftell on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( ftell(@$file_handle) );
-
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing ftell() : error conditions ***
--- Testing ftell() with zero argument --
-
-Warning: ftell() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing ftell() with more than expected number of arguments --
-
-Warning: ftell() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
--- Testing ftell() with invalid arguments --
--- Iteration 1 --
-
-Warning: ftell() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: ftell() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: ftell() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: ftell() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: ftell() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: ftell() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
 -- Testing ftell with closed/unset file handle --
 Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
-
-Warning: ftell() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 0b94bcffc79077b98815757d4d899437f093abbb..edbb9e22f2e570a0234326f3fb97dd24dd6d4379 100644 (file)
@@ -14,82 +14,18 @@ Test fseek(), ftell() & rewind() functions : error conditions - rewind()
 */
 
 echo "*** Testing rewind() : error conditions ***\n";
-// zero argument
-echo "-- Testing rewind() with zero argument --\n";
-var_dump( rewind() );
-
-// more than expected no. of args
-echo "-- Testing rewind() with more than expected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( rewind($fp, 10) );
-
-// test invalid arguments : non-resources
-echo "-- Testing rewind() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-);
-/* loop to test rewind with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( rewind($invalid_args[$loop_counter - 1]) );
-}
 
 // rewind on a file handle which is already closed
 echo "-- Testing rewind() with closed/unset file handle --";
+$fp = fopen(__FILE__, "r");
 fclose($fp);
 var_dump(rewind($fp));
 
-// rewind on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( rewind(@$file_handle) );
-
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing rewind() : error conditions ***
--- Testing rewind() with zero argument --
-
-Warning: rewind() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing rewind() with more than expected number of arguments --
-
-Warning: rewind() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
--- Testing rewind() with invalid arguments --
--- Iteration 1 --
-
-Warning: rewind() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: rewind() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: rewind() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: rewind() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: rewind() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: rewind() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
 -- Testing rewind() with closed/unset file handle --
 Warning: rewind(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
-
-Warning: rewind() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index 3cb6db27f834ff8908583e711af2050646478750..ecbdeddf066fc307f16cc4a7a827464247ac4b59 100644 (file)
@@ -15,38 +15,6 @@ fwrite($file_handle, "Testing ftruncate error conditions \n");
 fflush($file_handle);
 echo "\n Initial file size = ".filesize($filename)."\n";
 
-echo "-- Testing ftruncate() with less than expected number of arguments --\n";
-
-// zero arguments
-var_dump( ftruncate() );
-
-// arguments less than expected numbers
-var_dump( ftruncate( $file_handle ) );
-// check the first size
-var_dump( filesize($filename) );
-
-echo "-- Testing ftruncate() with more than expected number of arguments --\n";
-// more than expected number of arguments
-var_dump( ftruncate($file_handle, 10, 20) );
-// check the first size
-var_dump( filesize($filename) );
-
-// test invalid arguments : non-resources
-echo "-- Testing ftruncate() with invalid file pointer --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-);
-/* loop to test ftruncate() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( ftruncate($invalid_args[$loop_counter - 1], 10) );
-}
-
 // ftruncate() on a file handle which is already closed/unset
 echo "-- Testing ftruncate() with closed/unset file handle --\n";
 
@@ -56,13 +24,6 @@ var_dump( ftruncate($file_handle,10) );
 // check the first size
 var_dump( filesize($filename) );
 
-// ftruncate on a file handle which is unset
-$fp = fopen($filename, "w");
-unset($fp); //unset file handle
-var_dump( ftruncate(@$fp,10));
-// check the first size
-var_dump( filesize($filename) );
-
 echo "Done\n";
 ?>
 --CLEAN--
@@ -74,51 +35,9 @@ unlink( $filename );
 *** Testing ftruncate() : error conditions ***
 
  Initial file size = 36
--- Testing ftruncate() with less than expected number of arguments --
-
-Warning: ftruncate() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ftruncate() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-int(36)
--- Testing ftruncate() with more than expected number of arguments --
-
-Warning: ftruncate() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-int(36)
--- Testing ftruncate() with invalid file pointer --
--- Iteration 1 --
-
-Warning: ftruncate() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: ftruncate() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: ftruncate() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: ftruncate() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: ftruncate() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: ftruncate() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
 -- Testing ftruncate() with closed/unset file handle --
 
 Warning: ftruncate(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
 int(36)
-
-Warning: ftruncate() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-int(36)
 Done
index 443710b99d0421da7581b8eff43fb003c2ac9a22..195d3afe771f70d7f485c8cc50e6fd87d56854e6 100644 (file)
@@ -6,8 +6,7 @@ fwrite() tests
 $filename = dirname(__FILE__)."/fwrite.dat";
 
 $fp = fopen($filename, "w");
-var_dump(fwrite($fp));
-var_dump(fwrite($fp, array()));
+var_dump(fwrite($fp, ""));
 fclose($fp);
 
 $fp = fopen($filename, "r");
@@ -20,33 +19,16 @@ fclose($fp);
 
 var_dump(fwrite($fp, "data", -1));
 
-var_dump(fwrite(array(), "data", -1));
-var_dump(fwrite(array(), "data"));
-var_dump(fwrite(array()));
-
 var_dump(file_get_contents($filename));
 
 @unlink($filename);
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+int(0)
 int(0)
 int(0)
 int(4)
 int(0)
-
-Warning: fwrite() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
 string(4) "data"
 Done
index f4f691be35322514ff2206bb9285ab465a326faf..a52d2dd0037c18270d3c538191e9de95c65e71d8 100644 (file)
@@ -16,18 +16,8 @@ include ("file.inc");
 echo "*** Testing fwrite() : error conditions ***\n";
 
 $filename = dirname(__FILE__)."/fwrite_error.tmp";
-
-echo "-- Testing fwrite() with less than expected number of arguments --\n";
-// zero argument
-var_dump( fwrite() );
-// less than expected, 1 arg
 $file_handle  = fopen ( $filename, "w");
-var_dump( fwrite($file_handle) );
-
-// more than expected no. of args
-echo "-- Testing fwrite() with more than expected number of arguments --\n";
 $data = "data";
-var_dump( fwrite($file_handle, $data, strlen($data), 10) );
 
 // invalid length argument
 echo "-- Testing fwrite() with invalid length arguments --\n";
@@ -36,32 +26,11 @@ var_dump( fwrite($file_handle, $data, $len) );
 $len = -10;
 var_dump( fwrite($file_handle, $data, $len) );
 
-// test invalid arguments : non-resources
-echo "-- Testing fwrite() with invalid arguments --\n";
-$invalid_args = array (
-  "string",
-  10,
-  10.5,
-  true,
-  array(1,2,3),
-  new stdclass,
-);
-/* loop to test fwrite() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
-  echo "-- Iteration $loop_counter --\n";
-  var_dump( fwrite($invalid_args[$loop_counter - 1], 10) );
-}
-
 // fwrite() on a file handle which is already closed
 echo "-- Testing fwrite() with closed/unset file handle --\n";
 fclose($file_handle);
 var_dump(fwrite($file_handle,"data"));
 
-// fwrite on a file handle which is unset
-$fp = fopen($filename, "w");
-unset($fp); //unset file handle
-var_dump( fwrite(@$fp,"data"));
-
 echo "Done\n";
 ?>
 --CLEAN--
@@ -71,50 +40,11 @@ unlink( $filename );
 ?>
 --EXPECTF--
 *** Testing fwrite() : error conditions ***
--- Testing fwrite() with less than expected number of arguments --
-
-Warning: fwrite() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
--- Testing fwrite() with more than expected number of arguments --
-
-Warning: fwrite() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
 -- Testing fwrite() with invalid length arguments --
 int(0)
 int(0)
--- Testing fwrite() with invalid arguments --
--- Iteration 1 --
-
-Warning: fwrite() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fwrite() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fwrite() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fwrite() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fwrite() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
 -- Testing fwrite() with closed/unset file handle --
 
 Warning: fwrite(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
-
-Warning: fwrite() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
 Done
index f23d2fabef58d95cacf9910f65c1aebcd4f7996f..04938e3d6b57f739294befefef7a269e02ffafbf 100644 (file)
@@ -3,13 +3,10 @@ get_current_user() tests
 --FILE--
 <?php
 
-var_dump(get_current_user("blah"));
 var_dump(get_current_user());
 
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: get_current_user() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 string(%d) %s
 Done
index cba2e2b34374d88a6a4b91ad975bb394d709de3e..8d1ae00c3447a0980739c59dcc0cc8e654f8657b 100644 (file)
@@ -46,12 +46,16 @@ $counter = 1;
    using glob() */
 foreach($patterns as $pattern) {
   echo "\n-- Iteration $counter --\n";
-  var_dump( glob($pattern) );  // default arguments
-  var_dump( glob($pattern, GLOB_MARK) );
-  var_dump( glob($pattern, GLOB_NOSORT) );
-  var_dump( glob($pattern, GLOB_NOCHECK) );
-  var_dump( glob($pattern, GLOB_NOESCAPE) );
-  var_dump( glob($pattern, GLOB_ERR) );
+  try {
+    var_dump( glob($pattern) );  // default arguments
+    var_dump( glob($pattern, GLOB_MARK) );
+    var_dump( glob($pattern, GLOB_NOSORT) );
+    var_dump( glob($pattern, GLOB_NOCHECK) );
+    var_dump( glob($pattern, GLOB_NOESCAPE) );
+    var_dump( glob($pattern, GLOB_ERR) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
 }
 
@@ -73,7 +77,11 @@ $counter = 1;
    using glob() */
 foreach($patterns as $pattern) {
   echo "-- Iteration $counter --\n";
-  var_dump( glob($pattern, GLOB_ONLYDIR) );
+  try {
+    var_dump( glob($pattern, GLOB_ONLYDIR) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
 }
 
@@ -326,24 +334,7 @@ array(0) {
 }
 
 -- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
 
 -- Iteration 9 --
 array(0) {
@@ -446,9 +437,7 @@ array(1) {
 array(0) {
 }
 -- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %sglob_variation-win32-mb.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
 -- Iteration 9 --
 array(0) {
 }
index 5027ac03e634d6c5dae2102497e3ce9feac37af8..2706377d8c743cd27311659c54d1d2eb46fb2304 100644 (file)
@@ -45,12 +45,16 @@ $counter = 1;
    using glob() */
 foreach($patterns as $pattern) {
   echo "\n-- Iteration $counter --\n";
-  var_dump( glob($pattern) );  // default arguments
-  var_dump( glob($pattern, GLOB_MARK) );
-  var_dump( glob($pattern, GLOB_NOSORT) );
-  var_dump( glob($pattern, GLOB_NOCHECK) );
-  var_dump( glob($pattern, GLOB_NOESCAPE) );
-  var_dump( glob($pattern, GLOB_ERR) );
+  try {
+    var_dump( glob($pattern) );  // default arguments
+    var_dump( glob($pattern, GLOB_MARK) );
+    var_dump( glob($pattern, GLOB_NOSORT) );
+    var_dump( glob($pattern, GLOB_NOCHECK) );
+    var_dump( glob($pattern, GLOB_NOESCAPE) );
+    var_dump( glob($pattern, GLOB_ERR) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
 }
 
@@ -72,7 +76,11 @@ $counter = 1;
    using glob() */
 foreach($patterns as $pattern) {
   echo "-- Iteration $counter --\n";
-  var_dump( glob($pattern, GLOB_ONLYDIR) );
+  try {
+    var_dump( glob($pattern, GLOB_ONLYDIR) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
 }
 
@@ -325,24 +333,7 @@ array(0) {
 }
 
 -- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
 
 -- Iteration 9 --
 array(0) {
@@ -445,9 +436,7 @@ array(1) {
 array(0) {
 }
 -- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %sglob_variation-win32.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
 -- Iteration 9 --
 array(0) {
 }
index 9d3b87937941340fdba1a1920b678560f5035747..3c20a49b31944a57d24e020db754b47cd5a59ab1 100644 (file)
@@ -48,12 +48,16 @@ $counter = 1;
    using glob() */
 foreach($patterns as $pattern) {
   echo "\n-- Iteration $counter --\n";
-  var_dump( glob($pattern) );  // default arguments
-  var_dump( glob($pattern, GLOB_MARK) );
-  var_dump( glob($pattern, GLOB_NOSORT) );
-  var_dump( glob($pattern, GLOB_NOCHECK) );
-  var_dump( glob($pattern, GLOB_NOESCAPE) );
-  var_dump( glob($pattern, GLOB_ERR) );
+  try {
+    var_dump( glob($pattern) );  // default arguments
+    var_dump( glob($pattern, GLOB_MARK) );
+    var_dump( glob($pattern, GLOB_NOSORT) );
+    var_dump( glob($pattern, GLOB_NOCHECK) );
+    var_dump( glob($pattern, GLOB_NOESCAPE) );
+    var_dump( glob($pattern, GLOB_ERR) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
 }
 
@@ -75,7 +79,11 @@ $counter = 1;
    using glob() */
 foreach($patterns as $pattern) {
   echo "-- Iteration $counter --\n";
-  var_dump( glob($pattern, GLOB_ONLYDIR) );
+  try {
+    var_dump( glob($pattern, GLOB_ONLYDIR) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
 }
 
@@ -328,24 +336,7 @@ array(0) {
 }
 
 -- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
 
 -- Iteration 9 --
 array(0) {
@@ -448,9 +439,7 @@ array(1) {
 array(0) {
 }
 -- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
 -- Iteration 9 --
 array(0) {
 }
index c1664165ebd690787d856a24d24c45e45fe914b4..060739ff3decb77c02e715715fc069e41c8c8369 100644 (file)
@@ -9,8 +9,6 @@ Test is_dir() function: usage variations - invalid arguments
 
 /* Passing invalid arguments to is_dir() */
 
-$dir_handle = opendir( dirname(__FILE__) );
-
 echo "*** Testing is_dir() with Invalid arguments: expected bool(false) ***\n";
 $dirnames = array(
   /* Invalid dirnames */
@@ -19,7 +17,6 @@ $dirnames = array(
   FALSE,
   NULL,
   " ",
-  $dir_handle,
 
   /* scalars */
   0,
@@ -30,7 +27,6 @@ $dirnames = array(
 foreach($dirnames as $dirname) {
   var_dump( is_dir($dirname) );
 }
-closedir($dir_handle);
 
 echo "\n*** Done ***";
 ?>
@@ -41,9 +37,6 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: is_dir() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
 bool(false)
 bool(false)
 
index 5c0be485c56aabd5dc0c0b6ac84bddf5bec1575f..3c3d0852ef50ddac4cc633329d8641c23ccfd2a4 100644 (file)
@@ -38,7 +38,11 @@ $count = 1;
 /* loop through to test each element the above array */
 foreach($dirs_arr as $dir) {
   echo "\n-- Iteration $count --\n";
-  var_dump( is_dir($file_path."/".$dir ) );
+  try {
+    var_dump( is_dir($file_path."/".$dir ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $count++;
 }
 
@@ -77,13 +81,9 @@ bool(true)
 bool(false)
 
 -- Iteration 9 --
-
-Warning: is_dir() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_dir() expects parameter 1 to be a valid path, string given
 
 -- Iteration 10 --
-
-Warning: is_dir() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_dir() expects parameter 1 to be a valid path, string given
 
 *** Done ***
index 4fb3dbaf5f7ac53b5e23895ac3e0fd6336172049..e4b43095e3f07fce6858cc6887ee3d35a8799476 100644 (file)
@@ -6,24 +6,11 @@ Test is_executable() function: error conditions
    Description: Tells whether the filename is executable
 */
 
-echo "*** Testing is_executable(): error conditions ***\n";
-var_dump( is_executable() );  // args < expected no of arguments
-
-var_dump( is_executable(1, 2) );  // args > expected no. of arguments
-
 echo "\n*** Testing is_exceutable() on non-existent directory ***\n";
 var_dump( is_executable(dirname(__FILE__)."/is_executable") );
 
 echo "Done\n";
 --EXPECTF--
-*** Testing is_executable(): error conditions ***
-
-Warning: is_executable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_executable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Testing is_exceutable() on non-existent directory ***
 bool(false)
 Done
index 1cd0a8d209ec60ebf07083741a44d63575c010de..784685705b8f74ed9d7268758bafb7bbd1721b76 100644 (file)
@@ -51,7 +51,11 @@ $counter = 1;
    is an executable file */
 foreach($files_arr as $file) {
   echo "-- Iteration $counter --\n";
-  var_dump( is_executable($file) );
+  try {
+    var_dump( is_executable($file) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
   clearstatcache();
 }
@@ -76,13 +80,9 @@ bool(false)
 -- Iteration 5 --
 bool(false)
 -- Iteration 6 --
-
-Warning: is_executable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_executable() expects parameter 1 to be a valid path, string given
 -- Iteration 7 --
-
-Warning: is_executable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_executable() expects parameter 1 to be a valid path, string given
 -- Iteration 8 --
 bool(false)
 -- Iteration 9 --
index a804f66eb2b3b1d3160783e6d3c8bacc3ca6d2d4..637bbacd67006cceae094cffb03a0a884e450dfc 100644 (file)
@@ -38,7 +38,6 @@ $invalid_files = array(
   FALSE,
   NULL,
   " ",
-  @array(),
   @$file_handle
 );
 /* loop through to test each element in the above array
@@ -61,8 +60,5 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: is_executable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
 bool(false)
 Done
index ec7037141760c8045329478d1add5da89a239626..1b94594faa517faeb0837734ed810d30fb21741f 100644 (file)
@@ -21,7 +21,6 @@ $filenames = array(
   TRUE,
   FALSE,
   NULL,
-  $file_handle,
 
   /* scalars */
   1234,
@@ -50,9 +49,6 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: is_file() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
 bool(false)
 bool(false)
 
index 505331d2c94c75fb157229bbd9f4978568559d05..689ae1098f818dc7d6ccf49374ea2f04a763854f 100644 (file)
@@ -38,7 +38,11 @@ $count = 1;
 /* loop through to test each element in the above array */
 foreach($files_arr as $file) {
   echo "- Iteration $count -\n";
-  var_dump( is_file( $file_path."/".$file ) );
+  try {
+    var_dump( is_file( $file_path."/".$file ) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   clearstatcache();
   $count++;
 }
@@ -67,12 +71,8 @@ bool(false)
 - Iteration 6 -
 bool(false)
 - Iteration 7 -
-
-Warning: is_file() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_file() expects parameter 1 to be a valid path, string given
 - Iteration 8 -
-
-Warning: is_file() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_file() expects parameter 1 to be a valid path, string given
 
 *** Done ***
index 9a734cd14d310df3d16f35212ea0d83bcdf8bd6d..8a4b507b6f3c5c2ea6f3eaefef8e2d4b5eb076f1 100644 (file)
@@ -6,24 +6,12 @@ Test is_readable() function: error conditions
    Description: Tells whether the filename is readable
 */
 
-echo "*** Testing is_readable(): error conditions ***\n";
-var_dump( is_readable() );  // args < expected
-var_dump( is_readable(1, 2) );  // args > expected
-
 echo "\n*** Testing is_readable() on non-existent file ***\n";
 var_dump( is_readable(dirname(__FILE__)."/is_readable.tmp") );
 
 echo "Done\n";
 ?>
 --EXPECTF--
-*** Testing is_readable(): error conditions ***
-
-Warning: is_readable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_readable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Testing is_readable() on non-existent file ***
 bool(false)
 Done
index 0ba2324f9a263518a2407f2af37d8f1a1cf62ecd..b6570fb9111dbc1f83f36e46d0c136b4f1ce3ff8 100644 (file)
@@ -60,7 +60,11 @@ $counter = 1;
    is a writable file */
 foreach($files_arr as $file) {
   echo "-- Iteration $counter --\n";
-  var_dump( is_readable($file) );
+  try {
+    var_dump( is_readable($file) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
   clearstatcache();
 }
@@ -87,17 +91,11 @@ bool(false)
 -- Iteration 6 --
 bool(false)
 -- Iteration 7 --
-
-Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_readable() expects parameter 1 to be a valid path, string given
 -- Iteration 8 --
-
-Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_readable() expects parameter 1 to be a valid path, string given
 -- Iteration 9 --
-
-Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_readable() expects parameter 1 to be a valid path, string given
 -- Iteration 10 --
 bool(true)
 -- Iteration 11 --
index 74fc7af57487e7ec39cf8513e63e8289382e2add..48b4e3038669c012d4d312af3a03624de754b7ce 100644 (file)
@@ -37,7 +37,6 @@ $misc_files = array(
   FALSE,
   NULL,
   " ",
-  @array(),
   @$file_handle
 );
 /* loop through to test each element in the above array
@@ -60,8 +59,5 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: is_readable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
 bool(false)
 Done
index 1721935549b5c64dd3607802a4f9406f2268e0a4..d053244a798c842a7e0f02898109f478b4d73a1d 100644 (file)
@@ -29,19 +29,9 @@ var_dump(is_uploaded_file('random_filename.txt'));
 // not an uploaded file
 var_dump(is_uploaded_file('__FILE__'));
 
-// Error cases
-var_dump(is_uploaded_file());
-var_dump(is_uploaded_file('a', 'b'));
-
 ?>
 --EXPECTF--
 bool(true)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: is_uploaded_file() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_uploaded_file() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
index e3755bc748d95909fba2ac04df6220c24ad0b9c7..e1641e0e9f3a16fb4d018f020748a045cd46e0d3 100644 (file)
@@ -8,14 +8,6 @@ Test is_writable() and its alias is_writeable() function: error conditions
    is_writeable() is an alias of is_writable()
 */
 
-echo "*** Testing is_writable(): error conditions ***\n";
-var_dump( is_writable() );  // args < expected
-var_dump( is_writeable() );
-
-echo "\n*** Testing is_writeable(): error conditions ***\n";
-var_dump( is_writable(1, 2) );  // args > expected
-var_dump( is_writeable(1, 2) );
-
 echo "\n*** Testing is_writable() on non-existent file ***\n";
 var_dump( is_writable(dirname(__FILE__)."/is_writable") );
 var_dump( is_writeable(dirname(__FILE__)."/is_writable") );
@@ -23,22 +15,6 @@ var_dump( is_writeable(dirname(__FILE__)."/is_writable") );
 echo "Done\n";
 ?>
 --EXPECTF--
-*** Testing is_writable(): error conditions ***
-
-Warning: is_writable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_writeable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-*** Testing is_writeable(): error conditions ***
-
-Warning: is_writable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: is_writeable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Testing is_writable() on non-existent file ***
 bool(false)
 bool(false)
index f5cdf6a8a0cfcb81df3a0f7d1c35bdd4df6aaf6d..ec9756fbf138fbf835af4122f8921afaecdb2b9f 100644 (file)
@@ -62,8 +62,16 @@ $counter = 1;
    is a writable file */
 foreach($files_arr as $file) {
   echo "-- Iteration $counter --\n";
-  var_dump( is_writable($file) );
-  var_dump( is_writeable($file) );
+  try {
+    var_dump( is_writable($file) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
+  try {
+    var_dump( is_writeable($file) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter++;
   clearstatcache();
 }
@@ -96,26 +104,14 @@ bool(false)
 bool(false)
 bool(false)
 -- Iteration 7 --
-
-Warning: is_writable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_writable() expects parameter 1 to be a valid path, string given
+is_writeable() expects parameter 1 to be a valid path, string given
 -- Iteration 8 --
-
-Warning: is_writable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_writable() expects parameter 1 to be a valid path, string given
+is_writeable() expects parameter 1 to be a valid path, string given
 -- Iteration 9 --
-
-Warning: is_writable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_writable() expects parameter 1 to be a valid path, string given
+is_writeable() expects parameter 1 to be a valid path, string given
 -- Iteration 10 --
 bool(true)
 bool(true)
index 3cc7a4da9d6c1e3db584278d865bdcd710b2e82c..d533a2745dfe59a4ae721538a1ab5e1f60af2728 100644 (file)
@@ -35,7 +35,6 @@ $misc_files = array(
   FALSE,
   NULL,
   " ",
-  @array(),
   @$file_handle
 );
 /* loop through to test each element in the above array
@@ -66,12 +65,6 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: is_writable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
 bool(false)
 bool(false)
 Done
index f4b4f5089e2dfcda82aae153a726653fb1298960..18e0407fdc965945ad90947adc21cec47f4a1d92 100644 (file)
@@ -29,20 +29,9 @@ $filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown.txt';
 touch( $filename );
 $uid = posix_getuid();
 
-
-// Less than expected arguments
-var_dump( lchown( $filename ) );
-
-// More than expected arguments
-var_dump( lchown( $filename, $uid, 'foobar' ) );
-
 // Non-existent filename
 var_dump( lchown( 'foobar_lchown.txt', $uid ) );
 
-// Wrong argument types
-var_dump( lchown( new StdClass(), $uid ) );
-var_dump( lchown( array(), $uid ) );
-
 // Bad user
 var_dump( lchown( $filename, -5 ) );
 
@@ -58,21 +47,9 @@ unlink($filename);
 --EXPECTF--
 *** Testing lchown() : error functionality ***
 
-Warning: lchown() expects exactly 2 parameters, 1 given in %s on line %d
-bool(true)
-
-Warning: lchown() expects exactly 2 parameters, 3 given in %s on line %d
-bool(true)
-
 Warning: lchown(): No such file or directory in %s on line %d
 bool(false)
 
-Warning: lchown() expects parameter 1 to be a valid path, object given in %s on line %d
-bool(true)
-
-Warning: lchown() expects parameter 1 to be a valid path, array given in %s on line %d
-bool(true)
-
 Warning: lchown(): %r(Operation not permitted|Invalid argument)%r in %s on line %d
 bool(false)
 ===DONE===
index 8f290a32e3d3d29a40c23f22b276a97a328ed1b4..e6fccd5acce98aabb311bbf1ac3326c21d8467ef 100644 (file)
@@ -17,54 +17,28 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 
 echo "*** Testing lstat() for error conditions ***\n";
 $file_path = dirname(__FILE__);
-var_dump( lstat() );  // args < expected
-var_dump( lstat(__FILE__, 2) );  // args > expected
 var_dump( lstat("$file_path/temp.tmp") ); // non existing file
 var_dump( lstat(22) ); // scalar argument
-$arr = array(__FILE__);
-var_dump( lstat($arr) ); // array argument
 
 echo "\n*** Testing stat() for error conditions ***\n";
-var_dump( stat() );  // args < expected
-var_dump( stat(__FILE__, 2) );  // file, args > expected
-var_dump( stat(dirname(__FILE__), 2) );  //dir, args > expected
 
 var_dump( stat("$file_path/temp.tmp") ); // non existing file
 var_dump( stat("$file_path/temp/") ); // non existing dir
 var_dump( stat(22) ); // scalar argument
-var_dump( stat($arr) ); // array argument
 
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing lstat() for error conditions ***
 
-Warning: lstat() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: lstat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: lstat(): Lstat failed for %s in %s on line %d
 bool(false)
 
 Warning: lstat(): Lstat failed for 22 in %s on line %d
 bool(false)
 
-Warning: lstat() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-
 *** Testing stat() for error conditions ***
 
-Warning: stat() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: stat(): stat failed for %s in %s on line %d
 bool(false)
 
@@ -73,7 +47,4 @@ bool(false)
 
 Warning: stat(): stat failed for 22 in %s on line %d
 bool(false)
-
-Warning: stat() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
 Done
index 17f908c3f6e33026f66d3ae539d24ba71813403e..be0b434c2c4c007a5d04d2ddb1d1814258094499 100644 (file)
@@ -9,48 +9,12 @@ Test mkdir() and rmdir() functions : error conditions
     Description: Removes directory
 */
 
-echo "*** Testing mkdir(): error conditions ***\n";
-var_dump( mkdir() );  // args < expected
-var_dump( mkdir(1, 2, 3, 4, 5) );  // args > expected
-var_dump( mkdir("testdir", 0777, false, $context, "test") );  // args > expected
-
-echo "\n*** Testing rmdir(): error conditions ***\n";
-var_dump( rmdir() );  // args < expected
-var_dump( rmdir(1, 2, 3) );  // args > expected
-var_dump( rmdir("testdir", $context, "test") );  // args > expected
-
 echo "\n*** Testing rmdir() on non-existent directory ***\n";
 var_dump( rmdir("temp") );
 
 echo "Done\n";
 ?>
 --EXPECTF--
-*** Testing mkdir(): error conditions ***
-
-Warning: mkdir() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: mkdir() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: context in %s on line %d
-
-Warning: mkdir() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-
-*** Testing rmdir(): error conditions ***
-
-Warning: rmdir() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: rmdir() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: context in %s on line %d
-
-Warning: rmdir() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
 *** Testing rmdir() on non-existent directory ***
 
 Warning: rmdir(temp): No such file or directory in %s on line %d
index 24dfc96ac9234297779383b33215c8a0fac0500c..0af10551783ec3317618ce8ad01ec5837b32aef3 100644 (file)
@@ -35,8 +35,16 @@ var_dump( mkdir("$file_path/mkdir_variation2/test/", 0777, true) );
 var_dump( rmdir("$file_path/mkdir_variation2/") );
 
 echo "\n*** Testing mkdir() and rmdir() for binary safe functionality ***\n";
-var_dump( mkdir("$file_path/temp".chr(0)."/") );
-var_dump( rmdir("$file_path/temp".chr(0)."/") );
+try {
+    var_dump( mkdir("$file_path/temp".chr(0)."/") );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump( rmdir("$file_path/temp".chr(0)."/") );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "\n*** Testing mkdir() with miscelleneous input ***\n";
 /* changing mode of mkdir to prevent creating sub-directory under it */
@@ -64,12 +72,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d
 bool(false)
 
 *** Testing mkdir() and rmdir() for binary safe functionality ***
-
-Warning: mkdir() expects parameter 1 to be a valid path, string given in %s on line %d
-bool(false)
-
-Warning: rmdir() expects parameter 1 to be a valid path, string given in %s on line %d
-bool(false)
+mkdir() expects parameter 1 to be a valid path, string given
+rmdir() expects parameter 1 to be a valid path, string given
 
 *** Testing mkdir() with miscelleneous input ***
 bool(true)
index c6cfdd3203f9ca436d071ddf7d021e82b04ca0ff..7af8748fe292ebb292ea3e8d7a66ba575a01aa76 100644 (file)
@@ -49,11 +49,6 @@ fclose($fd);
 var_dump(move_uploaded_file($_FILES['file2']['tmp_name'], $destination4));
 unlink($destination4);
 
-echo "Wrong parameters\n";
-var_dump(move_uploaded_file());
-var_dump(move_uploaded_file(1, 2, 3));
-
-
 ?>
 --EXPECTF--
 Valid move
@@ -66,10 +61,3 @@ Non-uploaded source file
 bool(false)
 Valid move to existing file
 bool(true)
-Wrong parameters
-
-Warning: move_uploaded_file() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: move_uploaded_file() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
index 29e022fb13b2edc33da492bd536c596bb9a4b1ed..5c812d7b9aca9a28a4770171bdfcf1675ac93462 100644 (file)
@@ -10,10 +10,6 @@ Test parse_ini_file() function : error conditions
 
 echo "*** Testing parse_ini_file() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing parse_ini_file() function with Zero arguments --\n";
-var_dump( parse_ini_file() );
-
 //Test parse_ini_file with one more than the expected number of arguments
 echo "\n-- Testing parse_ini_file() function with more than expected no. of arguments --\n";
 $filename = 'string_val';
@@ -30,11 +26,6 @@ echo "Done";
 --EXPECTF--
 *** Testing parse_ini_file() : error conditions ***
 
--- Testing parse_ini_file() function with Zero arguments --
-
-Warning: parse_ini_file() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
 -- Testing parse_ini_file() function with more than expected no. of arguments --
 
 Warning: parse_ini_file(%s): failed to open stream: No such file or directory in %s on line %d
index 421f378e013d058a65cc3e2edcdf35de3bf670c6..6f4492e375a4c80a72d8705d82f7598c1efc3560 100644 (file)
@@ -43,9 +43,6 @@ $paths = array (
   "./array(1, 2)",
   "array( array(), null)",
 
-  /* pathname as object */
-  $obj,
-
   /* pathname as spaces */
   " ",
   ' ',
@@ -199,22 +196,6 @@ string(21) "array( array(), null)"
 string(0) ""
 string(21) "array( array(), null)"
 -- Iteration 9 --
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
--- Iteration 10 --
 array(3) {
   ["dirname"]=>
   string(1) "."
@@ -227,7 +208,7 @@ string(1) "."
 string(1) " "
 string(0) ""
 string(1) " "
--- Iteration 11 --
+-- Iteration 10 --
 array(3) {
   ["dirname"]=>
   string(1) "."
@@ -240,7 +221,7 @@ string(1) "."
 string(1) " "
 string(0) ""
 string(1) " "
--- Iteration 12 --
+-- Iteration 11 --
 array(2) {
   ["basename"]=>
   string(0) ""
@@ -251,7 +232,7 @@ string(0) ""
 string(0) ""
 string(0) ""
 string(0) ""
--- Iteration 13 --
+-- Iteration 12 --
 array(2) {
   ["basename"]=>
   string(0) ""
@@ -262,7 +243,7 @@ string(0) ""
 string(0) ""
 string(0) ""
 string(0) ""
--- Iteration 14 --
+-- Iteration 13 --
 array(2) {
   ["basename"]=>
   string(0) ""
@@ -273,7 +254,7 @@ string(0) ""
 string(0) ""
 string(0) ""
 string(0) ""
--- Iteration 15 --
+-- Iteration 14 --
 array(2) {
   ["basename"]=>
   string(0) ""
@@ -284,7 +265,7 @@ string(0) ""
 string(0) ""
 string(0) ""
 string(0) ""
--- Iteration 16 --
+-- Iteration 15 --
 array(2) {
   ["basename"]=>
   string(0) ""
@@ -295,7 +276,7 @@ string(0) ""
 string(0) ""
 string(0) ""
 string(0) ""
--- Iteration 17 --
+-- Iteration 16 --
 array(4) {
   ["dirname"]=>
   string(1) "."
@@ -310,7 +291,7 @@ string(1) "."
 string(11) "www.foo.com"
 string(3) "com"
 string(7) "www.foo"
--- Iteration 18 --
+-- Iteration 17 --
 array(4) {
   ["dirname"]=>
   string(17) "/var/html/testdir"
@@ -325,7 +306,7 @@ string(17) "/var/html/testdir"
 string(12) "example.html"
 string(4) "html"
 string(7) "example"
--- Iteration 19 --
+-- Iteration 18 --
 array(3) {
   ["dirname"]=>
   string(12) "/testdir/foo"
@@ -338,7 +319,7 @@ string(12) "/testdir/foo"
 string(4) "test"
 string(0) ""
 string(4) "test"
--- Iteration 20 --
+-- Iteration 19 --
 array(4) {
   ["dirname"]=>
   string(4) "/foo"
@@ -353,7 +334,7 @@ string(4) "/foo"
 string(12) "symlink.link"
 string(4) "link"
 string(7) "symlink"
--- Iteration 21 --
+-- Iteration 20 --
 array(3) {
   ["dirname"]=>
   string(1) "."
@@ -366,7 +347,7 @@ string(1) "."
 string(5) "12345"
 string(0) ""
 string(5) "12345"
--- Iteration 22 --
+-- Iteration 21 --
 array(4) {
   ["dirname"]=>
   string(1) "."
@@ -381,7 +362,7 @@ string(1) "."
 string(15) "www.example.com"
 string(3) "com"
 string(11) "www.example"
--- Iteration 23 --
+-- Iteration 22 --
 array(3) {
   ["dirname"]=>
   string(12) "/testdir/foo"
@@ -394,7 +375,7 @@ string(12) "/testdir/foo"
 string(4) "test"
 string(0) ""
 string(4) "test"
--- Iteration 24 --
+-- Iteration 23 --
 array(4) {
   ["dirname"]=>
   string(6) "../foo"
@@ -409,7 +390,7 @@ string(6) "../foo"
 string(9) "test.link"
 string(4) "link"
 string(4) "test"
--- Iteration 25 --
+-- Iteration 24 --
 array(4) {
   ["dirname"]=>
   string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/test5/test6"
@@ -424,7 +405,7 @@ string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/tes
 string(8) "test.tmp"
 string(3) "tmp"
 string(4) "test"
--- Iteration 26 --
+-- Iteration 25 --
 array(4) {
   ["dirname"]=>
   string(1) "."
index 93ed5d946e6ff9c0f61868086192fd444acf8174..22fe309741852c38479ec39083842ebfcb9281ca 100644 (file)
@@ -16,14 +16,9 @@ if (strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN')
  */
 $file_path = dirname(__FILE__);
 echo "*** Testing for error conditions ***\n";
-var_dump( popen() );  // Zero Arguments
-var_dump( popen("abc.txt") );   // Single Argument
 var_dump( popen("abc.txt", "rw") );   // Invalid mode Argument
-var_dump( pclose() );
 $file_handle = fopen($file_path."/popen.tmp", "w");
-var_dump( pclose($file_handle, $file_handle) );
 fclose($file_handle);
-var_dump( pclose(1) );
 echo "\n--- Done ---";
 ?>
 --CLEAN--
@@ -34,22 +29,7 @@ unlink($file_path."/popen.tmp");
 --EXPECTF--
 *** Testing for error conditions ***
 
-Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
 Warning: popen(abc.txt,rw): %s on line %d
 bool(false)
 
-Warning: pclose() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: pclose() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: pclose() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
 --- Done ---
index fcaa7f3946823ad3e750a694f177e2feac516821..c74b63d0d67e186ba2c7c7e66b1d551aeb91fc81 100644 (file)
@@ -9,17 +9,12 @@ Test readfile() function: error conditions
 $context = stream_context_create();
 
 echo "*** Test readfile(): error conditions ***\n";
-echo "-- Testing readfile() with unexpected no. of arguments --\n";
-var_dump( readfile() );  // args < expected
-var_dump( readfile(__FILE__, true, $context, 4) );  // args > expected
 
 echo "\n-- Testing readfile() with invalid arguments --\n";
 // invalid arguments
 var_dump( readfile(NULL) );  // NULL as $filename
 var_dump( readfile('') );  // empty string as $filename
 var_dump( readfile(false) );  // boolean false as $filename
-var_dump( readfile(__FILE__, false, '') );  // empty string as $context
-var_dump( readfile(__FILE__, true, false) );  // boolean false as $context
 
 echo "\n-- Testing readfile() with non-existent file --\n";
 $non_existent_file = dirname(__FILE__)."/non_existent_file.tmp";
@@ -29,13 +24,6 @@ echo "Done\n";
 ?>
 --EXPECTF--
 *** Test readfile(): error conditions ***
--- Testing readfile() with unexpected no. of arguments --
-
-Warning: readfile() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: readfile() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
 
 -- Testing readfile() with invalid arguments --
 
@@ -48,12 +36,6 @@ bool(false)
 Warning: readfile(): Filename cannot be empty in %s on line %d
 bool(false)
 
-Warning: readfile() expects parameter 3 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: readfile() expects parameter 3 to be resource, bool given in %s on line %d
-bool(false)
-
 -- Testing readfile() with non-existent file --
 
 Warning: readfile(%s/non_existent_file.tmp): failed to open stream: %s in %s on line %d
index a240a826b967baf3f3fee4b78b3a1d22f33d0907..04fdafca794ca58d0be4d4f8a8d4384520f45fd2 100644 (file)
@@ -36,8 +36,12 @@ $names_arr = array(
 );
 
 foreach($names_arr as $key => $value) {
-      echo "\n-- Filename: $key --\n";
-      readfile($value);
+    echo "\n-- Filename: $key --\n";
+    try {
+        readfile($value);
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+    }
 };
 
 ?>
@@ -70,12 +74,10 @@ Warning: readfile(): Filename cannot be empty in %s on line %d
 Warning: readfile( ): failed to open stream: Permission denied in %s on line %d
 
 -- Filename: \0 --
-
-Warning: readfile() expects parameter 1 to be a valid path, string given in %s on line %d
+readfile() expects parameter 1 to be a valid path, string given
 
 -- Filename: array() --
-
-Warning: readfile() expects parameter 1 to be a valid path, array given in %s on line %d
+readfile() expects parameter 1 to be a valid path, array given
 
 -- Filename: /no/such/file/dir --
 
index 59b92ad365827af5d08f822679fd4ee2f077f075..5a0070c04fb167351b46450b5ceaccd38e0c17cb 100644 (file)
Binary files a/ext/standard/tests/file/readfile_variation10.phpt and b/ext/standard/tests/file/readfile_variation10.phpt differ
index dc042bfff592cea42763d922775d0097014f7d21..f7fd340aabbf41da254e32217ef9d49267983256 100644 (file)
@@ -15,10 +15,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
    Description: Returns canonicalized absolute pathname
 */
 
-echo "*** Testing readlink(): error conditions ***\n";
-var_dump( readlink() );  // args < expected
-var_dump( readlink(__FILE__, 2) );  // args > expected
-
 echo "\n*** Testing readlink() on a non-existent link ***\n";
 var_dump( readlink(dirname(__FILE__)."/readlink_error.tmp") );
 
@@ -28,24 +24,12 @@ var_dump( readlink(__FILE__) );
 echo "\n*** Testing readlink() on existing directory ***\n";
 var_dump( readlink(dirname(__FILE__)) );
 
-echo "*** Testing realpath(): error conditions ***\n";
-var_dump( realpath() );  // args < expected
-var_dump( realpath(1, 2) );  // args > expected
-
 echo "\n*** Testing realpath() on a non-existent file ***\n";
 var_dump( realpath(dirname(__FILE__)."/realpath_error.tmp") );
 
 echo "Done\n";
 ?>
 --EXPECTF--
-*** Testing readlink(): error conditions ***
-
-Warning: readlink() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: readlink() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Testing readlink() on a non-existent link ***
 
 Warning: readlink(): No such file or directory in %s on line %d
@@ -60,13 +44,6 @@ bool(false)
 
 Warning: readlink(): Invalid argument in %s on line %d
 bool(false)
-*** Testing realpath(): error conditions ***
-
-Warning: realpath() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: realpath() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 
 *** Testing realpath() on a non-existent file ***
 %s
index c350a94c7719d9fb7dcb40096ddf87e08037ddfe..eef16630d254c5e6899320d4404023d2f5eadc94 100644 (file)
@@ -16,7 +16,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 /* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */
 
 $file_path = dirname(__FILE__);
-$file_handle = fopen($file_path."/readlink_variation2.tmp", "w");
 
 echo "*** Testing Invalid file types ***\n";
 $filenames = array(
@@ -26,7 +25,6 @@ $filenames = array(
   TRUE,
   FALSE,
   NULL,
-  $file_handle,
 
   /* scalars */
   1234,
@@ -38,7 +36,6 @@ foreach( $filenames as $filename ) {
   var_dump( readlink($filename) );
   clearstatcache();
 }
-fclose($file_handle);
 
 echo "\n*** Done ***";
 ?>
@@ -65,9 +62,6 @@ bool(false)
 Warning: readlink(): %s in %s on line %d
 bool(false)
 
-Warning: readlink() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
 Warning: readlink(): %s in %s on line %d
 bool(false)
 
diff --git a/ext/standard/tests/file/realpath_error-win32.phpt b/ext/standard/tests/file/realpath_error-win32.phpt
deleted file mode 100644 (file)
index 2fd221e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Test realpath() function: error conditions
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-    die('skip only on Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype: string realpath ( string $path );
-   Description: Returns canonicalized absolute pathname
-*/
-
-echo "*** Testing realpath() for error conditions ***\n";
-var_dump( realpath() );  // args < expected
-var_dump( realpath(1, 2) );  // args > expected
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing realpath() for error conditions ***
-
-Warning: realpath() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: realpath() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
index 6319d4ad6192fee9bade5c26d98f0e5fdc5d754e..977746a21d4332b8567607a2342a620a8f52a6c7 100644 (file)
Binary files a/ext/standard/tests/file/rename_variation13-win32.phpt and b/ext/standard/tests/file/rename_variation13-win32.phpt differ
index 2686150f23c9d13c7421bc054f99d0114338f544..07ee8aa9d860745de0ce2053aed3b9aa7ad10a41 100644 (file)
@@ -30,8 +30,6 @@ $names_arr = array(
   NULL,
   "",
   " ",
-  "\0",
-  array(),
 
   /* prefix with path separator of a non existing directory*/
   "/no/such/file/dir",
@@ -97,24 +95,6 @@ bool(true)
 
 Warning: rename( ,%s/renameVar13/afile.tmp): No such file or directory in %s on line %d
 bool(false)
--- testing '%s' --
-
-Warning: rename() %s in %s on line %d
-bool(false)
-
-Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d
-
-Warning: rename() expects parameter 1 to be a valid path, string given in %s on line %d
-bool(false)
--- testing 'Array' --
-
-Warning: rename() expects parameter 2 to be a valid path, array given in %s on line %d
-bool(false)
-
-Warning: file_exists() expects parameter 1 to be a valid path, array given in %s on line %d
-
-Warning: rename() expects parameter 1 to be a valid path, array given in %s on line %d
-bool(false)
 -- testing '/no/such/file/dir' --
 
 Warning: rename(%s/renameVar13/afile.tmp,/no/such/file/dir): No such file or directory in %s on line %d
index 20bffc79df26f1b451c3515addf891a644344979..59c4fd6deedb5d772df809f47f97f421652cf4ed 100644 (file)
@@ -17,29 +17,16 @@ $file_path = dirname(__FILE__);
 $arr = array(__FILE__);
 
 echo "\n*** Testing stat() for error conditions ***\n";
-var_dump( stat() );  // args < expected
-var_dump( stat(__FILE__, 2) );  // file, args > expected
-var_dump( stat(dirname(__FILE__), 2) );  //dir, args > expected
 
 var_dump( stat("$file_path/temp.tmp") ); // non existing file
 var_dump( stat("$file_path/temp/") ); // non existing dir
 var_dump( stat(22) ); // scalar argument
-var_dump( stat($arr) ); // array argument
 
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing stat() for error conditions ***
 
-Warning: stat() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: stat(): stat failed for %s in %s on line %d
 bool(false)
 
@@ -48,7 +35,4 @@ bool(false)
 
 Warning: stat(): stat failed for 22 in %s on line %d
 bool(false)
-
-Warning: stat() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
 Done
index b18dd85b311e2eb75fe1b919a3a3234afdf5c691..84f3b78f0632927bdc40c2a2f6f8777b6bcf478f 100644 (file)
@@ -15,8 +15,6 @@ var_dump(stream_socket_client(".", $a, $b));
 var_dump($a, $b);
 var_dump(stream_socket_client(1, $a, $b));
 var_dump($a, $b);
-var_dump(stream_socket_client(array(), $a, $b));
-var_dump($a, $b);
 
 echo "Done\n";
 ?>
@@ -45,9 +43,4 @@ Warning: stream_socket_client(): unable to connect to 1 (Failed to parse address
 bool(false)
 int(0)
 string(27) "Failed to parse address "1""
-
-Warning: stream_socket_client() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-int(0)
-string(27) "Failed to parse address "1""
 Done
index 1dce5adf6cc74393107fd1dbc7bb16025e7c68ff..6c58d0d7ad95de2ba858136eff0f79d49df67db6 100644 (file)
@@ -24,9 +24,11 @@ $streams = array(
 foreach($streams as $stream)
 {
        $stream = fopen($stream, 'r');
-       $meta = @stream_get_meta_data($stream);
-       var_dump($meta);
-       var_dump(isset($meta['foo']) ? $meta['foo'] : null);
+    if ($stream) {
+        $meta = stream_get_meta_data($stream);
+        var_dump($meta);
+        var_dump(isset($meta['foo']) ? $meta['foo'] : null);
+    }
 }
 
 ?>
@@ -52,8 +54,6 @@ array(7) {
 NULL
 
 Warning: fopen(data://): failed to open stream: rfc2397: no comma in URL in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 array(7) {
   ["base64"]=>
   bool(true)
@@ -73,16 +73,10 @@ array(7) {
 NULL
 
 Warning: fopen(data://;base64): failed to open stream: rfc2397: no comma in URL in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 
 Warning: fopen(data://foo,): failed to open stream: rfc2397: illegal media type in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 
 Warning: fopen(data://foo=bar,): failed to open stream: rfc2397: illegal media type in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 array(8) {
   ["mediatype"]=>
   string(10) "text/plain"
@@ -104,8 +98,6 @@ array(8) {
 NULL
 
 Warning: fopen(data://text/plain;foo,): failed to open stream: rfc2397: illegal parameter in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 array(9) {
   ["mediatype"]=>
   string(10) "text/plain"
@@ -129,8 +121,6 @@ array(9) {
 string(3) "bar"
 
 Warning: fopen(data://text/plain;foo=bar;bla,): failed to open stream: rfc2397: illegal parameter in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 array(9) {
   ["mediatype"]=>
   string(10) "text/plain"
@@ -154,8 +144,6 @@ array(9) {
 string(3) "bar"
 
 Warning: fopen(data://text/plain;foo=bar;bar=baz): failed to open stream: rfc2397: no comma in URL in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
 array(10) {
   ["mediatype"]=>
   string(10) "text/plain"
index f6616a0c886a7a14df7cee1bc0c8ed3aa97e90ad..18d1c1b2804fc9cac9e04cbf4502026d5595f6e0 100644 (file)
@@ -14,18 +14,19 @@ $streams = array(
 
 foreach($streams as $stream)
 {
-       var_dump(file_get_contents($stream));
+       try {
+               var_dump(file_get_contents($stream));
+       } catch (TypeError $e) {
+               echo $e->getMessage(), "\n";
+       }
 }
 
 ?>
 ===DONE===
 <?php exit(0); ?>
 --EXPECTF--
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d
-NULL
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, string given
+file_get_contents() expects parameter 1 to be a valid path, string given
 
 Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhcg==): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d
 bool(false)
index 7e8b5b24cf8f7fc6657ef8fbbf6df25225b202f7..6a1d026a7915f033ebb86480109e0fb7d16ca652 100644 (file)
@@ -33,11 +33,6 @@ fclose($fp);
 $linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error1.tmp";
 
 echo "*** Testing symlink() for error conditions ***\n";
-//zero arguments
-var_dump( symlink() );
-
-//more than expected
-var_dump( symlink($filename, $linkname, true) );
 
 //invalid arguments
 var_dump( symlink(NULL, $linkname) );  // NULL as filename
@@ -48,11 +43,6 @@ var_dump( symlink($filename, '') );  // '' as linkname
 var_dump( symlink($filename, false) );  // false as linkname
 
 echo "\n*** Testing linkinfo() for error conditions ***\n";
-//zero arguments
-var_dump( linkinfo() );
-
-//more than expected
-var_dump( linkinfo($linkname, true) );
 
 //invalid arguments
 var_dump( linkinfo(NULL) );  // NULL as linkname
@@ -69,12 +59,6 @@ unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_error1.tmp");
 --EXPECTF--
 *** Testing symlink() for error conditions ***
 
-Warning: symlink() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: symlink() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: symlink(): %s in %s on line %d
 bool(false)
 
@@ -95,12 +79,6 @@ bool(false)
 
 *** Testing linkinfo() for error conditions ***
 
-Warning: linkinfo() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: linkinfo() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
index fc891fde7bf5bb622aec4e3d16fb0b3ab548cedd..00047cde5ee7e71ea31b46aabfbb4cdd5bfc2f6d 100644 (file)
@@ -30,11 +30,6 @@ fclose($fp);
 $linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error2.tmp";
 
 echo "*** Testing link() for error conditions ***\n";
-//zero arguments
-var_dump( link() );
-
-//more than expected
-var_dump( link($filename, $linkname, false) );
 
 //invalid arguments
 var_dump( link(NULL, $linkname) );  // NULL as filename
@@ -46,11 +41,6 @@ var_dump( link($filename, '') );  // '' as linkname
 var_dump( link($filename, false) );  // false as linkname
 
 echo "\n*** Testing is_link() for error conditions ***\n";
-//zero arguments
-var_dump( is_link() );
-
-//more than expected
-var_dump( is_link($linkname, "/") );
 
 //invalid arguments
 var_dump( is_link(NULL) );  // NULL as linkname
@@ -68,12 +58,6 @@ unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_error2.tmp");
 --EXPECTF--
 *** Testing link() for error conditions ***
 
-Warning: link() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: link() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: link(): No such file or directory in %s on line %d
 bool(false)
 
@@ -96,12 +80,6 @@ Warning: link(): No such file or directory in %s on line %d
 bool(false)
 
 *** Testing is_link() for error conditions ***
-
-Warning: is_link() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_link() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 bool(false)
 bool(false)
 bool(false)
index 6d5071b5e5f916a7ce3cc6501371f2fe8b3b1ae1..d7602326d9754b4cf7f87573180e866c4e697705 100644 (file)
@@ -59,7 +59,12 @@ $res_arr = array(
 
 for( $i=0; $i<count($names_arr); $i++ ) {
        echo "-- Iteration $i --\n";
-       $file_name = tempnam($file_path, $names_arr[$i]);
+       try {
+        $file_name = tempnam($file_path, $names_arr[$i]);
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+        continue;
+    }
 
        /* creating the files in existing dir */
        if (file_exists($file_name) && !$res_arr[$i]) {
@@ -104,14 +109,9 @@ Notice: tempnam(): file created in the system's temporary directory in %stempnam
 Failed, not created in the correct directory %s vs %s
 0
 -- Iteration 6 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, string given in %stempnam_variation3-win32.php on line 54
-Failed, not created in the correct directory %s vs %sext\standard\tests\file\tempnamVar3
-0
+tempnam() expects parameter 2 to be a valid path, string given
 -- Iteration 7 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
-OK
+tempnam() expects parameter 2 to be a valid path, array given
 -- Iteration 8 --
 OK
 -- Iteration 9 --
index 2d95cb0a438332817a47a7f405bd2e61c54c730e..ccbd35084ff5a0ffe045e860bea75622a8f53a70 100644 (file)
@@ -37,7 +37,12 @@ $names_arr = array(
 
 for( $i=0; $i<count($names_arr); $i++ ) {
   echo "-- Iteration $i --\n";
-  $file_name = tempnam("$file_path", $names_arr[$i]);
+  try {
+    $file_name = tempnam("$file_path", $names_arr[$i]);
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+    continue;
+  }
 
   /* creating the files in existing dir */
   if( file_exists($file_name) ) {
@@ -100,17 +105,9 @@ File name is => %s/%s
 File permissions are => 100600
 File created in => directory specified
 -- Iteration 6 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, string given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 2 to be a valid path, string given
 -- Iteration 7 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, array given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 2 to be a valid path, array given
 -- Iteration 8 --
 File name is => %s/dir%s
 File permissions are => 100600
index 5bacb5e876a7e2f77a63f5b3c1ec15cf3868f3b4..f4b3cf016c5c29f2441c8aff5c1db11fa1c9befb 100644 (file)
@@ -34,7 +34,12 @@ $names_arr = array(
 
 for( $i=0; $i<count($names_arr); $i++ ) {
        echo "-- Iteration $i --\n";
-       $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+       try {
+        $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+    } catch (TypeError $e) {
+        echo $e->getMessage(), "\n";
+        continue;
+    }
 
        if( file_exists($file_name) ){
 
@@ -95,17 +100,9 @@ File name is => %s%et%s
 File permissions are => 100666
 File created in => temp dir
 -- Iteration 6 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, string given in %stempnam_variation7-win32.php on line %d
--- File is not created --
-
-Warning: unlink(): %r(Invalid argument|No such file or directory)%r in %s on line %d
+tempnam() expects parameter 1 to be a valid path, string given
 -- Iteration 7 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %r(Invalid argument|No such file or directory)%r in %s on line %d
+tempnam() expects parameter 1 to be a valid path, array given
 -- Iteration 8 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
index 9ed84f974ae2ceebd280393f851465658b4a0c61..680e207718c5cfc2005e267a14db7b8399d80437 100644 (file)
@@ -35,7 +35,12 @@ $names_arr = array(
 
 for( $i=0; $i<count($names_arr); $i++ ) {
   echo "-- Iteration $i --\n";
-  $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+  try {
+    $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+    continue;
+  }
 
   if( file_exists($file_name) ){
 
@@ -100,17 +105,9 @@ File name is => %s%etempnam_variation3.tmp%s
 File permissions are => 100600
 File created in => temp dir
 -- Iteration 6 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, string given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 1 to be a valid path, string given
 -- Iteration 7 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 1 to be a valid path, array given
 -- Iteration 8 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
index 42d1fad1e5b02fe9b2d4fdfaef2b0f7510977d8b..119ffd32046a1dcfb25759844c8be5dff5cfe40f 100644 (file)
@@ -13,7 +13,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 // output to linux. This could be a php.net bug on windows or a windows querk.
 $filename = dirname(__FILE__)."/touch.dat";
 
-var_dump(touch());
 var_dump(touch($filename));
 var_dump(filemtime($filename));
 @unlink($filename);
@@ -39,8 +38,6 @@ var_dump(touch("/no/such/file/or/directory"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: touch() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 bool(true)
 int(%d)
 bool(true)
index 0520055a90055ffa9ef02dc703ecce507728794f..9a4bd01e13d5f1ff74081b765977b2add33fb092 100644 (file)
@@ -5,17 +5,9 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 --FILE--
 <?php
 
-var_dump(touch());
-var_dump(touch(1, 2, 3, 4));
 var_dump(touch("/no/such/file/or/directory"));
 
 ?>
 --EXPECTF--
-Warning: touch() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 Warning: touch(): Unable to create file /no/such/file/or/directory because No such file or directory in %s on line %d
 bool(false)
index efd6ee832360f6e882267ee9841186affb854c96..2c81e33b727c6cf0b0ed14f1f2b8d9c8d3a8f48d 100644 (file)
@@ -25,13 +25,6 @@ $context = stream_context_create();
 
 echo "*** Testing unlink() : error conditions ***\n";
 
-echo "-- Testing unlink() on unexpected no. of arguments --\n";
-// arg < expected
-var_dump( unlink() );
-// args > expected
-var_dump( unlink($filename, $context, true) );
-var_dump( file_exists($filename) ); // expected: true
-
 echo "\n-- Testing unlink() on invalid arguments --\n";
 // invalid arguments
 var_dump( unlink('') );  // $filename as empty string
@@ -43,9 +36,6 @@ var_dump( file_exists(NULL) );  // confirm file doesnt exist
 var_dump( unlink(false) );  // $filename as boolean false
 var_dump( file_exists(false) );  // confirm file doesnt exist
 
-var_dump( unlink($filename, '') );  // $context as empty string
-var_dump( unlink($filename, false) );  // $context as boolean false
-
 
 echo "\n-- Testing unlink() on non-existent file --\n";
 var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") );
@@ -68,14 +58,6 @@ rmdir(dirname(__FILE__)."/私はガラスを食べられます");
 ?>
 --EXPECTF--
 *** Testing unlink() : error conditions ***
--- Testing unlink() on unexpected no. of arguments --
-
-Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-bool(true)
 
 -- Testing unlink() on invalid arguments --
 
@@ -91,12 +73,6 @@ Warning: unlink(): %s in %s on line %d
 bool(false)
 bool(false)
 
-Warning: unlink() expects parameter 2 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: unlink() expects parameter 2 to be resource, bool given in %s on line %d
-bool(false)
-
 -- Testing unlink() on non-existent file --
 
 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
index 8dde64cff07d8c5607858158261468fc4348d2fa..fe165ec8c65e7caf43882021b9d4330d34faf6de 100644 (file)
@@ -23,13 +23,6 @@ $context = stream_context_create();
 
 echo "*** Testing unlink() : error conditions ***\n";
 
-echo "-- Testing unlink() on unexpected no. of arguments --\n";
-// arg < expected
-var_dump( unlink() );
-// args > expected
-var_dump( unlink($filename, $context, true) );
-var_dump( file_exists($filename) ); // expected: true
-
 echo "\n-- Testing unlink() on invalid arguments --\n";
 // invalid arguments
 var_dump( unlink('') );  // $filename as empty string
@@ -41,9 +34,6 @@ var_dump( file_exists(NULL) );  // confirm file doesnt exist
 var_dump( unlink(false) );  // $filename as boolean false
 var_dump( file_exists(false) );  // confirm file doesnt exist
 
-var_dump( unlink($filename, '') );  // $context as empty string
-var_dump( unlink($filename, false) );  // $context as boolean false
-
 
 echo "\n-- Testing unlink() on non-existent file --\n";
 var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") );
@@ -65,14 +55,6 @@ rmdir(dirname(__FILE__)."/unlink_error");
 ?>
 --EXPECTF--
 *** Testing unlink() : error conditions ***
--- Testing unlink() on unexpected no. of arguments --
-
-Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-bool(true)
 
 -- Testing unlink() on invalid arguments --
 
@@ -88,12 +70,6 @@ Warning: unlink(): %s in %s on line %d
 bool(false)
 bool(false)
 
-Warning: unlink() expects parameter 2 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: unlink() expects parameter 2 to be resource, bool given in %s on line %d
-bool(false)
-
 -- Testing unlink() on non-existent file --
 
 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
index f7f8f008471ebe80c620119392573a856783be7c..87b189f3cf81510a66c3c42f52e40325e856c359 100644 (file)
@@ -23,13 +23,6 @@ $context = stream_context_create();
 
 echo "*** Testing unlink() : error conditions ***\n";
 
-echo "-- Testing unlink() on unexpected no. of arguments --\n";
-// arg < expected
-var_dump( unlink() );
-// args > expected
-var_dump( unlink($filename, $context, true) );
-var_dump( file_exists($filename) ); // expected true
-
 echo "\n-- Testing unlink() on invalid arguments --\n";
 // invalid arguments
 var_dump( unlink('') );  // $filename as empty string
@@ -41,10 +34,6 @@ var_dump( file_exists(NULL) );  // confirm file doesnt exist
 var_dump( unlink(false) );  // $filename as boolean false
 var_dump( file_exists(false) );  // confirm file doesnt exist
 
-var_dump( unlink($filename, '') );  // $context as empty string
-var_dump( unlink($filename, false) );  // $context as boolean false
-
-
 echo "\n-- Testing unlink() on non-existent file --\n";
 var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") );
 
@@ -65,14 +54,6 @@ rmdir(dirname(__FILE__)."/unlink_error");
 ?>
 --EXPECTF--
 *** Testing unlink() : error conditions ***
--- Testing unlink() on unexpected no. of arguments --
-
-Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-bool(true)
 
 -- Testing unlink() on invalid arguments --
 
@@ -88,12 +69,6 @@ Warning: unlink(): %s in %s on line %d
 bool(false)
 bool(false)
 
-Warning: unlink() expects parameter 2 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: unlink() expects parameter 2 to be resource, bool given in %s on line %d
-bool(false)
-
 -- Testing unlink() on non-existent file --
 
 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
index fbfdda23851b51e75f04dfcf51afc937ddfe3c1a..53d9fc2b503a60d84a50d1ed4c6302c63b992270 100644 (file)
@@ -7,8 +7,6 @@ var_dump(stream_filter_register("", ""));
 var_dump(stream_filter_register("test", ""));
 var_dump(stream_filter_register("", "test"));
 var_dump(stream_filter_register("------", "nonexistentclass"));
-var_dump(stream_filter_register(array(), "aa"));
-var_dump(stream_filter_register("", array()));
 
 echo "Done\n";
 ?>
@@ -22,10 +20,4 @@ bool(false)
 Warning: stream_filter_register(): Filter name cannot be empty in %s on line %d
 bool(false)
 bool(true)
-
-Warning: stream_filter_register() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: stream_filter_register() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
 Done
index 37820a99c495621dabea2d16187572af8c0589ea..e389b20fd81e868203a509b2436eea0ed007522f 100644 (file)
@@ -20,16 +20,6 @@ $filter = stream_filter_append( $fp, "string.rot13", STREAM_FILTER_WRITE );
 
 echo "*** Testing stream_filter_remove() : error conditions ***\n";
 
-echo "\n-- Testing stream_filter_remove() function with Zero arguments --\n";
-var_dump( stream_filter_remove() );
-
-echo "\n-- Testing stream_filter_remove() function with more than expected no. of arguments --\n";
-$arg = 'bogus arg';
-var_dump( stream_filter_remove( $filter, $arg ) );
-
-echo "\n-- Testing stream_filter_remove() function with unexisting stream filter --\n";
-var_dump( stream_filter_remove( "fakefilter" ) );
-
 echo "\n-- Testing stream_filter_remove() function with bad resource --\n";
 var_dump( stream_filter_remove( $fp ) );
 
@@ -52,21 +42,6 @@ unlink( $file );
 --EXPECTF--
 *** Testing stream_filter_remove() : error conditions ***
 
--- Testing stream_filter_remove() function with Zero arguments --
-
-Warning: stream_filter_remove() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing stream_filter_remove() function with more than expected no. of arguments --
-
-Warning: stream_filter_remove() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
--- Testing stream_filter_remove() function with unexisting stream filter --
-
-Warning: stream_filter_remove() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
 -- Testing stream_filter_remove() function with bad resource --
 
 Warning: stream_filter_remove(): Invalid resource given, not a stream filter in %s on line %d
index 6f05137afc1b41e681f6e9faeddc86a56748979b..f43bf64380a645e0a3b67ad6e54b8ec0388145c9 100644 (file)
@@ -6,22 +6,26 @@ Bug #41970 (call_user_func_*() leaks on failure)
 $a = array(4,3,2);
 
 var_dump(call_user_func_array("sort", array($a)));
-var_dump(call_user_func_array("strlen", array($a)));
+try {
+    var_dump(call_user_func_array("strlen", array($a)));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(call_user_func("sort", $a));
-var_dump(call_user_func("strlen", $a));
+try {
+    var_dump(call_user_func("strlen", $a));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 5
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line %d
 bool(true)
+strlen() expects parameter 1 to be string, array given
 
-Warning: strlen() expects parameter 1 to be string, array given in %sbug41970.php on line 6
-NULL
-
-Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 7
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line %d
 bool(true)
-
-Warning: strlen() expects parameter 1 to be string, array given in %sbug41970.php on line 8
-NULL
+strlen() expects parameter 1 to be string, array given
 Done
index a58f19d932b8e32ae27da790445437d34e1bd2f7..76d0e94c82017650fe672f62b8529aaa5b6b3dc3 100644 (file)
@@ -69,7 +69,11 @@ class P extends O {
         $this->call(array('parent', 'who'));
         $this->call(array('P', 'parent::who'));
         $this->call(array($this, 'O::who'));
-        $this->call(array($this, 'B::who'));
+        try {
+            $this->call(array($this, 'B::who'));
+        } catch (TypeError $e) {
+            echo $e->getMessage(), "\n";
+        }
     }
 }
 
@@ -103,6 +107,5 @@ O
 $this|O::who
 O
 $this|B::who
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'P' is not a subclass of 'B' in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, class 'P' is not a subclass of 'B'
 ===DONE===
index 22130c524a1b4f53fc07424c0727971471e4a07f..0d44035e0e55897d1f62bc835dc18a7f2ca6ca9e 100644 (file)
@@ -3,14 +3,24 @@ call_user_func(): Wrong parameters
 --FILE--
 <?php
 
-call_user_func(array('Foo', 'bar'));
-call_user_func(array(NULL, 'bar'));
-call_user_func(array('stdclass', NULL));
+try {
+    call_user_func(array('Foo', 'bar'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    call_user_func(array(NULL, 'bar'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    call_user_func(array('stdclass', NULL));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 --EXPECTF--
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found
+call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
+call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method
index 71f068f10476ef77fb5d2353c9215ebdccca1aea..e6cea73f4d82a15ea39833c0110693fd3ffbafe1 100644 (file)
@@ -4,7 +4,11 @@ error_get_last() tests
 <?php
 
 var_dump(error_get_last());
-var_dump(error_get_last(true));
+try {
+    var_dump(error_get_last(true));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump(error_get_last());
 
 $a = $b;
@@ -15,19 +19,8 @@ echo "Done\n";
 ?>
 --EXPECTF--
 NULL
-
-Warning: error_get_last() expects exactly 0 parameters, 1 given in %s on line %d
+error_get_last() expects exactly 0 parameters, 1 given
 NULL
-array(4) {
-  ["type"]=>
-  int(2)
-  ["message"]=>
-  string(54) "error_get_last() expects exactly 0 parameters, 1 given"
-  ["file"]=>
-  string(%i) "%s"
-  ["line"]=>
-  int(4)
-}
 
 Notice: Undefined variable: b in %s on line %d
 array(4) {
@@ -38,6 +31,6 @@ array(4) {
   ["file"]=>
   string(%i) "%s"
   ["line"]=>
-  int(7)
+  int(11)
 }
 Done
index 1bb4d1151cef7a7d7f84067233854b858402d82c..2b681e631dea04eef255e2bf101bf280a8a3c087 100644 (file)
@@ -91,18 +91,6 @@ foreach ($not_float_types as $type ) {
    var_dump( doubleval($type) );
 }
 
-
-
-
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( floatval() );
-var_dump( doubleval() );
-
-//arguments more than expected
-var_dump( floatval(TRUE, FALSE) );
-var_dump( doubleval(TRUE, FALSE) );
-
 echo "\nDone\n";
 
 
@@ -194,18 +182,4 @@ float(1)
 float(0)
 float(0)
 
-*** Testing error conditions ***
-
-Warning: floatval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: doubleval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: floatval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: doubleval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 Done
index 33d4af03d207c817f56698f5e244168aa460a8b0..c74e4f71feef5bd7e1280f115a7f5e58511e6622 100644 (file)
@@ -14,10 +14,14 @@ $result = get_extension_funcs("standard");
 var_dump(gettype($result));
 var_dump(in_array("cos", $result));
 
+// Unknown extension
+var_dump(get_extension_funcs("foo"));
+
 ?>
 ===DONE===
 --EXPECT--
 Simple testcase for get_extension_funcs() function
 string(5) "array"
 bool(true)
+bool(false)
 ===DONE===
diff --git a/ext/standard/tests/general_functions/get_extension_funcs_error.phpt b/ext/standard/tests/general_functions/get_extension_funcs_error.phpt
deleted file mode 100644 (file)
index 44bd822..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-Test get_extension_funcs() function : error conditions
---FILE--
-<?php
-/* Prototype  : array get_extension_funcs  ( string $module_name  )
- * Description: Returns an array with the names of the functions of a module.
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing get_extension_funcs() : error conditions ***\n";
-
-echo "\n-- Too few arguments --\n";
-var_dump(get_extension_funcs());
-
-$extra_arg = 1;
-echo "\n-- Too many arguments --\n";
-var_dump(get_extension_funcs("standard", $extra_arg));
-
-echo "\n-- Invalid extension name --\n";
-var_dump(get_extension_funcs("foo"));
-
-?>
-===DONE===
---EXPECTF--
-*** Testing get_extension_funcs() : error conditions ***
-
--- Too few arguments --
-
-Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Too many arguments --
-
-Warning: get_extension_funcs() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Invalid extension name --
-bool(false)
-===DONE===
index 2017bf697ad12063ec9cf7c13ea7c31a61507c88..5b45c864496f3f79d26884c64128db3a4b12e643 100644 (file)
@@ -19,19 +19,10 @@ if (ini_get("include_path") == get_include_path()) {
        echo "FAILED\n";
 }
 
-echo "\nError cases:\n";
-var_dump(get_include_path(TRUE));
-
-
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing get_include_path()
 string(1) "."
 PASSED
-
-Error cases:
-
-Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 ===DONE===
index e6d00a56a1bc99987cf10b459ad55c625866df43..e4dfe0f9749c004dc15ee2417f3e3ee4e5aaafac 100644 (file)
@@ -22,9 +22,6 @@ include(dirname(__FILE__)."/get_included_files_inc2.inc");
 echo "\n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n";
 var_dump(get_included_files());
 
-echo "\n-- Error cases --\n";
-var_dump(get_included_files(true));
-
 ?>
 ===DONE===
 --EXPECTF--
@@ -55,9 +52,4 @@ array(4) {
   [3]=>
   string(%d) "%sget_included_files_inc3.inc"
 }
-
--- Error cases --
-
-Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 ===DONE===
index 4caca88e1b2f1de5a1bb166159c1ad77039936ac..8ec131809fd5a91bc7bada597cf8e47c063076b1 100644 (file)
@@ -8,16 +8,12 @@ getrusage() tests
 var_dump(gettype(getrusage()));
 var_dump(gettype(getrusage(1)));
 var_dump(gettype(getrusage(-1)));
-var_dump(getrusage(array()));
 
 
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 string(5) "array"
 string(5) "array"
 string(5) "array"
-
-Warning: getrusage() expects parameter 1 to be int, array given in %s on line %d
-NULL
 Done
index a876ac1fea7ce2e4cdf6405038b770ede4d04175..f387161bf4fc14514b925ba4e9cce849c90d70a7 100644 (file)
@@ -12,29 +12,13 @@ Simone Gentili (sensorario@gmail.com)
        var_dump(getservbyport( -1, "tcp" ));
        var_dump(getservbyport( 80, "ppp" ));
        var_dump(getservbyport( null, null));
-       var_dump(getservbyport( array(), array()));
-       var_dump(getservbyport( array(80), array("tcp")));
-       var_dump(getservbyport( array(2, 3), array("one"=>1, "two"=>2)));
        var_dump(getservbyport( 2, 2));
        var_dump(getservbyport( "80", "tcp"));
-       var_dump(getservbyport( new stdClass(), new stdClass()));
 
 ?>
 --EXPECTF--
 bool(false)
 bool(false)
 bool(false)
-
-Warning: getservbyport() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: getservbyport() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: getservbyport() expects parameter 1 to be int, array given in %s on line %d
-NULL
 bool(false)
 string(%d) "%s"
-
-Warning: getservbyport() expects parameter 1 to be int, object given in %s on line %d
-NULL
index 325e91e47f681fb6a4dd21a3891f77a33cb2c81c..e204c64d4c7bd68bdc38219e798a05cd1d05d9db 100644 (file)
@@ -13,19 +13,7 @@ Test gettype() & settype() functions : error conditions
 
 echo "**** Testing gettype() and settype() functions ****\n";
 
-echo "\n*** Testing gettype(): error conditions ***\n";
-//Zero arguments
-var_dump( gettype() );
-// args more than expected
-var_dump( gettype( "1", "2" ) );
-
 echo "\n*** Testing settype(): error conditions ***\n";
-//Zero arguments
-var_dump( settype() );
-
-// args more than expected
-$var = 10.5;
-var_dump( settype( $var, $var, "int" ) );
 
 // passing an invalid type to set
 var_dump( settype( $var, "unknown" ) );
@@ -35,22 +23,8 @@ echo "Done\n";
 --EXPECTF--
 **** Testing gettype() and settype() functions ****
 
-*** Testing gettype(): error conditions ***
-
-Warning: gettype() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: gettype() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 *** Testing settype(): error conditions ***
 
-Warning: settype() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: settype() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: settype(): Invalid type in %s on line %d
 bool(false)
 Done
index 8b6626fbc876a8e68d29446c9dbfe336653120df..de6aa278eb98e8940c08371efc94ae6665e7fdb4 100644 (file)
@@ -6,14 +6,9 @@ include_path=.
 <?php
 
 var_dump(get_include_path());
-var_dump(get_include_path("var"));
 
 var_dump(restore_include_path());
-var_dump(restore_include_path(""));
 
-
-var_dump(set_include_path());
-var_dump(get_include_path());
 var_dump(set_include_path("var"));
 var_dump(get_include_path());
 
@@ -32,9 +27,6 @@ var_dump(get_include_path());
 var_dump(restore_include_path());
 var_dump(get_include_path());
 
-var_dump(set_include_path(array()));
-var_dump(get_include_path());
-
 var_dump(restore_include_path());
 var_dump(get_include_path());
 
@@ -43,18 +35,8 @@ echo "Done\n";
 ?>
 --EXPECTF--
 string(1) "."
-
-Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-NULL
-
-Warning: restore_include_path() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: set_include_path() expects exactly 1 parameter, 0 given in %s on line %d
 NULL
 string(1) "."
-string(1) "."
 string(3) "var"
 NULL
 string(1) "."
@@ -66,10 +48,6 @@ bool(false)
 string(1) "."
 NULL
 string(1) "."
-
-Warning: set_include_path() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-string(1) "."
 NULL
 string(1) "."
 Done
index 7f3d895fbeacb128521b38531fee78798f36b3d7..00b2dc04ab536a7b288b64a693cc7d1494ab0ffe 100644 (file)
@@ -146,13 +146,6 @@ foreach ($not_int_types as $type ) {
    var_dump( intval($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( intval() );
-
-//arguments more than expected
-var_dump( intval(TRUE, FALSE, TRUE) );
-
 echo "\n--- Done ---\n";
 
 
@@ -295,12 +288,4 @@ int(0)
 int(0)
 int(0)
 
-*** Testing error conditions ***
-
-Warning: intval() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: intval() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 --- Done ---
index 223b732904c73b19f41c0887e04068041722da7e..f3b0c75db3b51cbc7ea02efc2d0e3d6ff828c3d6 100644 (file)
@@ -98,13 +98,6 @@ foreach ($varient_arrays as $type ) {
   var_dump( is_array ($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_array() );
-
-//arguments more than expected
-var_dump( is_array ($fp, $fp) );
-
 echo "Done\n";
 /* close resources */
 fclose($fp);
@@ -202,12 +195,4 @@ bool(false)
 bool(false)
 -- Iteration 29 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_array() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_array() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index a6c6111fa1d567725bf61cfdbf906584a8a96c79..4f0ae4fff5640ce584918250812f1b9fa716ec28 100644 (file)
@@ -127,13 +127,6 @@ foreach ($not_bool_types as $type ) {
   var_dump( is_bool($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_bool() );
-
-//arguments more than expected
-var_dump( is_bool(TRUE, FALSE) );
-
 echo "Done\n";
 
 // close resources
@@ -283,12 +276,4 @@ bool(false)
 bool(false)
 -- Iteration 65 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_bool() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_bool() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index 700077ef1765c9dacc582a6d02fce419d088f409..0cb18769d64b8298244e6a46e7de95f58ead5bcc 100644 (file)
@@ -7,7 +7,6 @@ Gabriel Caruso (carusogabriel34@gmail.com)
 var_dump(is_countable([1, 2, 3]));
 var_dump(is_countable((array) 1));
 var_dump(is_countable((object) ['foo', 'bar', 'baz']));
-var_dump(is_countable());
 
 $foo = ['', []];
 
@@ -24,9 +23,6 @@ if (!is_countable($bar)) {
 bool(true)
 bool(true)
 bool(false)
-
-Warning: is_countable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
 int(2)
 
 Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
index b71a5283dbc6e4d0bca82ff9f025ccbe237906e5..0ee1c60959f9c33aa1df14b2cd8424552a4cacec 100644 (file)
@@ -127,17 +127,6 @@ foreach ($not_floats as $value ) {
   var_dump( is_real($value) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_float() );
-var_dump( is_double() );
-var_dump( is_real() );
-
-//arguments more than expected
-var_dump( is_float( $floats[0], $floats[1]) );
-var_dump( is_double( $floats[0], $floats[1]) );
-var_dump( is_real( $floats[0], $floats[1]) );
-
 echo "Done\n";
 
 // close the resources used
@@ -417,24 +406,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_float() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_real() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_float() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_real() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index 9410a21fe259c0125ced834ec21af78443d3aab2..76cbf0c5d271ef8bd1dc37e7081cc79a17beced0 100644 (file)
@@ -129,17 +129,6 @@ foreach ($not_floats as $value ) {
   var_dump( is_real($value) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_float() );
-var_dump( is_double() );
-var_dump( is_real() );
-
-//arguments more than expected
-var_dump( is_float( $floats[0], $floats[1]) );
-var_dump( is_double( $floats[0], $floats[1]) );
-var_dump( is_real( $floats[0], $floats[1]) );
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -414,24 +403,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_float() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_real() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_float() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_real() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index d154b30748f6eb24ee9c79c17da5f0366a79fa0c..2f452cd48b2540773b68be92f63a33a5aa32d225 100644 (file)
@@ -132,17 +132,6 @@ foreach ($not_int_types as $type ) {
    var_dump( is_long($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_int() );
-var_dump( is_integer() );
-var_dump( is_long() );
-
-//arguments more than expected
-var_dump( is_int(TRUE, FALSE) );
-var_dump( is_integer(TRUE, FALSE) );
-var_dump( is_long(TRUE, FALSE) );
-
 echo "Done\n";
 
 // close the resources
@@ -442,24 +431,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_int() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_int() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index 68ef75b35b06dd4a8ea743c0502e7c535fdf5b49..ac919ced167e5ab23fc50350fed11bf1c7677037 100644 (file)
@@ -134,17 +134,6 @@ foreach ($not_int_types as $type ) {
    var_dump( is_long($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_int() );
-var_dump( is_integer() );
-var_dump( is_long() );
-
-//arguments more than expected
-var_dump( is_int(TRUE, FALSE) );
-var_dump( is_integer(TRUE, FALSE) );
-var_dump( is_long(TRUE, FALSE) );
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -439,24 +428,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_int() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_int() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index fa7c87f791796471bfd6d69170bb43e7dab278ca..5a3269a28aa3e6c5edc568e5c355612c9fa48520 100644 (file)
@@ -127,13 +127,6 @@ foreach ($not_null_types as $type ) {
   var_dump( is_null($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_null() );
-
-//arguments more than expected
-var_dump( is_null(NULL, null) );
-
 echo "Done\n";
 
 // close the resources used
@@ -285,12 +278,4 @@ bool(false)
 bool(false)
 -- Iteration 59 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_null() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_null() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index 0019cf18d2fbe39b0cb892bff191be16f12826aa..509ee7e686e57a224930ddc802812e4cf32dbb26 100644 (file)
@@ -145,13 +145,6 @@ foreach ($not_numerics as $type ) {
   var_dump( is_numeric($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_numeric() );
-
-//arguments more than expected
-var_dump( is_numeric("10", "20") );
-
 echo "Done\n";
 
 // close the resources used
@@ -373,12 +366,4 @@ bool(false)
 bool(false)
 -- Iteration 29 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_numeric() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 Done
index 8abc766376e3daa907d9ce250f85bf38fbe3e635..2b5d1ae47545bb0cf02078c1ec6b33a5f207518d 100644 (file)
@@ -138,13 +138,6 @@ foreach ($not_objects as $type ) {
   var_dump( is_object($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_object() );
-
-//arguments more than expected
-var_dump( is_object($myClass_object, $myClass_object) );
-
 echo "Done\n";
 
 // close the resources used
@@ -216,12 +209,4 @@ bool(false)
 bool(false)
 -- Iteration 19 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_object() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_object() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index 53620178c4aa290aa53a93769bfe04d7da00a08c..f7ef3f53175443c2b40b03a1c836b3e3a3cf4167 100644 (file)
@@ -105,14 +105,6 @@ foreach( $variation_array as $value ) {
   var_dump( is_scalar($value) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-// Zero arguments
-var_dump( is_scalar() );
-
-// Arguments more than expected
-var_dump( is_scalar( $scalar_variables[2], $scalar_variables[2]) );
-var_dump( is_scalar( new stdclass, new stdclass) );
-
 echo "Done\n";
 
 // close the resources used
@@ -226,15 +218,4 @@ bool(false)
 bool(false)
 -- Iteration 18 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_scalar() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_scalar() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: is_scalar() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 Done
index 72a885a57a21e2e6e44bee322e5a3fa3b480572d..d48fbd17299a6d539d08a72d0e677a0394da6bce 100644 (file)
@@ -140,13 +140,6 @@ foreach ($not_strings as $type ) {
   var_dump( is_string($type) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_string() );
-
-//arguments more than expected
-var_dump( is_string("string", "test") );
-
 echo "Done\n";
 
 // close the resources used
@@ -292,12 +285,4 @@ bool(false)
 bool(false)
 -- Iteration 45 --
 bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_string() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_string() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
 Done
index 0664043eba6d852e9c85756fd24d6be26e1ddff9..5603e3d238ffc02a1f2dde0778f2bb491113c967 100644 (file)
@@ -12,10 +12,6 @@ output_buffering=0
 
 echo "*** Testing ob_get_flush() : error conditions ***\n";
 
-// One extra argument
-$extra_arg = 10;
-var_dump( ob_get_flush( $extra_arg ) );
-
 // No ob_start() executed
 var_dump( ob_get_flush() );
 
@@ -24,9 +20,6 @@ var_dump( ob_get_flush() );
 --EXPECTF--
 *** Testing ob_get_flush() : error conditions ***
 
-Warning: ob_get_flush() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
 Notice: ob_get_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line %d
 bool(false)
 ===DONE===
index b3470bec5598b1aa9c5a7125b60aaf40f86007bd..75e22e7741d62f1c5532cebbad5285d7175010c9 100644 (file)
@@ -31,9 +31,6 @@ dump_string_length( '            lsf' );
 dump_string_length( '' );
 dump_string_length( null );
 
-// Extra argument
-var_dump( ob_get_length( 'foobar' ) );
-
 ?>
 ===DONE===
 --EXPECTF--
@@ -45,7 +42,4 @@ int(1)
 int(15)
 int(0)
 int(0)
-
-Warning: ob_get_length() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 ===DONE===
index ebc714455dcdc29587b9575aa843b2a73cfaecd7..14c1fc18efe3f884840b4bd77ba9d999eb8236d3 100644 (file)
@@ -8,8 +8,6 @@ parse_ini_file() multiple calls
 $filename = dirname(__FILE__)."/parse_ini_file.dat";
 @unlink($filename); /* Make sure the file really does not exist! */
 
-var_dump(parse_ini_file());
-var_dump(parse_ini_file(1,1,1,1));
 var_dump(parse_ini_file($filename));
 var_dump(parse_ini_file($filename, true));
 
@@ -121,16 +119,10 @@ var_dump(parse_ini_file($filename, true));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: parse_ini_file() expects at least 1 parameter, 0 given in %sparse_ini_file.php on line 6
+Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line %d
 bool(false)
 
-Warning: parse_ini_file() expects at most 3 parameters, 4 given in %sparse_ini_file.php on line 7
-bool(false)
-
-Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line 8
-bool(false)
-
-Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line 9
+Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line %d
 bool(false)
 array(1) {
   ["test"]=>
@@ -138,11 +130,11 @@ array(1) {
 }
 
 Warning: syntax error, unexpected '='%sparse_ini_file.dat on line 2
- in %sparse_ini_file.php on line 20
+ in %sparse_ini_file.php on line %d
 bool(false)
 
 Warning: syntax error, unexpected '='%sparse_ini_file.dat on line 2
- in %sparse_ini_file.php on line 26
+ in %sparse_ini_file.php on line %d
 bool(false)
 array(1) {
   ["test"]=>
index 106cd0c84246ce46902dafb9f1e70bc2080a934b..384398cdb2013db38dcdb4d4aca1916e10a63ea7 100644 (file)
@@ -3,9 +3,6 @@ parse_ini_string() multiple calls
 --FILE--
 <?php
 
-var_dump(parse_ini_string());
-var_dump(parse_ini_string(1,1,1,1));
-
 $ini = "
 test =
 ";
@@ -87,11 +84,6 @@ var_dump(parse_ini_string($ini, true));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: parse_ini_string() expects at least 1 parameter, 0 given in %s
-bool(false)
-
-Warning: parse_ini_string() expects at most 3 parameters, 4 given in %s
-bool(false)
 array(1) {
   ["test"]=>
   string(0) ""
index 392e1c930e3918fd5e0e783dd347901a5f1ddf7f..ec5b2b5839d163d8b6e348f90652b18721b59bba 100644 (file)
@@ -8,49 +8,15 @@ Test php_uname() function -  error conditions - pass function incorrect argument
 
 echo "*** Testing php_uname() - error test\n";
 
-echo "\n-- Testing php_uname() function with more than expected no. of arguments --\n";
-var_dump( php_uname('a', true) );
-
 echo "\n-- Testing php_uname() function with invalid mode --\n";
 // am invalid mode should result in same o/p as mode 'a'
 var_dump( php_uname('z') == php_uname('z') );
 
-class barClass {
-}
-
-$fp = fopen(__FILE__, "r");
-
-echo "\n-- Testing php_uname() function with invalid argument types --\n";
-var_dump(php_uname(array()));
-var_dump(php_uname(array('color' => 'red', 'item' => 'pen')));
-var_dump(php_uname(new barClass()));
-var_dump(php_uname($fp));
-
-fclose($fp);
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing php_uname() - error test
 
--- Testing php_uname() function with more than expected no. of arguments --
-
-Warning: php_uname() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
 -- Testing php_uname() function with invalid mode --
 bool(true)
-
--- Testing php_uname() function with invalid argument types --
-
-Warning: php_uname() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: php_uname() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: php_uname() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: php_uname() expects parameter 1 to be string, resource given in %s on line %d
-NULL
 ===DONE===
index 044232570e9947a90674080eb5cc7cb2d5d3c82e..dfcddc61f39dbbceffc7b6386c0ecc79aa1aabe1 100644 (file)
@@ -4,7 +4,6 @@ phpcredits()
 <?php
 
 var_dump(phpcredits());
-var_dump(phpcredits(array()));
 
 echo "--\n";
 var_dump(phpcredits(0));
@@ -40,9 +39,6 @@ PHP Quality Assurance Team
 %wWebsites and Infrastructure team%w
 %a
 bool(true)
-
-Warning: phpcredits() expects parameter 1 to be int, array given in %sphpcredits.php on line 4
-NULL
 --
 PHP Credits
 bool(true)
index 9966f23a96f661b496d67edde87d2babdb8ad199..6aa023e919f593f970db26fcf7065f32797b2fcd 100644 (file)
@@ -6,7 +6,6 @@ dummy=x
 <?php
 
 var_dump(phpcredits());
-var_dump(phpcredits(array()));
 
 echo "--\n";
 var_dump(phpcredits(0));
@@ -18,9 +17,6 @@ var_dump(phpcredits(CREDITS_GROUP));
 --EXPECTF--
 <!DOCTYPE %a>%s</html>
 bool(true)
-
-Warning: phpcredits() expects parameter 1 to be int, array given in %sphpcredits2.php on line 4
-NULL
 --
 <h1>PHP Credits</h1>
 bool(true)
index a805876aab4c9576be1e551e719e5f2911db02ab..5f4d99ffbaf2e898cd57b58723c5b28fbb54eb06 100644 (file)
@@ -4,9 +4,6 @@ phpinfo()
 <?php
 var_dump(phpinfo());
 
-echo "--\n";
-var_dump(phpinfo(array()));
-
 echo "--\n";
 var_dump(phpinfo(0));
 
@@ -62,10 +59,6 @@ PHP License
 %A
 bool(true)
 --
-
-Warning: phpinfo() expects parameter 1 to be int, array given in %sphpinfo.php on line 5
-NULL
---
 phpinfo()
 bool(true)
 --
index f422f923d9b3a4930534650c74e7cb1f3e6a0862..5a36aa9d28c06b66df96fbfaac73f0f41d1986ae 100644 (file)
@@ -6,9 +6,6 @@ dummy=x
 <?php
 var_dump(phpinfo());
 
-echo "--\n";
-var_dump(phpinfo(array()));
-
 echo "--\n";
 var_dump(phpinfo(0));
 
@@ -20,10 +17,6 @@ var_dump(phpinfo(INFO_LICENSE));
 <!DOCTYPE %s>
 %a</html>bool(true)
 --
-
-Warning: phpinfo() expects parameter 1 to be int, array given in %sphpinfo2.php on line 5
-NULL
---
 <!DOCTYPE %s>
 %a</html>bool(true)
 --
index de58dd1e1e9e17db1b8262f7a10c1c1183ee158b..15155fe0d242081f5879e1365583445e9c725d8a 100644 (file)
@@ -271,16 +271,6 @@ $misc_values = array (
 /* calling check_printr() to display miscelleneous data using print_r() */
 check_printr($misc_values);
 
-echo "\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump( print_r() );
-
-//passing more than required no. of arguments
-var_dump( print_r(123, true, "abc") );
-
-// check when second arg is given other than boolean TRUE
-var_dump( print_r ($value, "string") );
-
 /* closing resource handle used */
 closedir($dir_handle);
 
@@ -1706,15 +1696,4 @@ Array
 -- Iteration 4 --
 
 
-
-*** Testing error conditions ***
-
-Warning: print_r() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: print_r() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: value in %s on line %d
-string(0) ""
 Done
index ff9c3c0b9c54e180abe7e1db1cc93cb3b742d8ec..db5b92bf84eda59b13a904e906ddb1ef46fe0fdc 100644 (file)
@@ -275,16 +275,6 @@ $misc_values = array (
 /* calling check_printr() to display miscelleneous data using print_r() */
 check_printr($misc_values);
 
-echo "\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump( print_r() );
-
-//passing more than required no. of arguments
-var_dump( print_r(123, true, "abc") );
-
-// check when second arg is given other than boolean TRUE
-var_dump( print_r ($value, "string") );
-
 /* closing resource handle used */
 closedir($dir_handle);
 
@@ -1710,15 +1700,4 @@ Array
 -- Iteration 4 --
 
 
-
-*** Testing error conditions ***
-
-Warning: print_r() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: print_r() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: value in %s on line %d
-string(0) ""
 Done
index e6639a71c7bf368412943882c758f0d3a2387655..73dec4eb75ff16a076b5bfb9270c1c2815685923 100644 (file)
@@ -4,60 +4,36 @@ rand() and mt_rand() tests
 <?php
 
 var_dump(mt_rand());
-var_dump(mt_rand(-1));
 var_dump(mt_rand(-1,1));
 var_dump(mt_rand(0,3));
 
 var_dump(rand());
-var_dump(rand(-1));
 var_dump(rand(-1,1));
 var_dump(rand(0,3));
 
 var_dump(srand());
 var_dump(srand(-1));
-var_dump(srand(array()));
 
 var_dump(mt_srand());
 var_dump(mt_srand(-1));
-var_dump(mt_srand(array()));
 
 var_dump(getrandmax());
-var_dump(getrandmax(1));
 
 var_dump(mt_getrandmax());
-var_dump(mt_getrandmax(1));
 
 echo "Done\n";
 ?>
 --EXPECTF--
 int(%d)
-
-Warning: mt_rand() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
 int(%i)
 int(%d)
 int(%d)
-
-Warning: rand() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
 int(%i)
 int(%d)
 NULL
 NULL
-
-Warning: srand() expects parameter 1 to be int, array given in %s on line %d
-NULL
-NULL
 NULL
-
-Warning: mt_srand() expects parameter 1 to be int, array given in %s on line %d
 NULL
 int(%d)
-
-Warning: getrandmax() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 int(%d)
-
-Warning: mt_getrandmax() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
 Done
index c4f069a3d2a556188176f5fb48d17ca1c39c5519..3b46a35e5dc36755f7c6085c29d5f7ffca0c6790 100644 (file)
@@ -10,14 +10,6 @@ Test sleep() function : error conditions
 
 echo "*** Testing sleep() : error conditions ***\n";
 
-echo "\n-- Testing sleep() function with zero arguments --\n";
-var_dump( sleep() );
-
-echo "\n-- Testing sleep() function with more than expected no. of arguments --\n";
-$seconds = 10;
-$extra_arg = 10;
-var_dump( sleep($seconds, $extra_arg) );
-
 echo "\n-- Testing sleep() function with negative interval --\n";
 $seconds = -10;
 var_dump( sleep($seconds) );
@@ -27,16 +19,6 @@ var_dump( sleep($seconds) );
 --EXPECTF--
 *** Testing sleep() : error conditions ***
 
--- Testing sleep() function with zero arguments --
-
-Warning: sleep() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing sleep() function with more than expected no. of arguments --
-
-Warning: sleep() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
 -- Testing sleep() function with negative interval --
 
 Warning: sleep(): Number of seconds must be greater than or equal to 0 in %s on line %d
index b814733dd07205c85303b55a029dc67bae12b1eb..0e513a3c47dc3e181ad30b06f749d727511ae031 100644 (file)
@@ -141,13 +141,6 @@ foreach ($not_scalars as $value ) {
    var_dump( strval($value) );
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( strval() );
-
-//arguments more than expected
-var_dump( strval( $scalars[0], $scalars[1]) );
-
 echo "Done\n";
 
 // close the resources used
@@ -306,12 +299,4 @@ string(0) ""
 string(0) ""
 -- Iteration 11 --
 string(0) ""
-
-*** Testing error conditions ***
-
-Warning: strval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: strval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
 Done
index 5763084f700a2ced5acaf9008599667b41c706e6..1775978a120d927d4be462022ff12e7b485dfcda 100644 (file)
@@ -7,14 +7,11 @@ if (!function_exists("sys_getloadavg")) die("skip");
 --FILE--
 <?php
 
-var_dump(sys_getloadavg(""));
 var_dump(sys_getloadavg());
 
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: sys_getloadavg() expects exactly 0 parameters, %d given in %s
-NULL
 array(3) {
   [0]=>
   float(%f)
index 474aab7d5dd576ce2e3f3189c76a14a7856f4787..283e7f30e5bc60968370b880eb15ad0c19a3f933 100644 (file)
@@ -11,14 +11,6 @@ set_time_limit(20);
 
 echo "*** Testing usleep() : error conditions ***\n";
 
-echo "\n-- Testing usleep() function with zero arguments --\n";
-var_dump( usleep() );
-
-echo "\n-- Testing usleep() function with more than expected no. of arguments --\n";
-$seconds = 10;
-$extra_arg = 10;
-var_dump( usleep($seconds, $extra_arg) );
-
 echo "\n-- Testing usleep() function with negative interval --\n";
 $seconds = -10;
 var_dump( usleep($seconds) );
@@ -28,16 +20,6 @@ var_dump( usleep($seconds) );
 --EXPECTF--
 *** Testing usleep() : error conditions ***
 
--- Testing usleep() function with zero arguments --
-
-Warning: usleep() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing usleep() function with more than expected no. of arguments --
-
-Warning: usleep() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
 -- Testing usleep() function with negative interval --
 
 Warning: usleep(): Number of microseconds must be greater than or equal to 0 in %s on line %d
index 74f497da6527fab16328ce2abd73822e29723b52..5de84c531eb9b5ad03881a9732a357a5fd2be9f4 100644 (file)
@@ -274,10 +274,6 @@ echo "\n*** Testing var_dump() on multiple arguments ***\n";
 var_dump( $integers, $floats, $strings, $arrays, $booleans, $resources,
           $objects, $misc_values, $variations );
 
-echo "\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump();
-
 /* closing resource handle used */
 closedir($dir_handle);
 
@@ -1553,8 +1549,4 @@ array(6) {
     string(5) "/00\7"
   }
 }
-
-*** Testing error conditions ***
-
-Warning: var_dump() expects at least 1 parameter, 0 given in %s on line %d
 Done
index 8440ffaf6e508a0f5280893919997775d9fba6fa..0815c9d62f32bbdfce9a000836311427a317db66 100644 (file)
@@ -274,10 +274,6 @@ echo "\n*** Testing var_dump() on multiple arguments ***\n";
 var_dump( $integers, $floats, $strings, $arrays, $booleans, $resources,
           $objects, $misc_values, $variations );
 
-echo "\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump();
-
 /* closing resource handle used */
 closedir($dir_handle);
 
@@ -1553,8 +1549,4 @@ array(6) {
     string(5) "/00\7"
   }
 }
-
-*** Testing error conditions ***
-
-Warning: var_dump() expects at least 1 parameter, 0 given in %s on line %d
 Done
index e8939f1d0a2c07bccf3478dbe98942acfc724323..52896eb788f1cb2e5671784836aab82e32beaa08 100644 (file)
@@ -300,14 +300,7 @@ echo "\n";
 $counter++;
 }
 
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_export( var_export() );
-
-//arguments more than expected
-var_export( var_export(TRUE, FALSE, TRUE) );
-
-echo "\n\nDone";
+echo "\nDone";
 
 
 ?>
@@ -1135,11 +1128,4 @@ NULL
 string(4) "NULL"
 
 
-*** Testing error conditions ***
-
-Warning: var_export() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-Warning: var_export() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 Done
index 8418a4b8c7dfb4cd6f975f99dcf50d977a5b33e4..249df579436cadbabb7dc39fe95f2e1f7a92c740 100644 (file)
@@ -29,12 +29,8 @@ image_type_to_extension()
         printf("Constant: %s\n\tWith dot: %s\n\tWithout dot: %s\n", $name, image_type_to_extension($constant), image_type_to_extension($constant, false));
     }
 
-    var_dump(image_type_to_extension(-1, array()));
-    var_dump(image_type_to_extension(new stdclass));
     var_dump(image_type_to_extension(1000000, NULL));
-    var_dump(image_type_to_extension());
     var_dump(image_type_to_extension(0));
-    var_dump(image_type_to_extension(0, 0, 0));
 ?>
 Done
 --EXPECTF--
@@ -89,18 +85,6 @@ Constant: IMAGETYPE_XBM
 Constant: IMAGETYPE_WEBP
        With dot: .webp
        Without dot: webp
-
-Warning: image_type_to_extension() expects parameter 2 to be bool, array given in %s on line %d
-bool(false)
-
-Warning: image_type_to_extension() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
 bool(false)
-
-Warning: image_type_to_extension() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-bool(false)
-
-Warning: image_type_to_extension() expects at most 2 parameters, 3 given in %s on line %d
 bool(false)
 Done
index 5575ec579601bacd437c3f94ca2fee280198b8ad..4fe8437fd581db04a7e12bb210e9446d55b2510b 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(NAN)
 float(NAN)
 float(NAN)
 float(NAN)
-
-Warning: acos() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(NAN)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index cc89ce3e7681e8f2015257e7c9f092c102793be5..12200e035cef949e3a34ebb0f648bf7f3a99eed9 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(3.828168471)
 float(3.828168471)
 float(3.847562739)
 float(3.847562739)
-
-Warning: acosh() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(7.60090221)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index c8063849fd47dd181bd447b9842d12d44846e4ac..c5d170e8dbdceed4471e042bb12101d90b29dc57 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(NAN)
 float(NAN)
 float(NAN)
 float(NAN)
-
-Warning: asin() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(NAN)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 5e41a4590050cda691f9f6efa21cf2a009799311..2470f7d401f3482fdf3adc9054231c1e271fb497 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(3.829113652)
 float(3.829113652)
 float(3.848471992)
 float(3.848471992)
-
-Warning: asinh() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(7.60090271)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index b6a9a9ec32f84fcb62fe5960fcdedd24edef8aba..625b6d0b8312a14b2acb9d818c63f724f90c92c1 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(1.527345431)
 float(1.527345431)
 float(1.528178225)
 float(1.528178225)
-
-Warning: atan() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(1.569796327)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 2b0a4b108547f0598411c02366bf5a6d4e9d893c..f14406bb0d26a41288ac6d578648766034632e13 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(NAN)
 float(NAN)
 float(NAN)
 float(NAN)
-
-Warning: atanh() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(NAN)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index f27d0a66cf9ea41df893fd61637b39a717bb2be6..7e1a12c8bc7c21a53fd604a26351801098a11e5d 100644 (file)
@@ -14,30 +14,18 @@ class classA
 {
 }
 
-echo "Incorrect number of arguments\n";
-base_convert();
-base_convert(35);
-base_convert(35,2);
+echo "Incorrect input\n";
 base_convert(1234, 1, 10);
 base_convert(1234, 10, 37);
-
-echo "Incorrect input\n";
 base_convert(new classA(), 8, 10);
 
 ?>
 --EXPECTF--
 *** Testing base_convert() : error conditions ***
-Incorrect number of arguments
-
-Warning: base_convert() expects exactly 3 parameters, 0 given in %s on line %d
-
-Warning: base_convert() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: base_convert() expects exactly 3 parameters, 2 given in %s on line %d
+Incorrect input
 
 Warning: base_convert(): Invalid `from base' (1) in %s on line %d
 
 Warning: base_convert(): Invalid `to base' (37) in %s on line %d
-Incorrect input
 
 Recoverable fatal error: Object of class classA could not be converted to string in %s on line %d
index 6323042dc7d9afcf89f09e41749e8fe8ae8a125c..f9d1b262460a6a830ebfb4f2d233ee45579cbf7d 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(-0.5328330203)
 float(-0.5328330203)
 float(-0.1117112391)
 float(-0.1117112391)
-
-Warning: cos() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(0.5623790763)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index cd64670668cc552d0917ae187d62826a3b3e5405..ec58c0151f92303b6fdcdcd5c510a2f524ce986a 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(4872401723)
 float(4872401723)
 float(7641446995)
 float(7641446995)
-
-Warning: cosh() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(INF)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index d5f6920ea7a728a537291f6ee5993e954b1e8aa5..eb3c7eae0e10db960e4bfa67d782597a9f19bf08 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(0.401425728)
 float(0.401425728)
 float(0.4092797096)
 float(0.4092797096)
-
-Warning: deg2rad() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(17.45329252)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 44304f24754c15986f1149a012c3fcc5bb8252a2..7660f67c2430d9aed8c84ba26a4bc591755d4bde 100644 (file)
@@ -21,22 +21,6 @@ if ($i != 100) {
        echo "PASSED\n";
 }
 
-echo "\n lcg_value error cases..\n";
-$res = lcg_value(23);
-
-if (is_null($res)) {
-       echo "PASSED\n";
-} else {
-       echo "FAILED\n";
-}
-
-$res = lcg_value(10,false);
-if (is_null($res)) {
-       echo "PASSED\n";
-} else {
-       echo "FAILED\n";
-}
-
 echo "MATHS test script completed\n";
 
 ?>
@@ -44,13 +28,5 @@ echo "MATHS test script completed\n";
 MATHS test script started
 
  lcg_value tests...
-PASSED
-
- lcg_value error cases..
-
-Warning: lcg_value() expects exactly 0 parameters, 1 given in %slcg_value_basic.php on line %d
-PASSED
-
-Warning: lcg_value() expects exactly 0 parameters, 2 given in %slcg_value_basic.php on line %d
 PASSED
 MATHS test script completed
index 530432595283813823baa90dfe21cfb412133663..8dbea47a8463718f8cbbf80bdf59705e49877a97 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(1.361727836)
 float(1.361727836)
 float(1.370142847)
 float(1.370142847)
-
-Warning: log10() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(3)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 48a23df3c0e4dfb43237eadc355f99b2ff494e43..7c305a4cba86c593f386aa5233138fe561e68449 100644 (file)
@@ -4,13 +4,7 @@ Test log() - wrong params test log()
 precision=14
 --FILE--
 <?php
-log();
-log(36,4,true);
 log(36, -4);
 ?>
 --EXPECTF--
-Warning: log() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: log() expects at most 2 parameters, 3 given in %s on line %d
-
 Warning: log(): base must be greater than 0 in %s on line %d
index 596a1940a41d2dbcefabfe4d9538875ac715261d..6ea7d0c8a459860909ac4393e46691c59c6b2d43 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(1317.802929)
 float(1317.802929)
 float(1343.58603)
 float(1343.58603)
-
-Warning: rad2deg() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(57295.77951)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 5b635dfbdcc2a144824a6fb53b5f1bef083676aa..d044a16b405e2b18bd15bacb528d1ab4ed7e2b9f 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(-0.8462204042)
 float(-0.8462204042)
 float(-0.9937407102)
 float(-0.9937407102)
-
-Warning: sin() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(0.8268795405)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index e47e94d629f9febfcc1eb67dd982f7601c0ce5a8..5e576f447f68e2bea44a6f6f376bf4fc959f05c5 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(4872401723)
 float(4872401723)
 float(7641446995)
 float(7641446995)
-
-Warning: sinh() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(INF)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 7369b98dfdac1887d172af526f204eeb402cd28a..6e2304b437d7405de5924d3cca033baab93ba90e 100644 (file)
@@ -22,7 +22,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -47,9 +46,6 @@ float(4.7958315233127)
 float(4.7958315233127)
 float(4.8425200051213)
 float(4.8425200051213)
-
-Warning: sqrt() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(31.622776601684)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 81546bbf6fa9b075e41ff69327de3779ffb5089f..2c9ede47387ecb10b2b48380b463cb09ef735233 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(1.588153083)
 float(1.588153083)
 float(8.895619796)
 float(8.895619796)
-
-Warning: tan() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(1.470324156)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index b1b477c150bc9fbd5a8941765eca483df12fc8ec..907f802b8a32845d8f83963cefa799d756def499 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
                "23",
                "23.45",
                "2.345e1",
-               "nonsense",
                "1000",
                "1000ABC",
                null,
@@ -44,9 +43,6 @@ float(1)
 float(1)
 float(1)
 float(1)
-
-Warning: tanh() expects parameter 1 to be float, string given in %s on line %d
-NULL
 float(1)
 
 Notice: A non well formed numeric value encountered in %s on line %d
index 049c8b9431ce650709c04909b518f80f6a863809..cf15e3c5ef3bf848d9ecb4f573d883074bd64b19 100644 (file)
@@ -30,9 +30,6 @@ echo "*** Testing get_browser() : error functionality ***\n";
 /* Unknown browser uses defaults. */
 var_dump( get_browser( 'foobar', true ) );
 
-/* More than expected arguments */
-var_dump( get_browser( 'foobar', true, 15 ) );
-
 /* Some wrong parameters, no HTTP_USER_AGENT set */
 var_dump( get_browser( null, 'foobar' ) );
 
@@ -111,9 +108,6 @@ array(34) {
   string(1) "0"
 }
 
-Warning: get_browser() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: get_browser(): HTTP_USER_AGENT variable is not set, cannot determine user agent name in %s on line %d
 bool(false)
 ===DONE===
index 638412b47f4daf9f8ac09012619fff98cfb47e74..ea08335f2df4a47957c91757e2cecb45c8e8ea3c 100644 (file)
@@ -11,21 +11,6 @@ Test fsockopen() function : error conditions
 
 echo "*** Testing fsockopen() : basic error conditions ***\n";
 
-
-echo "\n-- Testing fsockopen() function with more than expected no. of arguments --\n";
-$hostname = 'string_val';
-$port = 10;
-$errno = 10;
-$errstr = 'string_val';
-$timeout = 10.5;
-$extra_arg = 10;
-var_dump( fsockopen($hostname, $port, $errno, $errstr, $timeout, $extra_arg) );
-var_dump($errstr);
-var_dump($errno);
-
-echo "\n-- Testing fsockopen() function with less than expected no. of arguments --\n";
-var_dump( fsockopen() );
-
 echo "\n-- Attempting to connect to a non-existent socket --\n";
 $hostname = 'tcp://127.0.0.1'; // loopback address
 $port = 31337;
@@ -49,18 +34,6 @@ echo "Done";
 --EXPECTF--
 *** Testing fsockopen() : basic error conditions ***
 
--- Testing fsockopen() function with more than expected no. of arguments --
-
-Warning: fsockopen() expects at most 5 parameters, 6 given in %s on line %d
-bool(false)
-string(10) "string_val"
-int(10)
-
--- Testing fsockopen() function with less than expected no. of arguments --
-
-Warning: fsockopen() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
 -- Attempting to connect to a non-existent socket --
 
 Warning: fsockopen(): unable to connect to tcp://127.0.0.1:31337 (%a) in %s on line %d
index f7982d5ca47112a8ec8f6c7b46707856afdba66c..a33a71185f65c71ec93c8563e40616c23c73ec12 100644 (file)
@@ -11,16 +11,6 @@ Test gethostbyaddr() function : error conditions
 
 echo "Testing gethostbyaddr : error conditions\n";
 
-// Zero arguments
-echo "\n-- Testing gethostbyaddr function with Zero arguments --\n";
-var_dump( gethostbyaddr() );
-
-//Test gethostbyaddr with one more than the expected number of arguments
-echo "\n-- Testing gethostbyaddr function with more than expected no. of arguments --\n";
-$ip_address = 'string_val';
-$extra_arg = 10;
-var_dump( gethostbyaddr($ip_address, $extra_arg) );
-
 echo "\n-- Testing gethostbyaddr function with invalid addresses --\n";
 
 $ip_address = 'invalid';
@@ -37,16 +27,6 @@ echo "Done";
 --EXPECTREGEX--
 Testing gethostbyaddr : error conditions
 
--- Testing gethostbyaddr function with Zero arguments --
-
-Warning: gethostbyaddr\(\) expects exactly 1 parameter, 0 given in .* on line \d+
-NULL
-
--- Testing gethostbyaddr function with more than expected no. of arguments --
-
-Warning: gethostbyaddr\(\) expects exactly 1 parameter, 2 given in .* on line \d+
-NULL
-
 -- Testing gethostbyaddr function with invalid addresses --
 
 Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or IPv6 address) in .* on line \d+
index e7caaf48eb2e279863c669d18e1bbd0e03581e8d..57f4c498d0f0e4ccf0202096a9585466e85be5cf 100644 (file)
@@ -5,10 +5,6 @@ marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao p
 --FILE--
 <?php
 var_dump(gethostname());
-var_dump(gethostname("php-zend-brazil"));
 ?>
 --EXPECTF--
-%s
-
-Warning: gethostname() expects exactly %d parameters, %d given in %s on line %d
-NULL
+string(%d) "%s"
index 7ee366ac7afc19cca4507eea3519311228b6ce9a..52ef3b8ee08e0d1e7dd9ea07b57e1d63db051444 100644 (file)
@@ -4,13 +4,8 @@ getprotobyname function errors test
 edgarsandi - <edgar.r.sandi@gmail.com>
 --FILE--
 <?php
-       // empty protocol name
-       var_dump(getprotobyname());
-
-       // invalid protocol name
-       var_dump(getprotobyname('abc'));
+// invalid protocol name
+var_dump(getprotobyname('abc'));
 ?>
---EXPECTF--
-Warning: getprotobyname() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
 bool(false)
index 7df12e864a92a59cba29f70f47db4004a8c6fd8d..dda2661b5adade8564383b39b6a55e7ab45ae387 100644 (file)
@@ -4,13 +4,8 @@ getprotobynumber function errors test
 edgarsandi - <edgar.r.sandi@gmail.com>
 --FILE--
 <?php
-       // empty protocol number
-       var_dump(getprotobynumber());
-
-       // invalid protocol number
-       var_dump(getprotobynumber(999));
+// invalid protocol number
+var_dump(getprotobynumber(999));
 ?>
---EXPECTF--
-Warning: getprotobynumber() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
 bool(false)
index a1e70a002038b7e4e29c71de2ea3ce785e96b628..81db0016b57c0ddacaf436ac61c9ae0fe18273bf 100644 (file)
@@ -14,12 +14,10 @@ var_dump(inet_ntop($packed));
 $packed = chr(255) . chr(255) . chr(255) . chr(0);
 var_dump(inet_ntop($packed));
 
-var_dump(inet_ntop());
 var_dump(inet_ntop(-1));
 var_dump(inet_ntop(""));
 var_dump(inet_ntop("blah-blah"));
 
-var_dump(inet_pton());
 var_dump(inet_pton(""));
 var_dump(inet_pton(-1));
 var_dump(inet_pton("abra"));
@@ -40,15 +38,9 @@ echo "Done\n";
 --EXPECTF--
 string(9) "127.0.0.1"
 string(13) "255.255.255.0"
-
-Warning: inet_ntop() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 bool(false)
 bool(false)
-
-Warning: inet_pton() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
 bool(false)
 bool(false)
 bool(false)
index 5237c8977695632edf0c7d432c2301e5419eaea2..831eee018a66c85487329e584eb0a25f161e9ae0 100644 (file)
@@ -21,16 +21,11 @@ foreach ($array as $ip) {
        var_dump(long2ip($long));
 }
 
-var_dump(ip2long());
 var_dump(ip2long(""));
 var_dump(ip2long("777.777.777.777"));
 var_dump(ip2long("111.111.111.111"));
-var_dump(ip2long(array()));
 
-var_dump(long2ip());
 var_dump(long2ip(-110000));
-var_dump(long2ip(""));
-var_dump(long2ip(array()));
 
 echo "Done\n";
 ?>
@@ -47,23 +42,8 @@ int(0)
 string(7) "0.0.0.0"
 int(1118019956)
 string(14) "66.163.161.116"
-
-Warning: ip2long() expects exactly 1 parameter, 0 given in %sip.php on line %d
-NULL
 bool(false)
 bool(false)
 int(1869573999)
-
-Warning: ip2long() expects parameter 1 to be string, array given in %sip.php on line %d
-NULL
-
-Warning: long2ip() expects exactly 1 parameter, 0 given in %sip.php on line %d
-NULL
 string(13) "255.254.82.80"
-
-Warning: long2ip() expects parameter 1 to be int, string given in %sip.php on line %d
-NULL
-
-Warning: long2ip() expects parameter 1 to be int, array given in %sip.php on line %d
-NULL
 Done
index 3c530b8371352de8cb9aa60c386b573f9583c466..06ed1549a60f84ba5f1fd6e1f227433335daf1b7 100644 (file)
@@ -21,16 +21,11 @@ foreach ($array as $ip) {
        var_dump(long2ip($long));
 }
 
-var_dump(ip2long());
 var_dump(ip2long(""));
 var_dump(ip2long("777.777.777.777"));
 var_dump(ip2long("111.111.111.111"));
-var_dump(ip2long(array()));
 
-var_dump(long2ip());
 var_dump(long2ip(-110000));
-var_dump(long2ip(""));
-var_dump(long2ip(array()));
 
 echo "Done\n";
 ?>
@@ -47,23 +42,8 @@ int(0)
 string(7) "0.0.0.0"
 int(1118019956)
 string(14) "66.163.161.116"
-
-Warning: ip2long() expects exactly 1 parameter, 0 given in %sip_x86_64.php on line %d
-NULL
 bool(false)
 bool(false)
 int(1869573999)
-
-Warning: ip2long() expects parameter 1 to be string, array given in %sip_x86_64.php on line %d
-NULL
-
-Warning: long2ip() expects exactly 1 parameter, 0 given in %sip_x86_64.php on line %d
-NULL
 string(13) "255.254.82.80"
-
-Warning: long2ip() expects parameter 1 to be int, string given in %sip_x86_64.php on line %d
-NULL
-
-Warning: long2ip() expects parameter 1 to be int, array given in %sip_x86_64.php on line %d
-NULL
 Done
index 89ca127bc42b19061c5d85a01d2d443ba8ce2430..04a8249ced727120457e125244854f783e3ce730 100644 (file)
@@ -4,25 +4,31 @@ Test error operation of password_hash()
 <?php
 //-=-=-=-
 
-var_dump(password_hash());
-
-var_dump(password_hash("foo"));
+try {
+    var_dump(password_hash("foo"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 var_dump(password_hash("foo", array()));
 
 var_dump(password_hash("foo", 19, new StdClass));
 
-var_dump(password_hash("foo", PASSWORD_BCRYPT, "baz"));
+try {
+    var_dump(password_hash("foo", PASSWORD_BCRYPT, "baz"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
-var_dump(password_hash(array(), PASSWORD_BCRYPT));
+try {
+    var_dump(password_hash(array(), PASSWORD_BCRYPT));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 --EXPECTF--
-Warning: password_hash() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: password_hash() expects at least 2 parameters, 1 given in %s on line %d
-NULL
+password_hash() expects at least 2 parameters, 1 given
 
 Notice: Array to string conversion in %s on line %d
 
@@ -31,9 +37,5 @@ NULL
 
 Warning: password_hash(): Unknown password hashing algorithm: 19 in %s on line %d
 NULL
-
-Warning: password_hash() expects parameter 3 to be array, string given in %s on line %d
-NULL
-
-Warning: password_hash() expects parameter 1 to be string, array given in %s on line %d
-NULL
+password_hash() expects parameter 3 to be array, string given
+password_hash() expects parameter 1 to be string, array given
index 7180d11de7b9ea88a521fabbfd79b4b88a082777..f64723ee856d753b51bcfac9344e5dd27c4479a9 100644 (file)
@@ -3,29 +3,32 @@ Test error operation of password_needs_rehash()
 --FILE--
 <?php
 //-=-=-=-
-var_dump(password_needs_rehash());
 
-var_dump(password_needs_rehash(''));
+try {
+    var_dump(password_needs_rehash(''));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 var_dump(password_needs_rehash('', []));
 
-var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT));
+try {
+    var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
-var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo"));
+try {
+    var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "OK!";
 ?>
 --EXPECTF--
-Warning: password_needs_rehash() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: password_needs_rehash() expects at least 2 parameters, 1 given in %s on line %d
-NULL
+password_needs_rehash() expects at least 2 parameters, 1 given
 bool(false)
-
-Warning: password_needs_rehash() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: password_needs_rehash() expects parameter 3 to be array, string given in %s on line %d
-NULL
+password_needs_rehash() expects parameter 1 to be string, array given
+password_needs_rehash() expects parameter 3 to be array, string given
 OK!
index 7f680af4484cb3a7f8d70aea03c43058cfafb09e..192a4ae288d49eb4fe40bfd8d8c67942c5194511 100644 (file)
@@ -4,14 +4,12 @@ Test error operation of password_verify()
 <?php
 //-=-=-=-
 
-var_dump(password_verify());
-
-var_dump(password_verify("foo"));
+try {
+    var_dump(password_verify("foo"));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
---EXPECTF--
-Warning: password_verify() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: password_verify() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
+--EXPECT--
+password_verify() expects exactly 2 parameters, 1 given
index 8c95ea456e527d76c2b381c5894b733403f5fd25..b69c6c557b5eec3d832e4862b5cbd82fa7e98d18 100644 (file)
@@ -21,8 +21,6 @@ echo stream_get_contents($tmp, 1, 0);
 echo "\n";
 echo stream_get_contents($tmp, -1);
 
-@unlink($tmp);
-
 ?>
 --EXPECT--
 23
index dc7fcb239c00e09bf95a0cac4f71f3a881c52d8d..6f5abcb782d6ee04ec945b43d2d30eae1d42629d 100644 (file)
@@ -12,8 +12,6 @@ echo stream_get_contents($tmp, 2), "--\n";
 echo stream_get_contents($tmp, 2, 3), "--\n";
 echo stream_get_contents($tmp, 2, -1), "--\n";
 
-@unlink($tmp);
-
 ?>
 --EXPECT--
 --
index bb98d7c6e796a0c3661af73767d4d8350ceb254c..5530322fec930c923b3e5e8b5a08d1b740970c88 100644 (file)
@@ -10,21 +10,6 @@ Test stream_get_meta_data() function : error conditions
 
 echo "*** Testing stream_get_meta_data() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing stream_get_meta_data() function with Zero arguments --\n";
-var_dump( stream_get_meta_data() );
-
-//Test stream_get_meta_data with one more than the expected number of arguments
-echo "\n-- Testing stream_get_meta_data() function with more than expected no. of arguments --\n";
-
-$fp = null;
-$extra_arg = 10;
-var_dump( stream_get_meta_data($fp, $extra_arg) );
-
-echo "\n-- Testing stream_get_meta_data() function with invalid stream resource --\n";
-$fp = null;
-var_dump(stream_get_meta_data($fp));
-
 echo "\n-- Testing stream_get_meta_data() function with closed stream resource --\n";
 $fp = fopen(__FILE__, 'r');
 fclose($fp);
@@ -35,21 +20,6 @@ echo "Done";
 --EXPECTF--
 *** Testing stream_get_meta_data() : error conditions ***
 
--- Testing stream_get_meta_data() function with Zero arguments --
-
-Warning: stream_get_meta_data() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing stream_get_meta_data() function with more than expected no. of arguments --
-
-Warning: stream_get_meta_data() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Testing stream_get_meta_data() function with invalid stream resource --
-
-Warning: stream_get_meta_data() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
 -- Testing stream_get_meta_data() function with closed stream resource --
 
 Warning: stream_get_meta_data(): supplied resource is not a valid stream resource in %s on line %d
index 4109b5672e887635445f55bb777544316af6da6f..f77c0730f3d53ca83a3263cd1eb00c32f986b7a8 100644 (file)
@@ -14,8 +14,6 @@ mkdir($include_path_nested);
 file_put_contents($include_path_file, 'include_path');
 file_put_contents($include_path_nested_file, 'include_path');
 
-var_dump(stream_resolve_include_path());
-
 set_include_path($include_path . PATH_SEPARATOR . $include_path_nested);
 var_dump(stream_resolve_include_path('file-does-not-exist'));
 
@@ -24,13 +22,20 @@ var_dump(stream_resolve_include_path('file'));
 set_include_path($include_path_nested . PATH_SEPARATOR . $include_path);
 var_dump(stream_resolve_include_path('file'));
 
+?>
+--CLEAN--
+<?php
+$include_path = __DIR__ . '/test_path';
+$include_path_nested = $include_path . '/nested';
+$include_path_file = $include_path . DIRECTORY_SEPARATOR . 'file';
+$include_path_nested_file = $include_path_nested . DIRECTORY_SEPARATOR . 'file';
+
 unlink($include_path_nested_file);
 rmdir($include_path_nested);
 unlink($include_path_file);
 rmdir($include_path);
+?>
 --EXPECTF--
-Warning: stream_resolve_include_path() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
 bool(false)
 string(%d) "%stest_path%sfile"
 string(%d) "%stest_path%snested%sfile"
index 8c2ae9865bd8d1a39f4d75850aa63518a7bee271..851fd2cfcff12decc302cb060034e40d6ad36e3f 100644 (file)
@@ -51,7 +51,6 @@ var_dump(strlen(fwrite($f, str_repeat('b', 250))));
 echo "\nerror conditions\n";
 var_dump(stream_set_chunk_size($f, 0));
 var_dump(stream_set_chunk_size($f, -1));
-var_dump(stream_set_chunk_size($f, array()));
 --EXPECTF--
 bool(true)
 should return previous chunk size (8192)
@@ -87,6 +86,3 @@ bool(false)
 
 Warning: stream_set_chunk_size(): The chunk size must be a positive integer, given -1 in %s on line %d
 bool(false)
-
-Warning: stream_set_chunk_size() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
index 0334b951e02f5d2b73352882d2e6872aa91dee59..6c5b992dd51fd01f9640cfdd0866b3915ea98473 100644 (file)
@@ -10,9 +10,6 @@ Test stream_set_timeout() function : error conditions
 
 echo "*** Testing stream_set_timeout() : error conditions ***\n";
 
-//Test stream_set_timeout with one more than the expected number of arguments
-echo "\n-- Testing stream_set_timeout() function with more than expected no. of arguments --\n";
-
 for ($i=0; $i<100; $i++) {
   $port = rand(10000, 65000);
   /* Setup socket server */
@@ -26,23 +23,11 @@ $client = fsockopen("tcp://127.0.0.1:$port");
 
 $seconds = 10;
 $microseconds = 10;
-$extra_arg = 10;
-var_dump( stream_set_timeout($client, $seconds, $microseconds, $extra_arg) );
-
-// Testing stream_set_timeout with one less than the expected number of arguments
-echo "\n-- Testing stream_set_timeout() function with less than expected no. of arguments --\n";
-
-$seconds = 10;
-var_dump( stream_set_timeout($client) );
-
 
 echo "\n-- Testing stream_set_timeout() function with a closed socket --\n";
 fclose($client);
 var_dump( stream_set_timeout($client, $seconds) );
 
-echo "\n-- Testing stream_set_timeout() function with an invalid stream --\n";
-var_dump( stream_set_timeout($seconds, $seconds) );
-
 echo "\n-- Testing stream_set_timeout() function with a stream that does not support timeouts --\n";
 $filestream = fopen(__FILE__, "r");
 var_dump( stream_set_timeout($filestream, $seconds) );
@@ -55,26 +40,11 @@ echo "Done";
 --EXPECTF--
 *** Testing stream_set_timeout() : error conditions ***
 
--- Testing stream_set_timeout() function with more than expected no. of arguments --
-
-Warning: stream_set_timeout() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing stream_set_timeout() function with less than expected no. of arguments --
-
-Warning: stream_set_timeout() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
 -- Testing stream_set_timeout() function with a closed socket --
 
 Warning: stream_set_timeout(): supplied resource is not a valid stream resource in %s on line %d
 bool(false)
 
--- Testing stream_set_timeout() function with an invalid stream --
-
-Warning: stream_set_timeout() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
 -- Testing stream_set_timeout() function with a stream that does not support timeouts --
 bool(false)
 Done
index 2812d30930eb342284d2521125d890af50eff592..ab223f4314616f57952616fc8503297ab354ea1b 100644 (file)
@@ -16,8 +16,6 @@ $sock = stream_socket_server($serverUri, $errno, $errstr);
 
 if (is_resource($sock)) {
     fwrite($sock, $stringFWrite);
-    var_dump(stream_socket_sendto());
-    var_dump(stream_socket_sendto($sock));
     var_dump(stream_socket_sendto($sock, $stringSocket));
     var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB));
     var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB, $serverUri));
@@ -29,12 +27,6 @@ if (is_resource($sock)) {
 --EXPECTF--
 Notice: fwrite(): send of %i bytes failed with errno=%i Broken pipe in %s on line %d
 
-Warning: stream_socket_sendto() expects at least %i parameters, %i given in %s on line %d
-bool(%s)
-
-Warning: stream_socket_sendto() expects at least %i parameters, %i given in %s on line %d
-bool(%s)
-
 Warning: stream_socket_sendto(): Broken pipe
  in %s on line %d
 int(%i)
index 4080c7214d76db1cf3ad832925c560b832dee884..5b60f6168dd2ba6f56fd26bfd6f851302de5cf2d 100644 (file)
Binary files a/ext/standard/tests/strings/addcslashes_001.phpt and b/ext/standard/tests/strings/addcslashes_001.phpt differ
index 6b8d10daa71e927a1f49b73115f5a3eca09c375b..f31f94fd84b70461ace15a20fae854654c5f0fc9 100644 (file)
@@ -2,9 +2,11 @@
 Bug #54322: Null pointer deref in get_html_translation_table due to information loss in long-to-int conversion
 --FILE--
 <?php
-var_dump(
-get_html_translation_table(NAN, 0, "UTF-8") > 0
-);
---EXPECTF--
-Warning: get_html_translation_table() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
+try {
+    var_dump(get_html_translation_table(NAN, 0, "UTF-8") > 0);
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+?>
+--EXPECT--
+get_html_translation_table() expects parameter 1 to be int, float given
index d5fb97455921bb7a2e5cf793fae0c0517fc8ebb5..7f089ac5b5aa35efa37882fc9a8fbbd8c1f53cfa 100644 (file)
@@ -11,11 +11,19 @@ Test chr() function : error conditions
 echo "*** Testing chr() : error conditions ***\n";
 
 echo "\n-- Testing chr() function with no arguments --\n";
-var_dump( chr() );
+try {
+    var_dump( chr() );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "\n-- Testing chr() function with more than expected no. of arguments --\n";
 $extra_arg = 10;
-var_dump( chr(72, $extra_arg) );
+try {
+    var_dump( chr(72, $extra_arg) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 ===DONE===
@@ -23,12 +31,8 @@ var_dump( chr(72, $extra_arg) );
 *** Testing chr() : error conditions ***
 
 -- Testing chr() function with no arguments --
-
-Warning: Wrong parameter count for chr() in %s on line %d
-NULL
+Wrong parameter count for chr()
 
 -- Testing chr() function with more than expected no. of arguments --
-
-Warning: Wrong parameter count for chr() in %s on line %d
-NULL
+Wrong parameter count for chr()
 ===DONE===
index be0b1a32da5430929583f56daae4590c601ca309..43e31a20f374c2ac2874cf4c96a3949c9e38f810 100644 (file)
Binary files a/ext/standard/tests/strings/chr_ord.phpt and b/ext/standard/tests/strings/chr_ord.phpt differ
index 8a5a8cd6bb04b1d9ede6e24b46986cd9980ad2c0..8650f2cb92f8093bdebd4098c9f64871aeb50685 100644 (file)
Binary files a/ext/standard/tests/strings/chunk_split_variation5.phpt and b/ext/standard/tests/strings/chunk_split_variation5.phpt differ
index bfafd1af0b38eb3e42682e311851e39844cc5224..9804ee21e13f7c3837fd2f1a64b75425ff39de08 100644 (file)
@@ -46,7 +46,11 @@ $values = array (
 // loop through each element of values for 'chunklen'
 for($count = 0; $count < count($values); $count++) {
   echo "-- Iteration ".($count+1). " --\n";
-  var_dump( chunk_split($heredoc_str, $values[$count], $ending) );
+  try {
+    var_dump( chunk_split($heredoc_str, $values[$count], $ending) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
 }
 
 echo "Done"
@@ -82,9 +86,7 @@ string(129) "This's heredoc string with        and
 It has _speci@l ch@r$ 2222 !!!Now \k as escape char to test
 chunk_split():::"
 -- Iteration 7 --
-
-Warning: chunk_split() expects parameter 2 to be int, float given in %s on line %d
-NULL
+chunk_split() expects parameter 2 to be int, float given
 -- Iteration 8 --
 
 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
index af239543c5e9f3d7e45267d613d13dd9ae4da825..a1473ad31651c3404d24c08a69249292fa725ed3 100644 (file)
@@ -3,11 +3,7 @@ basic convert_cyr_string() tests
 --FILE--
 <?php
 
-var_dump(convert_cyr_string());
-var_dump(convert_cyr_string(""));
-var_dump(convert_cyr_string("", ""));
 var_dump(convert_cyr_string("", "", ""));
-var_dump(convert_cyr_string(array(), array(), array()));
 
 var_dump(convert_cyr_string("[[[[[[", "q", "m"));
 var_dump(convert_cyr_string("[[[[[[", "k", "w"));
@@ -20,23 +16,11 @@ var_dump(convert_cyr_string("", "d", "i"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: convert_cyr_string() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: convert_cyr_string() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: convert_cyr_string() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
 Warning: convert_cyr_string(): Unknown source charset:  in %s on line %d
 
 Warning: convert_cyr_string(): Unknown destination charset:  in %s on line %d
 string(0) ""
 
-Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
 Warning: convert_cyr_string(): Unknown source charset: q in %s on line %d
 string(6) "[[[[[["
 string(6) "[[[[[["
index 66effea43027b398f94645482226ed09a281c4b9..6ac438efaff22ea5cb846d86f26ddc3b21ac4a50 100644 (file)
@@ -15,15 +15,6 @@ $extra_arg = 10;
 
 echo "*** Testing convert_cyr_string() : error conditions ***\n";
 
-echo "\n-- Testing convert_cyr_string() function with no arguments --\n";
-var_dump( convert_cyr_string() );
-
-echo "\n-- Testing convert_cyr_string() function with no 'to' character set --\n";
-var_dump( convert_cyr_string($str, $from) );
-
-echo "\n-- Testing convert_cyr_string() function with more than expected no. of arguments --\n";
-var_dump( convert_cyr_string($str, $from, $to, $extra_arg) );
-
 echo "\n-- Testing convert_cyr_string() function with invalid 'from' character set --\n";
 var_dump(bin2hex( convert_cyr_string($str, "?", $to) ));
 
@@ -38,21 +29,6 @@ var_dump(bin2hex( convert_cyr_string($str, ">", "?")) );
 --EXPECTF--
 *** Testing convert_cyr_string() : error conditions ***
 
--- Testing convert_cyr_string() function with no arguments --
-
-Warning: convert_cyr_string() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
--- Testing convert_cyr_string() function with no 'to' character set --
-
-Warning: convert_cyr_string() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing convert_cyr_string() function with more than expected no. of arguments --
-
-Warning: convert_cyr_string() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing convert_cyr_string() function with invalid 'from' character set --
 
 Warning: convert_cyr_string(): Unknown source charset: ? in %s on line %d
index f64b61cb5ff289e8a5a054964af777edfddc4fd3..270f0372d13fd213a68d8fa51d0b3bae4576bff8 100644 (file)
@@ -19,8 +19,6 @@ echo (CRYPT_MD5)      ? ((crypt($str, $salt3) === $res_3) ? 'MD5' : 'MD5 - ERROR
 echo (CRYPT_BLOWFISH) ? ((crypt($str, $salt4) === $res_4) ? 'BLO' : 'BLO - ERROR') : 'BLO', "\n";
 
 var_dump(crypt($str));
-var_dump(crypt());
-var_dump(crypt("", "", ""));
 
 ?>
 --EXPECTF--
@@ -31,9 +29,3 @@ BLO
 
 Notice: crypt(): No salt parameter was specified. You must use a randomly generated salt and a strong hash function to produce a secure hash. in %s on line %d
 string(%d) "%s"
-
-Warning: crypt() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: crypt() expects at most 2 parameters, 3 given in %s on line %d
-NULL
index 98a9ea5b4567190c4a23e1a72b0bf20413208934..79fac300297fe890dc32795f56d41c75770d94da 100644 (file)
@@ -6,26 +6,15 @@ Test dirname() function : error conditions
    Description: Returns directory name component of path.
 */
 echo "*** Testing error conditions ***\n";
-// zero arguments
-var_dump( dirname() );
 
 // Bad arg
 var_dump( dirname("/var/tmp/bar.gz", 0) );
 
-// more than expected no. of arguments
-var_dump( dirname("/var/tmp/bar.gz", 1, ".gz") );
-
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: dirname() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: dirname(): Invalid argument, levels must be >= 1 in %s on line %d
 NULL
-
-Warning: dirname() expects at most 2 parameters, 3 given in %s on line %d
-NULL
 Done
index 68429476057de2350fd91d6d8a2bf9b824d9d063..de3049a47b3a8b93cbdc53bed4d381ffb47f8601 100644 (file)
@@ -77,11 +77,6 @@ class string1 {
 $obj = new string1;
 var_dump( explode("b", $obj) );
 
-echo "\n*** Testing error conditions ***\n";
-/* checking for arguments <2 and >3 */
-var_dump( explode(":", "array1:array2:array3", -1, -33) );
-var_dump( explode(":") );
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -498,12 +493,4 @@ array(2) {
   [1]=>
   string(4) "ject"
 }
-
-*** Testing error conditions ***
-
-Warning: explode() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: explode() expects at least 2 parameters, 1 given in %s on line %d
-NULL
 Done
index ccc37407e82b4b26d74f6bab31f42bc940c0e4fd..1ffc188051167b28eaf170757a8b52cffbea6477 100644 (file)
@@ -7,25 +7,31 @@ Test fprintf() function (errors)
 echo "*** Testing Error Conditions ***\n";
 
 /* zero argument */
-var_dump( fprintf() );
+try {
+    var_dump( fprintf() );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 /* scalar argument */
-var_dump( fprintf(3) );
+try {
+    var_dump( fprintf(3) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 /* NULL argument */
-var_dump( fprintf(NULL) );
+try {
+    var_dump( fprintf(NULL) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "Done\n";
 ?>
 --EXPECTF--
 *** Testing Error Conditions ***
-
-Warning: Wrong parameter count for fprintf() in %sfprintf_error.php on line %d
-NULL
-
-Warning: Wrong parameter count for fprintf() in %sfprintf_error.php on line %d
-NULL
-
-Warning: Wrong parameter count for fprintf() in %sfprintf_error.php on line %d
-NULL
+Wrong parameter count for fprintf()
+Wrong parameter count for fprintf()
+Wrong parameter count for fprintf()
 Done
index 65636908e612f097f231b448cebcf9788bbb17e6..10ea752291ddda86c3ced301e216204600fbfeb5 100644 (file)
@@ -13,7 +13,6 @@ allow_url_fopen=1
 
 $filename = dirname(__FILE__)."/highlight_file.dat";
 
-var_dump(highlight_file());
 var_dump(highlight_file($filename));
 
 var_dump(highlight_file('data:,<?php echo "test"; ?>'));
@@ -37,9 +36,6 @@ var_dump(highlight_file($filename));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: highlight_file() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
 Warning: highlight_file(%shighlight_file.dat): failed to open stream: No such file or directory in %s on line %d
 
 Warning: highlight_file(): Failed opening '%shighlight_file.dat' for highlighting in %s on line %d
index 5a023df7011ce140ada263e2c2aeb9b70ad52f55..f2abfd5ba81c18ffdc409515f048f0f300fde134 100644 (file)
@@ -35,12 +35,6 @@ var_dump( htmlentities($str, ENT_QUOTES) );
 var_dump( htmlentities($str, ENT_NOQUOTES) );
 var_dump( htmlentities($str, ENT_COMPAT) );
 
-echo "\n*** Testing error conditions ***\n";
-/* zero argument */
-var_dump( htmlentities() );
-/* arguments more than expected */
-var_dump( htmlentities("\x84\x91",ENT_QUOTES, 'cp1252', "test1") );
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -320,10 +314,4 @@ string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
 string(46) "A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;"
 string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
 string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
-
-*** Testing error conditions ***
-
-Warning: htmlentities() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-string(14) "&bdquo;&lsquo;"
 Done
index 8506c73e72ce17cd80f70de3fe31a70534668c02..6e5c5fac36a589a86f092df202e9b99e1c5a248d 100644 (file)
@@ -35,13 +35,6 @@ var_dump( htmlspecialchars($str, ENT_QUOTES) );
 var_dump( htmlspecialchars($str, ENT_NOQUOTES) );
 var_dump( htmlspecialchars($str, ENT_COMPAT) );
 
-echo "\n*** Testing error conditions ***\n";
-/* zero argument */
-var_dump( htmlspecialchars() );
-
-/* giving arguments more than expected */
-var_dump( htmlspecialchars("<br>",ENT_QUOTES,'iso-8859-1', "test2") );
-
 echo "Done\n"
 ?>
 --EXPECTF--
@@ -321,10 +314,4 @@ string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
 string(46) "A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;"
 string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
 string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
-
-*** Testing error conditions ***
-
-Warning: htmlspecialchars() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-string(10) "&lt;br&gt;"
 Done
index d5de391e9677b7267dcea34eef6b4cf4d0e697d9..9d9afc6f3c8e7a54bd5b16c457ff9c01aa1d84c6 100644 (file)
Binary files a/ext/standard/tests/strings/implode1.phpt and b/ext/standard/tests/strings/implode1.phpt differ
index 36ee9d7ba6cfc02fde83d3724f4a26a993d34948..832fb58c05aa0858d6eb6f0c9a49e581cea2eb3e 100644 (file)
@@ -10,18 +10,6 @@ Test join() function: error conditions
 
 echo "*** Testing join() : error conditions ***\n";
 
-// Zero argument
-echo "\n-- Testing join() function with Zero arguments --\n";
-var_dump( join() );
-
-// More than expected number of arguments
-echo "\n-- Testing join() function with more than expected no. of arguments --\n";
-$glue = 'string_val';
-$pieces = array(1, 2);
-$extra_arg = 10;
-
-var_dump( join($glue, $pieces, $extra_arg) );
-
 // Less than expected number of arguments
 echo "\n-- Testing join() with less than expected no. of arguments --\n";
 $glue = 'string_val';
@@ -33,16 +21,6 @@ echo "Done\n";
 --EXPECTF--
 *** Testing join() : error conditions ***
 
--- Testing join() function with Zero arguments --
-
-Warning: join() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing join() function with more than expected no. of arguments --
-
-Warning: join() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Testing join() with less than expected no. of arguments --
 
 Warning: join(): Argument must be an array in %s on line %d
index 97dfc4153b798cdde1114d186715eac935cba3a5..38cb7e566fe88a2ab0601ddfbcf6954dc9c44ce9 100644 (file)
Binary files a/ext/standard/tests/strings/lcfirst.phpt and b/ext/standard/tests/strings/lcfirst.phpt differ
index 1ac05cf2ae727cc7c761175051e489d77b37c755..b4b7c03e7f5800ea264e9d9648545db9f772eb35 100644 (file)
@@ -63,10 +63,8 @@ $n += test_me("gt maxlength2", -1, "A",  "AbcdefghijklmnopqrstuvwxyzAbcdefghijkl
 
 echo ($n==0)?"all passed\n":"$n failed\n";
 
-var_dump(levenshtein(array(), array()));
 var_dump(levenshtein("", "", -1, -1, -1));
 var_dump(levenshtein("", "", 10, 10, 10));
-var_dump(levenshtein(""));
 
 ?>
 --EXPECTF--
@@ -76,11 +74,5 @@ Warning: levenshtein(): Argument string(s) too long in %s on line %d
 
 Warning: levenshtein(): Argument string(s) too long in %s on line %d
 all passed
-
-Warning: levenshtein() expects parameter 1 to be string, array given in %s on line %d
-NULL
 int(0)
 int(0)
-
-Warning: Wrong parameter count for levenshtein() in %s on line %d
-NULL
index 638c93557f124a261f14aec066ad55a23e0f42fe..51287e04d7f023691e405ad8766c3c2edb007145 100644 (file)
@@ -9,12 +9,6 @@ Test ltrim() function
 
  echo "\n *** Output for Error Conditions ***\n";
 
- echo "\n *** Output for zero argument ***\n";
- var_dump( ltrim() );
-
- echo "\n *** Output for more than valid number of arguments (Valid are 1 or 2 arguments) ***\n";
- var_dump( ltrim("", " ", 1) );
-
 /* heredoc string */
 $str = <<<EOD
 us
@@ -50,16 +44,6 @@ echo "\nDone\n";
 --EXPECTF--
 *** Output for Error Conditions ***
 
- *** Output for zero argument ***
-
-Warning: ltrim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
- *** Output for more than valid number of arguments (Valid are 1 or 2 arguments) ***
-
-Warning: ltrim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
  *** Using heredoc string ***
 string(17) "ng heredoc string"
 
index 694d9fea1811dcc4ecd4e9532d5285e8c611d8cd..58324d7f3a91f2120942670fed9cc1b59222d96c 100644 (file)
@@ -11,14 +11,6 @@ Test ltrim() function : error conditions
 
 echo "*** Testing ltrim() : error conditions ***\n";
 
-echo "\n-- Testing ltrim() function with no arguments --\n";
-var_dump( ltrim() );
-
-echo "\n-- Testing ltrim() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( ltrim("Hello World",  "Heo", $extra_arg) );
-
-
 $hello = "  Hello World\n";
 echo "\n-- Test ltrim function with various invalid charlists\n";
 var_dump(ltrim($hello, "..a"));
@@ -31,16 +23,6 @@ var_dump(ltrim($hello, "a..b..c"));
 --EXPECTF--
 *** Testing ltrim() : error conditions ***
 
--- Testing ltrim() function with no arguments --
-
-Warning: ltrim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing ltrim() function with more than expected no. of arguments --
-
-Warning: ltrim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Test ltrim function with various invalid charlists
 
 Warning: ltrim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
index 45009669f4ac4f75038c23163d7c230fe878de30..e56987cd6a40b5c042baaa4748220724aa219385 100644 (file)
Binary files a/ext/standard/tests/strings/md5_file.phpt and b/ext/standard/tests/strings/md5_file.phpt differ
index ef1d23d89a43d94d85a30e219364edde421e58b0..c70b4846a127ac3d689d4495e7f51ea0301f15ed 100644 (file)
@@ -3,7 +3,6 @@ metaphone() tests
 --FILE--
 <?php
 
-var_dump(metaphone());
 var_dump(metaphone(""));
 var_dump(metaphone(-1));
 var_dump(metaphone(-1, -1));
@@ -26,8 +25,6 @@ foreach($array as $str) {
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: metaphone() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 string(0) ""
 string(0) ""
 bool(false)
index 454b593537706806369cbb3d33edb45132049e7c..8a4366f1bb443f81ce35d82c26df73292d0413ae 100644 (file)
@@ -23,15 +23,6 @@ $extra_arg = 10;
 
 echo "*** Testing money_format() : error conditions ***\n";
 
-echo "\n-- Testing money_format() function with no arguments --\n";
-var_dump( money_format() );
-
-echo "\n-- Testing money_format() function with insufficient arguments --\n";
-var_dump( money_format($string) );
-
-echo "\n-- Testing money_format() function with more than expected no. of arguments --\n";
-var_dump( money_format($string, $value, $extra_arg) );
-
 echo "\n-- Testing money_format() function with more than one token --\n";
 var_dump( money_format($string . $string, $value) );
 ?>
@@ -39,21 +30,6 @@ var_dump( money_format($string . $string, $value) );
 --EXPECTF--
 *** Testing money_format() : error conditions ***
 
--- Testing money_format() function with no arguments --
-
-Warning: money_format() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing money_format() function with insufficient arguments --
-
-Warning: money_format() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing money_format() function with more than expected no. of arguments --
-
-Warning: money_format() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Testing money_format() function with more than one token --
 
 Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
index a3d735069d593ceaca613ce5dd312114e8b84411..2bbea73588cb2e0fc0921ff5c0dc10184de8b311 100644 (file)
@@ -3,7 +3,6 @@ pathinfo() tests
 --FILE--
 <?php
 
-var_dump(pathinfo());
 var_dump(pathinfo(""));
 var_dump(pathinfo("."));
 var_dump(pathinfo(".."));
@@ -27,8 +26,6 @@ var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME|PATHINFO_BASENAME));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: pathinfo() expects at least 1 parameter, 0 given in %s on line %d
-NULL
 array(2) {
   ["basename"]=>
   string(0) ""
index d9376b101ad62f29310ab702742db9354eb9c6d3..caab3bc1d20d8a9379f7c751f2a9789d0182503c 100644 (file)
@@ -5,7 +5,6 @@ php_strip_whitespace() tests
 
 $filename = dirname(__FILE__)."/php_strip_whitespace.dat";
 
-var_dump(php_strip_whitespace());
 var_dump(php_strip_whitespace($filename));
 
 $data = '/* test comment */';
@@ -40,9 +39,6 @@ var_dump(php_strip_whitespace($filename));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: php_strip_whitespace() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
 Warning: php_strip_whitespace(%sphp_strip_whitespace.dat): failed to open stream: No such file or directory in %s on line %d
 string(0) ""
 string(18) "/* test comment */"
index eab44a4a6572053ba10bc8b16fb6d0754d169805..89b1b9ace29308558564d7c738b304560ec1dded 100644 (file)
@@ -28,7 +28,11 @@ $strings          = array( NULL, "abc", 'aaa' );
 
 /* Zero argument */
 echo "\n*** Output for zero argument ***\n";
-printf();
+try {
+    printf();
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 /* Number of arguments not matching as specified in format field */
 echo "\n*** Output for insufficient number of arguments ***\n";
@@ -226,8 +230,7 @@ printf("%d", $tempstring);
 ?>
 --EXPECTF--
 *** Output for zero argument ***
-
-Warning: printf() expects at least %d parameter, %d given in %s on line %d
+printf() expects at least %d parameter, %d given
 
 *** Output for insufficient number of arguments ***
 
index 1a90970371376736af4adbaeb8cfad4cf12c0996..0106f71445bd4819ccce4b63ccd4b203f89229c1 100644 (file)
@@ -28,7 +28,11 @@ $strings          = array( NULL, "abc", 'aaa' );
 
 /* Zero argument */
 echo "\n*** Output for zero argument ***\n";
-printf();
+try {
+    printf();
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 /* Number of arguments not matching as specified in format field */
 echo "\n*** Output for insufficient number of arguments ***\n";
@@ -226,8 +230,7 @@ printf("%d", $tempstring);
 ?>
 --EXPECTF--
 *** Output for zero argument ***
-
-Warning: printf() expects at least 1 parameter, 0 given in %s on line %d
+printf() expects at least 1 parameter, 0 given
 
 *** Output for insufficient number of arguments ***
 
index a88390bc04c4fbaf66d11150ee19e43eeca71df6..aff95426e6ab7ca6f8bace4d3fbf74c6500086b0 100644 (file)
@@ -11,7 +11,11 @@ echo "*** Testing printf() : error conditions ***\n";
 
 // Zero arguments
 echo "\n-- Testing printf() function with Zero arguments --\n";
-var_dump( printf() );
+try {
+    var_dump( printf() );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "\n-- Testing printf() function with less than expected no. of arguments --\n";
 $format1 = '%s';
@@ -38,9 +42,7 @@ var_dump( printf($format3) );
 *** Testing printf() : error conditions ***
 
 -- Testing printf() function with Zero arguments --
-
-Warning: printf() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
+printf() expects at least 1 parameter, 0 given
 
 -- Testing printf() function with less than expected no. of arguments --
 
index 1ce7d791dca017510cd4e80d4f38c65f640d8282..df26d5cf4b26abe7aab48860d3f67607e363e0d5 100644 (file)
@@ -3,30 +3,18 @@ quoted_printable_encode() tests - 1
 --FILE--
 <?php
 
-var_dump(quoted_printable_encode());
 var_dump(quoted_printable_encode(""));
 var_dump(quoted_printable_encode("test"));
-var_dump(quoted_printable_encode("test", "more"));
 
-$a = array("str");
-var_dump(quoted_printable_encode($a));
 var_dump(quoted_printable_encode(1));
 var_dump(quoted_printable_encode(NULL));
 var_dump(quoted_printable_encode(false));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: quoted_printable_encode() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
 string(0) ""
 string(4) "test"
-
-Warning: quoted_printable_encode() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: quoted_printable_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
 string(1) "1"
 string(0) ""
 string(0) ""
index 5f57b0e850f4543d9b150db857b3fc822517b904..223a839f580c53efb511b1aac96e06056e1521e9 100644 (file)
Binary files a/ext/standard/tests/strings/rtrim.phpt and b/ext/standard/tests/strings/rtrim.phpt differ
index 108f96a1f05b1ddddef239aef82f61e7eeff3625..210fb58c4ea70913462b68f42fdf4492c81ec701 100644 (file)
@@ -11,14 +11,6 @@ Test rtrim() function : error conditions
 
 echo "*** Testing rtrim() : error conditions ***\n";
 
-echo "\n-- Testing rtrim() function with no arguments --\n";
-var_dump( rtrim() );
-
-echo "\n-- Testing rtrim() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( rtrim("Hello World",  "Heo", $extra_arg) );
-
-
 $hello = "  Hello World\n";
 echo "\n-- Test rtrim function with various invalid charlists\n";
 var_dump(rtrim($hello, "..a"));
@@ -31,16 +23,6 @@ var_dump(rtrim($hello, "a..b..c"));
 --EXPECTF--
 *** Testing rtrim() : error conditions ***
 
--- Testing rtrim() function with no arguments --
-
-Warning: rtrim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing rtrim() function with more than expected no. of arguments --
-
-Warning: rtrim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Test rtrim function with various invalid charlists
 
 Warning: rtrim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
index 14bb7d7ed55d2b0986fc3ca1f6e0e970cc2f7307..c2b18b199241323ebc92c54422cb65de807a57b4 100644 (file)
@@ -18,14 +18,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 
 echo "*** Testing setlocale() : error conditions ***\n";
 
-// Zero argument
-echo "\n-- Testing setlocale() function with Zero arguments --";
-var_dump( setlocale());
-
-// One argument
-echo "\n-- Testing setlocale() function with One argument, 'category' = LC_ALL --";
-var_dump( setlocale(LC_ALL) );
-
 echo "\n-- Testing setlocale() function with invalid locale array, 'category' = LC_ALL --\n";
 //Invalid array of locales
 $invalid_locales = array("en_US.invalid", "en_AU.invalid", "ko_KR.invalid");
@@ -44,14 +36,6 @@ echo "\nDone";
 --EXPECTF--
 *** Testing setlocale() : error conditions ***
 
--- Testing setlocale() function with Zero arguments --
-Warning: setlocale() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing setlocale() function with One argument, 'category' = LC_ALL --
-Warning: setlocale() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
 -- Testing setlocale() function with invalid locale array, 'category' = LC_ALL --
 bool(false)
 
index 102dab75ff6f97cdf34418190c8a3f9fd17f94c9..09e81be01487057a5e1734c38e595fcd4326d817 100644 (file)
@@ -46,12 +46,6 @@ var_dump( sha1_file(12) );
 echo "\n-- NULL as filename --\n";
 var_dump( sha1_file(NULL) );
 
-echo "\n-- Zero arguments --\n";
- var_dump ( sha1_file() );
-
-echo "\n-- More than valid number of arguments ( valid is 2) --\n";
-var_dump ( sha1_file("EmptyFileSHA1.txt", true, NULL) );
-
 echo "\n-- Hexadecimal Output for Empty file as Argument --\n";
 var_dump( sha1_file("EmptyFileSHA1.txt") );
 
@@ -95,16 +89,6 @@ bool(false)
 Warning: sha1_file(): Filename cannot be empty in %s on line %d
 bool(false)
 
--- Zero arguments --
-
-Warning: sha1_file() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- More than valid number of arguments ( valid is 2) --
-
-Warning: sha1_file() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Hexadecimal Output for Empty file as Argument --
 string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
 
index 650236c2e5c3ebd7d89bdbebead82d580b055f42..744f71c17a2b98198b67e3753dea51b5a996d27d 100644 (file)
@@ -5,7 +5,6 @@ soundex() tests
 
 var_dump(soundex(""));
 var_dump(soundex(-1));
-var_dump(soundex(array()));
 
 $array = array(
 "From",
@@ -34,9 +33,6 @@ echo "Done\n";
 --EXPECTF--
 bool(false)
 string(4) "0000"
-
-Warning: soundex() expects parameter 1 to be string, array given in %s on line %d
-NULL
 string(4) "F650"
 string(4) "T300"
 string(4) "T500"
index 1c12cd31686a06dc960ebf96ab2e914c79ee4826..1b21b8b141cfbb81c0401631dfb2dd1e10be5229 100644 (file)
@@ -11,7 +11,11 @@ echo "*** Testing sprintf() : error conditions ***\n";
 
 // Zero arguments
 echo "\n-- Testing sprintf() function with Zero arguments --\n";
-var_dump( sprintf() );
+try {
+    var_dump( sprintf() );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 echo "\n-- Testing sprintf() function with less than expected no. of arguments --\n";
 $format1 = '%s';
@@ -38,9 +42,7 @@ echo "Done";
 *** Testing sprintf() : error conditions ***
 
 -- Testing sprintf() function with Zero arguments --
-
-Warning: sprintf() expects at least %d parameter, %d given in %s on line %d
-bool(false)
+sprintf() expects at least %d parameter, %d given
 
 -- Testing sprintf() function with less than expected no. of arguments --
 
index ca967758abdf4ae07f026b1bac1d13f419d49a22..3e54a42f1e5f303479e1c7d287f16b000477f610 100644 (file)
@@ -12,12 +12,6 @@ echo "*** Testing sscanf() : error conditions ***\n";
 $str = "Hello World";
 $format = "%s %s";
 
-echo "\n-- Testing sscanf() function with no arguments --\n";
-var_dump( sscanf() );
-
-echo "\n-- Testing sscanf() function with one argument --\n";
-var_dump( sscanf($str) );
-
 echo "\n-- Testing sscanf() function with more than expected no. of arguments --\n";
 
 var_dump( sscanf($str, $format, $str1, $str2, $extra_str) );
@@ -27,16 +21,6 @@ var_dump( sscanf($str, $format, $str1, $str2, $extra_str) );
 --EXPECTF--
 *** Testing sscanf() : error conditions ***
 
--- Testing sscanf() function with no arguments --
-
-Warning: sscanf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing sscanf() function with one argument --
-
-Warning: sscanf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
 -- Testing sscanf() function with more than expected no. of arguments --
 
 Warning: sscanf(): Variable is not assigned by any conversion specifiers in %s on line %d
index 526b8ac723547da1ca49495449cf411621b6ea00..71a9d1e12791af4320520ff0f4f296979530bedb 100644 (file)
@@ -3,9 +3,6 @@ str_ireplace() tests
 --FILE--
 <?php
 
-var_dump(str_ireplace());
-var_dump(str_ireplace(""));
-var_dump(str_ireplace("", ""));
 var_dump(str_ireplace("", "", ""));
 
 var_dump(str_ireplace("tt", "a", "ttttTttttttttTT"));
@@ -48,14 +45,6 @@ var_dump($Data = str_ireplace("\n", "<br>", $Data));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: str_ireplace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: str_ireplace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_ireplace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
 string(0) ""
 string(8) "aaaaaaaT"
 string(8) "aaaaaaaT"
index b44a9517ab750c6d691cfe755042c84fadda4644..be4c9ed9428695dd25d532e0eabca37dddc1580f 100644 (file)
Binary files a/ext/standard/tests/strings/str_pad.phpt and b/ext/standard/tests/strings/str_pad.phpt differ
index 306b7d381af16e3e61a4f36f2e0fac75ad8bcd0b..766bea1f9c32df17825d32ffe184a7be19a54dbd 100644 (file)
Binary files a/ext/standard/tests/strings/str_repeat.phpt and b/ext/standard/tests/strings/str_repeat.phpt differ
index 7b411abac54e76bfd7e1fdc63b1acc49b59a553f..bef11f872a51b2442a3c7b8d98104dec0b8acc17 100644 (file)
@@ -223,15 +223,6 @@ var_dump( str_replace("worldS", "FOUND", "$strS") );
 var_dump( str_replace("worldS", "FOUND", "${str}S") );
 var_dump( str_replace("worldS", "FOUND", "{$str}S") );
 
-
-echo "\n*** Testing error conditions ***";
-/* Invalid arguments */
-var_dump( str_replace() );
-var_dump( str_replace("") );
-var_dump( str_replace(NULL) );
-var_dump( str_replace(1, 2) );
-var_dump( str_replace(1,2,3,$var,5) );
-
 fclose($resource1);
 closedir($resource2);
 echo "Done\n";
@@ -938,20 +929,4 @@ Notice: Undefined variable: strS in %s on line %d
 string(0) ""
 string(5) "FOUND"
 string(5) "FOUND"
-
-*** Testing error conditions ***
-Warning: str_replace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at most 4 parameters, 5 given in %s on line %d
-NULL
 Done
index a477800a26239f712892141fe279ed3d0a0d017c..1aea668026310699cad91a2bbef21ac8153bbca0 100644 (file)
@@ -30,7 +30,6 @@ $values = array (
   0234,  //octal number
   0x1A,  //hexadecimal number
   2147483647,  //max positive integer number
-  2147483648,  //max positive integer+1
   -2147483648,  //min negative integer
 );
 
@@ -157,10 +156,6 @@ array(1) {
 }
 -- Iteration 7 --
 
-Warning: str_split() expects parameter 2 to be int, float given in %s line %d
-NULL
--- Iteration 8 --
-
 Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
 bool(false)
 Done
index 5082c7ba2f45deed41d2699d1781e4878b643be0..1a2471a20a88be771e86c83af1e646b0ff81e110 100644 (file)
@@ -32,7 +32,6 @@ $values = array (
   0234,  //octal number
   0x1A,  //hexadecimal number
   2147483647,  //max positive integer number
-  2147483648,  //max positive integer+1
   -2147483648,  //min negative integer
 );
 
@@ -135,10 +134,6 @@ array(1) {
 }
 -- Iteration 7 --
 
-Warning: str_split() expects parameter 2 to be int, float given in %s on line %d
-NULL
--- Iteration 8 --
-
 Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
 bool(false)
 Done
index f88646370bfb5a99b64dcf927a99efb775277b82..e8fa12aca6d7c3f48d3cfae20267d98ef90a3c0f 100644 (file)
@@ -13,28 +13,20 @@ var_dump(str_word_count($str, 3));
 var_dump(str_word_count($str, 123));
 var_dump(str_word_count($str, -1));
 var_dump(str_word_count($str, 999999999));
-var_dump(str_word_count($str, array()));
-var_dump(str_word_count($str, $b));
 var_dump($str);
 
 $str2 = "F0o B4r 1s bar foo";
 var_dump(str_word_count($str2, NULL, "04"));
 var_dump(str_word_count($str2, NULL, "01"));
 var_dump(str_word_count($str2, NULL, "014"));
-var_dump(str_word_count($str2, NULL, array()));
-var_dump(str_word_count($str2, NULL, new stdClass));
 var_dump(str_word_count($str2, NULL, ""));
 var_dump(str_word_count($str2, 1, "04"));
 var_dump(str_word_count($str2, 1, "01"));
 var_dump(str_word_count($str2, 1, "014"));
-var_dump(str_word_count($str2, 1, array()));
-var_dump(str_word_count($str2, 1, new stdClass));
 var_dump(str_word_count($str2, 1, ""));
 var_dump(str_word_count($str2, 2, "04"));
 var_dump(str_word_count($str2, 2, "01"));
 var_dump(str_word_count($str2, 2, "014"));
-var_dump(str_word_count($str2, 2, array()));
-var_dump(str_word_count($str2, 2, new stdClass));
 var_dump(str_word_count($str2, 2, ""));
 var_dump(str_word_count("foo'0 bar-0var", 2, "0"));
 var_dump(str_word_count("'foo'", 2));
@@ -86,23 +78,11 @@ bool(false)
 
 Warning: str_word_count(): Invalid format value 999999999 in %s on line %d
 bool(false)
-
-Warning: str_word_count() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 2 to be int, string given in %s on line %d
-NULL
 string(55) "Hello friend, you're  
     looking          good today!"
 int(5)
 int(6)
 int(5)
-
-Warning: str_word_count() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 3 to be string, object given in %s on line %d
-NULL
 int(7)
 array(5) {
   [0]=>
@@ -142,12 +122,6 @@ array(5) {
   [4]=>
   string(3) "foo"
 }
-
-Warning: str_word_count() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 3 to be string, object given in %s on line %d
-NULL
 array(7) {
   [0]=>
   string(1) "F"
@@ -202,12 +176,6 @@ array(5) {
   [15]=>
   string(3) "foo"
 }
-
-Warning: str_word_count() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 3 to be string, object given in %s on line %d
-NULL
 array(7) {
   [0]=>
   string(1) "F"
index 3086c2be92da675edcb0991aacbe90988150bfe9..d9063cc9decc9a85c9b71991014ecd515fe3d461 100644 (file)
Binary files a/ext/standard/tests/strings/strcasecmp.phpt and b/ext/standard/tests/strings/strcasecmp.phpt differ
index 397e072c5239fc35ab72fb6590d13487c3bbb5c9..fd20e501958cdad2859ae0abd82e0329419ae691 100644 (file)
Binary files a/ext/standard/tests/strings/strcmp.phpt and b/ext/standard/tests/strings/strcmp.phpt differ
index 324014cf6da09ee4b0313e8adaa460c3da98a2d6..0420bb090b268bd8338dab1ae0574050985fdd1b 100644 (file)
@@ -8,14 +8,6 @@ Test stripos() function : error conditions
 */
 
 echo "*** Testing stripos() function: error conditions ***\n";
-echo "\n-- With Zero arguments --";
-var_dump( stripos() );
-
-echo "\n-- With less than expected number of arguments --";
-var_dump( stripos("String") );
-
-echo "\n-- With more than expected number of arguments --";
-var_dump( stripos("string", "String", 1, 'extra_arg') );
 
 echo "\n-- Offset beyond the end of the string --";
 var_dump( stripos("Hello World", "o", 12) );
@@ -28,18 +20,6 @@ echo "*** Done ***";
 --EXPECTF--
 *** Testing stripos() function: error conditions ***
 
--- With Zero arguments --
-Warning: stripos() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- With less than expected number of arguments --
-Warning: stripos() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- With more than expected number of arguments --
-Warning: stripos() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Offset beyond the end of the string --
 Warning: stripos(): Offset not contained in string in %s on line %d
 bool(false)
index 81d3b35a2079597d8082cf19ff71dac85aaf659f..6792b4d0b2980c218b1d4db1fe466138ea2e1bf0 100644 (file)
@@ -83,7 +83,11 @@ $needles =  array (
 $counter = 1;
 for($index = 0; $index < count($needles); $index ++) {
   echo "\n-- Iteration $counter --\n";
-  var_dump( stripos($haystack, $needles[$index]) );
+  try {
+    var_dump( stripos($haystack, $needles[$index]) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter ++;
 }
 
@@ -122,29 +126,19 @@ bool(false)
 int(17)
 
 -- Iteration 10 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
 
 -- Iteration 11 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
 
 -- Iteration 12 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
 
 -- Iteration 13 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
 
 -- Iteration 14 --
-
-Warning: stripos() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, array given
 
 -- Iteration 15 --
 int(9)
@@ -174,9 +168,7 @@ bool(false)
 bool(false)
 
 -- Iteration 24 --
-
-Warning: stripos() expects parameter 2 to be string, resource given in %s on line %d
-NULL
+stripos() expects parameter 2 to be string, resource given
 
 -- Iteration 25 --
 bool(false)
index 1f79b61d1aa5edbb358c58fb865d5febe052362e..aab3181df35b3965ab6e26353d6d28a295e489ad 100644 (file)
@@ -81,8 +81,16 @@ $counter = 1;
 for($index = 0; $index < count($values); $index ++) {
   echo "-- Iteration $counter --\n";
   $haystack = $values[$index];
-  var_dump( stripos($values[$index], $values[$index]) );
-  var_dump( stripos($values[$index], $values[$index], 1) );
+  try {
+    var_dump( stripos($values[$index], $values[$index]) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
+  try {
+    var_dump( stripos($values[$index], $values[$index], 1) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter ++;
 }
 
@@ -118,40 +126,20 @@ bool(false)
 int(0)
 bool(false)
 -- Iteration 10 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
 -- Iteration 11 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
 -- Iteration 12 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
 -- Iteration 13 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
 -- Iteration 14 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
 -- Iteration 15 --
 int(0)
 bool(false)
@@ -192,12 +180,8 @@ bool(false)
 Warning: stripos(): Offset not contained in string in %s on line %d
 bool(false)
 -- Iteration 24 --
-
-Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, resource given
+stripos() expects parameter 1 to be string, resource given
 -- Iteration 25 --
 bool(false)
 
index a0f0cc3497983d5557511c592ce7d29af0ab57c5..92cfa09eb1e172f05c75e8460155c0a8726185eb 100644 (file)
@@ -2,10 +2,6 @@
 stristr() function
 --FILE--
 <?php
-       var_dump(stristr());
-       var_dump(stristr(array(), ""));
-       var_dump(stristr("", array()));
-       var_dump(stristr(array(), array()));
        var_dump(stristr("tEsT sTrInG", "tEsT"));
        var_dump(stristr("tEsT sTrInG", "stRiNg"));
        var_dump(stristr("tEsT sTrInG", "stRiN"));
@@ -19,17 +15,6 @@ stristr() function
        var_dump(stristr("tEsT sTrInG", " "));
 ?>
 --EXPECTF--
-Warning: stristr() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d
-NULL
 string(11) "tEsT sTrInG"
 string(6) "sTrInG"
 string(6) "sTrInG"
index a0057574f9167804038215ba0d66bd154e54decf..a7b683d3b86816eceb3ca3a7c51ac7df0eb5bff3 100644 (file)
@@ -8,17 +8,6 @@ Test stristr() function : error conditions
 */
 echo "*** Testing stristr() : error conditions ***\n";
 
-echo "\n-- Testing stristr() function with no arguments --\n";
-var_dump( stristr() );
-var_dump( stristr("") );
-
-echo "\n-- Testing stristr() function with no needle --\n";
-var_dump( stristr("Hello World") );  // without "needle"
-
-echo "\n-- Testing stristr() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( stristr("Hello World",  "World", true, $extra_arg) );
-
 echo "\n-- Testing stristr() function with empty haystack --\n";
 var_dump( stristr(NULL, "") );
 
@@ -30,24 +19,6 @@ var_dump( stristr("Hello World", "") );
 --EXPECTF--
 *** Testing stristr() : error conditions ***
 
--- Testing stristr() function with no arguments --
-
-Warning: stristr() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: stristr() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing stristr() function with no needle --
-
-Warning: stristr() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing stristr() function with more than expected no. of arguments --
-
-Warning: stristr() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing stristr() function with empty haystack --
 
 Warning: stristr(): Empty needle in %s on line %d
index 8ca09db66c2ce7a4603da946896cd13874bd12e3..fd842d11064417060c38f8ef6a1f0ee9954ab8e7 100644 (file)
@@ -72,7 +72,11 @@ $pad_length = "20";
 $count = 1;
 foreach($inputs as $input) {
   echo "-- Iteration $count --\n";
-  var_dump( stristr("Hello World", $input) );
+  try {
+    var_dump( stristr("Hello World", $input) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $count ++;
 }
 
@@ -97,17 +101,11 @@ bool(false)
 -- Iteration 7 --
 bool(false)
 -- Iteration 8 --
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, array given
 -- Iteration 9 --
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, array given
 -- Iteration 10 --
-
-Warning: stristr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, array given
 -- Iteration 11 --
 bool(false)
 -- Iteration 12 --
@@ -131,9 +129,7 @@ bool(false)
 -- Iteration 17 --
 bool(false)
 -- Iteration 18 --
-
-Warning: stristr() expects parameter 2 to be string, resource given in %s on line %d
-NULL
+stristr() expects parameter 2 to be string, resource given
 -- Iteration 19 --
 
 Warning: stristr(): Empty needle in %s on line %d
index a546bdb8d29db5d705da7237e203b00309288531..156038ed7b491ffb1f633f581ea1d910303f1e49 100644 (file)
Binary files a/ext/standard/tests/strings/strlen.phpt and b/ext/standard/tests/strings/strlen.phpt differ
index d443f8113b99a8688e2626166553901efcdc6a19..00ddfaed9bdf225311c8a2b84ca1bb425036bc32 100644 (file)
@@ -10,18 +10,6 @@ Test strncasecmp() function : error conditions
 echo "*** Testing strncasecmp() function: error conditions ***\n";
 $str1 = 'string_val';
 $str2 = 'string_val';
-$len = 10;
-$extra_arg = 10;
-
-echo "\n-- Testing strncasecmp() function with Zero arguments --";
-var_dump( strncasecmp() );
-
-echo "\n-- Testing strncasecmp() function with less than expected number of arguments --";
-var_dump( strncasecmp($str1) );
-var_dump( strncasecmp($str1, $str2) );
-
-echo "\n-- Testing strncasecmp() function with more than expected number of arguments --";
-var_dump( strncasecmp($str1, $str2, $len, $extra_arg) );
 
 echo "\n-- Testing strncasecmp() function with invalid argument --";
 $len = -10;
@@ -31,21 +19,6 @@ echo "*** Done ***\n";
 --EXPECTF--
 *** Testing strncasecmp() function: error conditions ***
 
--- Testing strncasecmp() function with Zero arguments --
-Warning: strncasecmp() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
--- Testing strncasecmp() function with less than expected number of arguments --
-Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: strncasecmp() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing strncasecmp() function with more than expected number of arguments --
-Warning: strncasecmp() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing strncasecmp() function with invalid argument --
 Warning: Length must be greater than or equal to 0 in %s on line %d
 bool(false)
index 4eb73eb3182d1f07b15082470928fd2e3303d863..13a4cb0350ac34a3057473f0ed2021071b0e5c07 100644 (file)
@@ -12,13 +12,6 @@ Test strncmp() function : error conditions
 echo "*** Testing strncmp() function: error conditions ***\n";
 $str1 = 'string_val';
 $str2 = 'string_val';
-$len = 10;
-$extra_arg = 10;
-
-var_dump( strncmp() );  //Zero argument
-var_dump( strncmp($str1) );  //One argument, less than expected no. of args
-var_dump( strncmp($str1, $str2) );  //Two arguments, less than expected no. of args
-var_dump( strncmp($str1, $str2, $len, $extra_arg) );  //Four arguments, greater than expected no. of args
 
 /* Invalid argument for $len */
 $len = -10;
@@ -28,18 +21,6 @@ echo "*** Done ***\n";
 --EXPECTF--
 *** Testing strncmp() function: error conditions ***
 
-Warning: strncmp() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: strncmp() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: strncmp() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
-
 Warning: Length must be greater than or equal to 0 in %s on line %d
 bool(false)
 *** Done ***
index 658e2f429e0eaed37f4d7c60c52b310ee729a417..cce843c2f1858c0b439544960e7c648fa8808bc3 100644 (file)
@@ -11,47 +11,17 @@ Test strpbrk() function : error conditions
 echo "*** Testing strpbrk() : error conditions ***\n";
 
 $haystack = 'This is a Simple text.';
-$char_list = 'string_val';
-$extra_arg = 10;
-
-echo "\n-- Testing strpbrk() function with more than expected no. of arguments --\n";
-var_dump( strpbrk($haystack, $char_list, $extra_arg) );
-
-echo "\n-- Testing strpbrk() function with less than expected no. of arguments --\n";
-var_dump( strpbrk($haystack) );
 
 echo "\n-- Testing strpbrk() function with empty second argument --\n";
 var_dump( strpbrk($haystack, '') );
 
-echo "\n-- Testing strpbrk() function with arrays --\n";
-var_dump( strpbrk($haystack, array('a', 'b', 'c') ) );
-var_dump( strpbrk(array('foo', 'bar'), 'b') );
-
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing strpbrk() : error conditions ***
 
--- Testing strpbrk() function with more than expected no. of arguments --
-
-Warning: strpbrk() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-
--- Testing strpbrk() function with less than expected no. of arguments --
-
-Warning: strpbrk() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-
 -- Testing strpbrk() function with empty second argument --
 
 Warning: strpbrk(): The character list cannot be empty in %s on line %d
 bool(false)
-
--- Testing strpbrk() function with arrays --
-
-Warning: strpbrk() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strpbrk() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
 ===DONE===
index a4c3a9c7813a3e753fba312b330acf398367eaeb..4640b670f316314e6a8720da849fa7cb8c84bc38 100644 (file)
Binary files a/ext/standard/tests/strings/strpos.phpt and b/ext/standard/tests/strings/strpos.phpt differ
index 478ac80300333ec367122896e39e639a2333e2a8..1004a3d91578b6ba237e694511d9be91d9c93e6e 100644 (file)
@@ -121,7 +121,11 @@ $needles =  array (
 $count = 1;
 for($index = 0; $index < count($haystacks); $index++) {
   echo "-- Iteration $count --\n";
-  var_dump( strrchr($haystacks[$index], $needles[$index]) );
+  try {
+    var_dump( strrchr($haystacks[$index], $needles[$index]) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $count ++;
 }
 
@@ -129,7 +133,7 @@ fclose($file_handle);  //closing the file handle
 
 echo "*** Done ***";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing strrchr() function with unexpected inputs for needle ***
 -- Iteration 1 --
 string(1) "0"
@@ -150,25 +154,15 @@ string(2) "10"
 -- Iteration 9 --
 bool(false)
 -- Iteration 10 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
 -- Iteration 11 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
 -- Iteration 12 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
 -- Iteration 13 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
 -- Iteration 14 --
-
-Warning: strrchr() expects parameter 2 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, array given
 -- Iteration 15 --
 bool(false)
 -- Iteration 16 --
@@ -188,9 +182,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-
-Warning: strrchr() expects parameter 2 to be string, resource given in %s on line %d
-NULL
+strrchr() expects parameter 2 to be string, resource given
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
index 92a9c07eee26f570edf8f77e5f9597cea2fd13a0..79ffe4c2ecac989c436f7a2cd58a4ef876a6cd6d 100644 (file)
@@ -80,7 +80,11 @@ $values =  array (
 $counter = 1;
 for($index = 0; $index < count($values); $index ++) {
   echo "-- Iteration $counter --\n";
-  var_dump( strrchr($values[$index], $values[$index]) );
+  try {
+    var_dump( strrchr($values[$index], $values[$index]) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter ++;
 }
 
@@ -88,7 +92,7 @@ fclose($file_handle);  //closing the file handle
 
 echo "*** Done ***";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing strrchr() function: with unexpected inputs for haystack and needle ***
 -- Iteration 1 --
 string(1) "0"
@@ -109,25 +113,15 @@ string(4) "1E-9"
 -- Iteration 9 --
 string(3) "0.5"
 -- Iteration 10 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
 -- Iteration 11 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
 -- Iteration 12 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
 -- Iteration 13 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
 -- Iteration 14 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
 -- Iteration 15 --
 string(1) "1"
 -- Iteration 16 --
@@ -147,9 +141,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-
-Warning: strrchr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, resource given
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
index 291ff78cd7abb93d08b78cc1b5891b072693e91a..fa15e2fcacae7fc83ecc3ae09d5247b86a30c5f7 100644 (file)
@@ -15,9 +15,6 @@ strripos() function
        var_dump(@strripos("a", ""));
        var_dump(@strripos("", "a"));
        var_dump(@strripos("\\\\a", "\\a"));
-
-       $fp = fopen(__FILE__, "r");
-       var_dump(@strripos("", $fp));
 ?>
 --EXPECT--
 int(5)
@@ -33,4 +30,3 @@ bool(false)
 bool(false)
 bool(false)
 int(1)
-bool(false)
index b5d09d79461f8c5ab4a33a97092c448c4196a7f5..5981c9b6cb3199f2aca02d7a36b5f81494736719 100644 (file)
@@ -3,11 +3,12 @@ strripos() offset integer overflow
 --FILE--
 <?php
 
-var_dump(strripos("t", "t", PHP_INT_MAX+1));
-var_dump(strripos("tttt", "tt", PHP_INT_MAX+1));
-var_dump(strripos(100, 101, PHP_INT_MAX+1));
-var_dump(strripos(1024, 1024, PHP_INT_MAX+1));
-var_dump(strripos(array(), array(), PHP_INT_MAX+1));
+try {
+    var_dump(strripos("t", "t", PHP_INT_MAX+1));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+
 var_dump(strripos(1024, 1024, -PHP_INT_MAX));
 var_dump(strripos(1024, "te", -PHP_INT_MAX));
 var_dump(strripos(1024, 1024, -PHP_INT_MAX-1));
@@ -16,20 +17,7 @@ var_dump(strripos(1024, "te", -PHP_INT_MAX-1));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strripos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strripos() expects parameter 3 to be int, float given
 
 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
index 1399b6098573e3e96cd01ad1391c4c9918a4d5ce..d1bbc856a322bc8a1eaa1ffd3a85c031c10b9af2 100644 (file)
@@ -3,10 +3,12 @@ strrpos() offset integer overflow
 --FILE--
 <?php
 
-var_dump(strrpos("t", "t", PHP_INT_MAX+1));
-var_dump(strrpos("tttt", "tt", PHP_INT_MAX+1));
-var_dump(strrpos(100, 101, PHP_INT_MAX+1));
-var_dump(strrpos(1024, 1024, PHP_INT_MAX+1));
+try {
+    var_dump(strrpos("t", "t", PHP_INT_MAX+1));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+
 var_dump(strrpos(1024, 1024, -PHP_INT_MAX));
 var_dump(strrpos(1024, "te", -PHP_INT_MAX));
 var_dump(strrpos(1024, 1024, -PHP_INT_MAX-1));
@@ -15,17 +17,7 @@ var_dump(strrpos(1024, "te", -PHP_INT_MAX-1));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
+strrpos() expects parameter 3 to be int, float given
 
 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
index b374e7f9f6ce08f545b46ad965ca86b90b2a5714..440605d43055acacdea4888184325af42f2cd278 100644 (file)
@@ -83,7 +83,11 @@ $needles =  array (
 $counter = 1;
 for($index = 0; $index < count($needles); $index ++) {
   echo "-- Iteration $counter --\n";
-  var_dump( strrpos($haystack, $needles[$index]) );
+  try {
+    var_dump( strrpos($haystack, $needles[$index]) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter ++;
 }
 
@@ -91,7 +95,7 @@ fclose($file_handle);  //closing the file handle
 
 echo "*** Done ***";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing strrpos() function with unexpected values for needle ***
 -- Iteration 1 --
 int(42)
@@ -112,25 +116,15 @@ bool(false)
 -- Iteration 9 --
 int(28)
 -- Iteration 10 --
-
-Warning: strrpos() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
 -- Iteration 11 --
-
-Warning: strrpos() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
 -- Iteration 12 --
-
-Warning: strrpos() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
 -- Iteration 13 --
-
-Warning: strrpos() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
 -- Iteration 14 --
-
-Warning: strrpos() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
 -- Iteration 15 --
 int(41)
 -- Iteration 16 --
@@ -150,9 +144,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-
-Warning: strrpos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, resource given
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
index f628427f08139594ef6953865b24dde602838615..71201a1c21f7ca8def138705db72b06ed201d4d5 100644 (file)
@@ -81,14 +81,22 @@ $counter = 1;
 for($index = 0; $index < count($values); $index ++) {
   echo "-- Iteration $counter --\n";
   $haystack = $values[$index];
-  var_dump( strrpos($values[$index], $values[$index]) );
-  var_dump( strrpos($values[$index], $values[$index], 1) );
+  try {
+    var_dump( strrpos($values[$index], $values[$index]) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
+  try {
+    var_dump( strrpos($values[$index], $values[$index], 1) );
+  } catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+  }
   $counter ++;
 }
 
 echo "*** Done ***";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing strrpos() function with unexpected values for haystack and needle ***
 -- Iteration 1 --
 int(0)
@@ -118,40 +126,20 @@ bool(false)
 int(0)
 bool(false)
 -- Iteration 10 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
 -- Iteration 11 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
 -- Iteration 12 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
 -- Iteration 13 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
 -- Iteration 14 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
 -- Iteration 15 --
 int(0)
 bool(false)
@@ -180,12 +168,8 @@ bool(false)
 bool(false)
 bool(false)
 -- Iteration 24 --
-
-Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, resource given
+strrpos() expects parameter 1 to be string, resource given
 -- Iteration 25 --
 bool(false)
 bool(false)
index cc3b7c545316067fe7a00ddef7b4f389a822d7e8..6bdc3feab1a31c62f302f5fe2d92ba5e917439fe 100644 (file)
Binary files a/ext/standard/tests/strings/strstr.phpt and b/ext/standard/tests/strings/strstr.phpt differ
index c0ad1d0115e6789de6941e0d5be5adc2fba188e5..ff631754df6a89026cf0da44c630ad5580a2ccb2 100644 (file)
Binary files a/ext/standard/tests/strings/strtolower-win32.phpt and b/ext/standard/tests/strings/strtolower-win32.phpt differ
index 47dfe097626ea9c74c0a134b13620bce5578f3c0..7c7e2bb4c7e13fa1ffa7525d29d7eccd5e79ed33 100644 (file)
Binary files a/ext/standard/tests/strings/strtolower.phpt and b/ext/standard/tests/strings/strtolower.phpt differ
index 60701652e19b6c1bba7e6d6072048355665af2da..7240e5c021dc89381c0d70f4f82e4328b1a806fb 100644 (file)
Binary files a/ext/standard/tests/strings/strtoupper1-win32.phpt and b/ext/standard/tests/strings/strtoupper1-win32.phpt differ
index e0ebf42ea767eadf5d4545076c659df65f5fb220..c243ff10c76f0721d90ee42988f9ba6762335952 100644 (file)
Binary files a/ext/standard/tests/strings/strtoupper1.phpt and b/ext/standard/tests/strings/strtoupper1.phpt differ
index 37ecfd14d571dc30d83f64df6987bc7c8f036020..acf3cc623a8f8035cca1f6b6e16bb2d451f92cd5 100644 (file)
@@ -16,17 +16,6 @@ class MyClass
        // no toString() method defined
 }
 
-$string  = "Hello";
-$extra_arg = 10;
-
-//Test strval with one more than the expected number of arguments
-echo "\n-- Testing strval() function with more than expected no. of arguments --\n";
-var_dump( strval($string, $extra_arg) );
-
-// Testing strval with one less than the expected number of arguments
-echo "\n-- Testing strval() function with less than expected no. of arguments --\n";
-var_dump( strval() );
-
 // Testing strval with a object which has no toString() method
 echo "\n-- Testing strval() function with object which has not toString() method  --\n";
 var_dump( strval(new MyClass()) );
@@ -36,16 +25,6 @@ var_dump( strval(new MyClass()) );
 --EXPECTF--
 *** Testing strval() : error conditions ***
 
--- Testing strval() function with more than expected no. of arguments --
-
-Warning: strval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Testing strval() function with less than expected no. of arguments --
-
-Warning: strval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
 -- Testing strval() function with object which has not toString() method  --
 
 Recoverable fatal error: Object of class MyClass could not be converted to string in %s on line %d
index 0901d2082e84a06c24aa1c3ca6a63fe5a9be6460..18e7cd17812091d5599a726af903ccd065fa448d 100644 (file)
Binary files a/ext/standard/tests/strings/substr.phpt and b/ext/standard/tests/strings/substr.phpt differ
index 1fdf1b144fc5c0ce0f733e3d6ba64d69bbea862d..2e3256631c33f7bb7dc516abe146c056402dde9a 100644 (file)
@@ -12,11 +12,9 @@ var_dump(substr_compare("abcde", "cd", 1, 2) < 0);
 var_dump(substr_compare("abcde", "abc", 5, 1));
 var_dump(substr_compare("abcde", "abcdef", -10, 10) < 0);
 var_dump(substr_compare("abcde", "abc", 0, 0));
-var_dump(substr_compare("abcde", -1, 0, NULL, new stdClass));
 echo "Test\n";
 var_dump(substr_compare("abcde", "abc", 0, -1));
 var_dump(substr_compare("abcde", "abc", -1, NULL, -5) > 0);
-var_dump(substr_compare("abcde", -1, 0, "str", new stdClass));
 
 echo "Done\n";
 ?>
@@ -32,15 +30,9 @@ Warning: substr_compare(): The start position cannot exceed initial string lengt
 bool(false)
 bool(true)
 int(0)
-
-Warning: substr_compare() expects parameter 5 to be bool, object given in %s on line %d
-bool(false)
 Test
 
 Warning: substr_compare(): The length must be greater than or equal to zero in %s on line %d
 bool(false)
 bool(true)
-
-Warning: substr_compare() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
 Done
index eecc251e6cdd6f8316e2ac4a85f0239facfcfcda..246963d13b40e6becf67a6c4733786605a39a41a 100644 (file)
@@ -6,12 +6,6 @@ Test substr_count() function (error conditions)
 echo "\n*** Testing error conditions ***\n";
 $str = 'abcdefghik';
 
-/* Zero argument */
-var_dump( substr_count() );
-
-/* more than expected no. of args */
-var_dump( substr_count($str, "t", 0, 15, 30) );
-
 /* offset before start */
 var_dump(substr_count($str, "t", -20));
 
@@ -22,9 +16,6 @@ var_dump(substr_count($str, "t", 25));
    Warning message expected, as length+offset > length of string */
 var_dump( substr_count($str, "i", 5, 7) );
 
-/* Invalid offset argument */
-var_dump( substr_count($str, "t", "") );
-
 /* length too small */
 var_dump( substr_count($str, "t", 2, -20) );
 
@@ -34,12 +25,6 @@ echo "Done\n";
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: substr_count() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: substr_count() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
 Warning: substr_count(): Offset not contained in string in %s on line %d
 bool(false)
 
@@ -49,9 +34,6 @@ bool(false)
 Warning: substr_count(): Invalid length value in %s on line %d
 bool(false)
 
-Warning: substr_count() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
 Warning: substr_count(): Invalid length value in %s on line %d
 bool(false)
 Done
index 71f2d223e10402934c5fe5ff330f3a4201922b3e..19a9a0310d0dcdf9ce3acd468fe05414fc2a69b0 100644 (file)
@@ -12,9 +12,6 @@ var_dump( substr_count($str, "i", "5t") );
 var_dump( substr_count($str, "i", "5t", "10t") );
 
 echo "\n-- 3rd or 4th arg as NULL --\n";
-var_dump( substr_count($str, "t", "") );
-var_dump( substr_count($str, "T", "") );
-var_dump( substr_count($str, "t", "", 15) );
 var_dump( substr_count($str, "I", NULL) );
 var_dump( substr_count($str, "i", NULL, 10) );
 
@@ -67,15 +64,6 @@ Notice: A non well formed numeric value encountered in %s on line %d
 int(2)
 
 -- 3rd or 4th arg as NULL --
-
-Warning: substr_count() expects parameter 3 to be int, string given %s on line %d
-NULL
-
-Warning: substr_count() expects parameter 3 to be int, string given %s on line %d
-NULL
-
-Warning: substr_count() expects parameter 3 to be int, string given %s on line %d
-NULL
 int(0)
 int(2)
 
index ac945349fe2c2d18be27044bd21abbadd63a8269..936d0fd1d5813fccbc1e2776b42b0db68d1e3e1e 100644 (file)
@@ -15,13 +15,6 @@ echo "*** Testing substr_replace() : error conditions ***\n";
 
 $s1 = "Good morning";
 
-echo "\n-- Testing substr_replace() function with less than expected no. of arguments --\n";
-var_dump(substr_replace());
-var_dump(substr_replace($s1, "evening"));
-
-echo "\n-- Testing substr_replace() function with more than expected no. of arguments --\n";
-var_dump(substr_replace($s1, "evening", 5, 7, true));
-
 echo "\n-- Testing substr_replace() function with start and length different types --\n";
 var_dump(substr_replace($s1, "evening", array(5)));
 var_dump(substr_replace($s1, "evening", 5, array(8)));
@@ -37,19 +30,6 @@ var_dump(substr_replace($s1, "evening", array(5), array(8)));
 --EXPECTF--
 *** Testing substr_replace() : error conditions ***
 
--- Testing substr_replace() function with less than expected no. of arguments --
-
-Warning: substr_replace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: substr_replace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing substr_replace() function with more than expected no. of arguments --
-
-Warning: substr_replace() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
 -- Testing substr_replace() function with start and length different types --
 
 Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array  in %s on line %d
index d0e4070d80612c7e6118a755bc36f12119c8a24f..1ad504c61d078a155b369eb9a2006bb1218b249b 100644 (file)
Binary files a/ext/standard/tests/strings/trim1.phpt and b/ext/standard/tests/strings/trim1.phpt differ
index b845cee1ac316715d235e19be467cff493368fa5..046a2b04f98bffb32c9e11b98f8f62868bdb1818 100644 (file)
@@ -11,14 +11,6 @@ Test trim() function : error conditions
 
 echo "*** Testing trim() : error conditions ***\n";
 
-echo "\n-- Testing trim() function with no arguments --\n";
-var_dump( trim() );
-
-echo "\n-- Testing trim() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( trim("Hello World",  "Heo", $extra_arg) );
-
-
 $hello = "  Hello World\n";
 echo "\n-- Test trim function with various invalid charlists --\n";
 var_dump(trim($hello, "..a"));
@@ -31,16 +23,6 @@ var_dump(trim($hello, "a..b..c"));
 --EXPECTF--
 *** Testing trim() : error conditions ***
 
--- Testing trim() function with no arguments --
-
-Warning: trim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing trim() function with more than expected no. of arguments --
-
-Warning: trim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Test trim function with various invalid charlists --
 
 Warning: trim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
index 0b177a85651443cf2d0ce66b3fdc0270f05fd91f..3508881d3ca66249045f0c44db6d76e7c476ffbb 100644 (file)
Binary files a/ext/standard/tests/strings/ucfirst.phpt and b/ext/standard/tests/strings/ucfirst.phpt differ
index f04e49377299289454eaf9144d5743f5f917a881..b34be23267851a7457721f9248cfa493104ba66c 100644 (file)
@@ -10,13 +10,6 @@ Test unpack() function : error conditions
 
 echo "*** Testing unpack() : error conditions ***\n";
 
-echo "\n-- Testing unpack() function with no arguments --\n";
-var_dump( unpack() );
-
-echo "\n-- Testing unpack() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump(unpack("I", pack("I", 65534), 0, $extra_arg));
-
 echo "\n-- Testing unpack() function with invalid format character --\n";
 $extra_arg = 10;
 var_dump(unpack("B", pack("I", 65534)));
@@ -25,16 +18,6 @@ var_dump(unpack("B", pack("I", 65534)));
 --EXPECTF--
 *** Testing unpack() : error conditions ***
 
--- Testing unpack() function with no arguments --
-
-Warning: unpack() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing unpack() function with more than expected no. of arguments --
-
-Warning: unpack() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing unpack() function with invalid format character --
 
 Warning: unpack(): Invalid format type B in %s on line %d
index 5a1f3d2a244b726f53d8a76047c38c84bdfcbc1e..8199a2ed0571bdfb89b08079ce30fac72b989f99 100644 (file)
@@ -3,9 +3,6 @@ uuencode family tests
 --FILE--
 <?php
 
-var_dump(convert_uuencode(array()));
-var_dump(convert_uudecode(array()));
-
 var_dump(convert_uuencode(""));
 var_dump(convert_uudecode(""));
 var_dump($enc = convert_uuencode("~!@#$%^&*()_}{POIUYTREWQQSDFGHJKL:<MNBVCXZ"));
@@ -18,11 +15,6 @@ var_dump(convert_uudecode(substr($enc, 0, -10)));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
 bool(false)
 bool(false)
 string(60) "J?B%`(R0E7B8J*"E??7M03TE5651215=145-$1D=(2DM,.CQ-3D)60UA:
index c56631ecd7e9c9abd43e6db42243fd0817b7f684..b4548e8b49e850d6de1fc76c7ffad12e3acdd722 100644 (file)
@@ -20,8 +20,16 @@ echo "\n-- Testing vfprintf() function with more than expected no. of arguments
 $format = 'string_val';
 $args = array( 1, 2 );
 $extra_arg = 10;
-var_dump( vfprintf( $fp, $format, $args, $extra_arg ) );
-var_dump( vfprintf( $fp, "Foo %d", array(6), "bar" ) );
+try {
+    var_dump( vfprintf( $fp, $format, $args, $extra_arg ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    var_dump( vfprintf( $fp, "Foo %d", array(6), "bar" ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 // Close handle
 fclose($fp);
@@ -37,10 +45,6 @@ unlink( $file );
 ?>
 --EXPECTF--
 -- Testing vfprintf() function with more than expected no. of arguments --
-
-Warning: Wrong parameter count for vfprintf() in %s on line %d
-NULL
-
-Warning: Wrong parameter count for vfprintf() in %s on line %d
-NULL
+Wrong parameter count for vfprintf()
+Wrong parameter count for vfprintf()
 ===DONE===
index 2865d42a9e65531ca0c4128975ea08f7ebca781b..e54e34f4cdf6345b69f6dc56e0714b25e0556958 100644 (file)
@@ -17,7 +17,11 @@ $file = 'vfprintf_error4.txt';
 $fp = fopen( $file, "a+" );
 
 echo "\n-- Testing vfprintf() function with other strangeties  --\n";
-var_dump( vfprintf( 'foo', 'bar', array( 'baz' ) ) );
+try {
+    var_dump( vfprintf( 'foo', 'bar', array( 'baz' ) ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 var_dump( vfprintf( $fp, 'Foo %$c-0202Sd', array( 2 ) ) );
 
 // Close handle
@@ -34,9 +38,7 @@ unlink( $file );
 ?>
 --EXPECTF--
 -- Testing vfprintf() function with other strangeties  --
-
-Warning: vfprintf() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
+vfprintf() expects parameter 1 to be resource, string given
 
 Warning: vfprintf(): Argument number must be greater than zero in %s on line %d
 bool(false)
index 76422011c2fc384aade8ab59acec42f257c95685..7c969ffff9fda0c7f2af0a0b86071bf8700a3d4d 100644 (file)
@@ -48,8 +48,6 @@ writeAndDump( $fp, "%s %s %s", array( 'bar', 'bar', 'bar' ) );
 writeAndDump( $fp, "%02d", array( 50 ) );
 writeAndDump( $fp, "", array() );
 writeAndDump( $fp, "Testing %b %d %f %o %s %x %X", array( 9, 6, 2.5502, 24, "foobar", 15, 65 ) );
-@writeAndDump( $funset, "Foo with %s", array( 'string' ) );
-@writeAndDump( new FooClass(), "Foo with %s", array( 'string' ) );
 
 // Close handle
 fclose( $fp );
@@ -79,8 +77,4 @@ string(0) ""
 int(0)
 string(38) "Testing 1001 6 2.550200 30 foobar f 41"
 int(38)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
 ===DONE===
index 41c5cbdb69e946b091e1f3f2546a991dbd462a0d..ad75461d3d19bd5feafd883d57f332e34a59eeb8 100644 (file)
@@ -9,19 +9,10 @@ Test wordwrap() function : error conditions
 
 echo "*** Testing wordwrap() : error conditions ***\n";
 
-// Zero argument
-echo "\n-- Testing wordwrap() function with Zero arguments --\n";
-var_dump( wordwrap() );
-
-// More than expected number of arguments
-echo "\n-- Testing wordwrap() function with more than expected no. of arguments --\n";
 $str = 'testing wordwrap function';
 $width = 10;
 $break = '<br />\n';
 $cut = true;
-$extra_arg = "extra_arg";
-
-var_dump( wordwrap($str, $width, $break, $cut, $extra_arg) );
 
 // $width arg as negative value
 echo "\n-- Testing wordwrap() function with negative/zero value for width argument --\n";
@@ -54,16 +45,6 @@ echo "Done\n";
 --EXPECTF--
 *** Testing wordwrap() : error conditions ***
 
--- Testing wordwrap() function with Zero arguments --
-
-Warning: wordwrap() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing wordwrap() function with more than expected no. of arguments --
-
-Warning: wordwrap() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
 -- Testing wordwrap() function with negative/zero value for width argument --
 -- width = 0 & cut = false --
 string(39) "testing<br />\nwordwrap<br />\nfunction"
index f49025be44491cc5d10a8a108fc6dc45cf953c1d..3f7bbbdb824248a2f6752f6ea6c565e069d5d727 100644 (file)
@@ -19,20 +19,8 @@ date_default_timezone_set("Europe/London");
 
 echo "*** Testing strptime() : error conditions ***\n";
 
-echo "\n-- Testing strptime() function with Zero arguments --\n";
-var_dump( strptime() );
-
-echo "\n-- Testing strptime() function with less than expected no. of arguments --\n";
-$format = '%b %d %Y %H:%M:%S';
-$timestamp = mktime(8, 8, 8, 8, 8, 2008);
-$date = strftime($format, $timestamp);
-var_dump( strptime($date) );
-
-echo "\n-- Testing strptime() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( strptime($date, $format, $extra_arg) );
-
 echo "\n-- Testing strptime() function on failure --\n";
+$format = '%b %d %Y %H:%M:%S';
 var_dump( strptime('foo', $format) );
 
 ?>
@@ -40,21 +28,6 @@ var_dump( strptime('foo', $format) );
 --EXPECTF--
 *** Testing strptime() : error conditions ***
 
--- Testing strptime() function with Zero arguments --
-
-Warning: strptime() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing strptime() function with less than expected no. of arguments --
-
-Warning: strptime() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing strptime() function with more than expected no. of arguments --
-
-Warning: strptime() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Testing strptime() function on failure --
 bool(false)
 ===DONE===
index a2680c21c0f4cf9cdd2c85260efbc08afb74ac5b..0016ab82c2f782543a849f62d2e9cfc2e2faa97f 100644 (file)
@@ -10,13 +10,12 @@ $tests = array(null, 'foo');
 foreach ($tests as $q) {
 
     if ($q === null) {
-       do {
-           $id = ftok(__FILE__, chr(mt_rand(0, 255)));
-       } while (msg_queue_exists($id));
+               do {
+                       $id = ftok(__FILE__, chr(mt_rand(0, 255))); } while (msg_queue_exists($id));
+    }
 
        $q = msg_get_queue($id) or die("Failed to create queue");
        msg_remove_queue($q) or die("Failed to close queue");
-    }
 
     echo "Using '$q' as queue resource:\n";
 
@@ -50,22 +49,16 @@ bool(false)
 Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d
 bool(false)
 bool(true)
-Using 'foo' as queue resource:
-
-Warning: msg_set_queue() expects parameter 1 to be resource, string given in %s on line %d
+Using 'Resource id #5' as queue resource:
 bool(false)
-
-Warning: msg_stat_queue() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: msg_receive() expects parameter 1 to be resource, string given in %s on line %d
 bool(false)
 bool(false)
+bool(true)
 
-Warning: msg_receive() expects parameter 1 to be resource, string given in %s on line %d
+Warning: msg_receive(): maximum size of the message has to be greater than zero in %s on line %d
 bool(false)
 
-Warning: msg_send() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
+Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d
 bool(false)
+bool(true)
 Done
index 55fd8eec1dc8c515299dc12f188ed50731675110..55d5444b98c1eabfc241ab6d3b47251d72526d6c 100644 (file)
@@ -8,10 +8,6 @@ if (!function_exists('ftok')){ print 'skip'; }
 --FILE--
 <?php
 
-var_dump(ftok());
-var_dump(ftok(1));
-var_dump(ftok(1,1,1));
-
 var_dump(ftok("",""));
 var_dump(ftok(-1, -1));
 var_dump(ftok("qwertyu","qwertyu"));
@@ -23,15 +19,6 @@ var_dump(ftok(__FILE__,"q"));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: ftok() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: ftok() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: ftok() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
 Warning: ftok(): Pathname is invalid in %s on line %d
 int(-1)
 
index 3bfb28e5c68f4c9af3eb54796dbe99d1c5e70518..d558623242993c95a2fcec9cdbe14c78fc5df9c0 100644 (file)
@@ -10,19 +10,14 @@ if (!function_exists('ftok')){ print 'skip'; }
 
 $key = ftok(__FILE__, 't');
 
-var_dump(shm_attach());
-var_dump(shm_attach(1,2,3,4));
-
 var_dump(shm_attach(-1, 0));
 var_dump(shm_attach(0, -1));
 var_dump(shm_attach(123, -1));
-var_dump($s = shm_attach($key, -1));
-shm_remove($s);
-var_dump($s = shm_attach($key, 0));
-shm_remove($s);
+var_dump(shm_attach($key, -1));
+var_dump(shm_attach($key, 0));
 
 var_dump($s = shm_attach($key, 1024));
-shm_remove($key);
+shm_remove($s);
 var_dump($s = shm_attach($key, 1024));
 shm_remove($s);
 var_dump($s = shm_attach($key, 1024, 0666));
@@ -36,12 +31,6 @@ shm_remove($s);
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: shm_attach() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: shm_attach() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 Warning: shm_attach(): Segment size must be greater than zero in %s on line %d
 bool(false)
 
@@ -54,15 +43,9 @@ bool(false)
 Warning: shm_attach(): Segment size must be greater than zero in %s on line %d
 bool(false)
 
-Warning: shm_remove() expects parameter 1 to be resource, bool given in %s on line %d
-
 Warning: shm_attach(): Segment size must be greater than zero in %s on line %d
 bool(false)
-
-Warning: shm_remove() expects parameter 1 to be resource, bool given in %s on line %d
 resource(%d) of type (sysvshm)
-
-Warning: shm_remove() expects parameter 1 to be resource, int given in %s on line %d
 resource(%d) of type (sysvshm)
 resource(%d) of type (sysvshm)
 resource(%d) of type (sysvshm)
index 010ac83cd3d6d14f66970018720907c16d0633c0..fd81c48a67a86c68534c65656a30eb02f63b5858 100644 (file)
@@ -10,19 +10,12 @@ if (!function_exists('ftok')){ print 'skip'; }
 
 $key = ftok(dirname(__FILE__)."/003.phpt", 'q');
 
-var_dump(shm_detach());
-var_dump(shm_detach(1,1));
-
 $s = shm_attach($key);
 
 var_dump(shm_detach($s));
 var_dump(shm_detach($s));
 shm_remove($s);
 
-var_dump(shm_detach(0));
-var_dump(shm_detach(1));
-var_dump(shm_detach(-1));
-
 echo "Done\n";
 ?>
 --CLEAN--
@@ -34,24 +27,10 @@ shm_remove($s);
 
 ?>
 --EXPECTF--
-Warning: shm_detach() expects exactly 1 parameter, 0 given in %s003.php on line %d
-NULL
-
-Warning: shm_detach() expects exactly 1 parameter, 2 given in %s003.php on line %d
-NULL
 bool(true)
 
 Warning: shm_detach(): supplied resource is not a valid sysvshm resource in %s003.php on line %d
 bool(false)
 
 Warning: shm_remove(): supplied resource is not a valid sysvshm resource in %s003.php on line %d
-
-Warning: shm_detach() expects parameter 1 to be resource, int given in %s003.php on line %d
-NULL
-
-Warning: shm_detach() expects parameter 1 to be resource, int given in %s003.php on line %d
-NULL
-
-Warning: shm_detach() expects parameter 1 to be resource, int given in %s003.php on line %d
-NULL
 Done
index ee644918403274648add5e9cc94c1847d8e3a4e2..23496f5c1c1a1e9144f4aea37b915bc1415ce28e 100644 (file)
@@ -11,9 +11,6 @@ if (!function_exists('ftok')){ print 'skip'; }
 $key = ftok(__FILE__, 't');
 $s = shm_attach($key, 1024);
 
-var_dump(shm_put_var());
-var_dump(shm_put_var(-1, -1, -1));
-var_dump(shm_put_var(-1, 10, "qwerty"));
 var_dump(shm_put_var($s, -1, "qwerty"));
 var_dump(shm_put_var($s, 10, "qwerty"));
 var_dump(shm_put_var($s, 10, "qwerty"));
@@ -26,18 +23,10 @@ shm_remove($s);
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: shm_put_var() expects exactly 3 parameters, 0 given in %s004.php on line %d
-NULL
-
-Warning: shm_put_var() expects parameter 1 to be resource, int given in %s004.php on line %d
-NULL
-
-Warning: shm_put_var() expects parameter 1 to be resource, int given in %s004.php on line %d
-NULL
 bool(true)
 bool(true)
 bool(true)
 
-Warning: shm_put_var(): not enough shared memory left in %s004.php on line 14
+Warning: shm_put_var(): not enough shared memory left in %s004.php on line %d
 bool(false)
 Done
index 0a3d3422e823cb023730b8972f97ff009be00666..879be31c13267fb4484484469c916a783315c9af 100644 (file)
@@ -17,14 +17,9 @@ shm_put_var($s, 1, array(1,2,3));
 shm_put_var($s, 2, false);
 shm_put_var($s, 3, null);
 
-var_dump(shm_get_var());
-
-var_dump(shm_get_var(-1, -1));
-
 var_dump(shm_get_var($s, 1000));
 var_dump(shm_get_var($s, -10000));
 
-var_dump(shm_get_var($s, array()));
 var_dump(shm_get_var($s, -1));
 var_dump(shm_get_var($s, 0));
 var_dump(shm_get_var($s, 1));
@@ -41,20 +36,11 @@ shm_remove($s);
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: shm_get_var() expects exactly 2 parameters, 0 given in %s005.php on line %d
-NULL
-
-Warning: shm_get_var() expects parameter 1 to be resource, int given in %s005.php on line %d
-NULL
-
 Warning: shm_get_var(): variable key 1000 doesn't exist in %s005.php on line %d
 bool(false)
 
 Warning: shm_get_var(): variable key -10000 doesn't exist in %s005.php on line %d
 bool(false)
-
-Warning: shm_get_var() expects parameter 2 to be int, array given in %s005.php on line %d
-NULL
 string(11) "test string"
 object(stdClass)#%d (0) {
 }
index b38aee02a12b3864645a41469252f620821f82b1..278838f063c48ae12509a9ecbddc2b301883a904 100644 (file)
@@ -13,8 +13,6 @@ $s = shm_attach($key, 1024);
 
 shm_put_var($s, 1, "test string");
 
-var_dump(shm_remove_var());
-var_dump(shm_remove_var(-1, -1));
 var_dump(shm_remove_var($s, -10));
 
 var_dump(shm_get_var($s, 1));
@@ -29,12 +27,6 @@ shm_remove($s);
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: shm_remove_var() expects exactly 2 parameters, 0 given in %s006.php on line %d
-NULL
-
-Warning: shm_remove_var() expects parameter 1 to be resource, int given in %s006.php on line %d
-NULL
-
 Warning: shm_remove_var(): variable key -10 doesn't exist in %s006.php on line %d
 bool(false)
 string(11) "test string"
index a165a8bfbfbda319cd6948ca08db1a6a4adcec35..747d401333acdab81e850ba6f1e8afcd3f0f7ec3 100644 (file)
@@ -11,11 +11,6 @@ if (!function_exists('ftok')){ print 'skip'; }
 $key = ftok(__FILE__, 't');
 $s = shm_attach($key, 1024);
 
-var_dump(shm_remove());
-var_dump(shm_remove(-1));
-var_dump(shm_remove(0));
-var_dump(shm_remove(""));
-
 var_dump(shm_remove($s));
 
 shm_detach($s);
@@ -24,17 +19,6 @@ var_dump(shm_remove($s));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: shm_remove() expects exactly 1 parameter, 0 given in %s007.php on line %d
-NULL
-
-Warning: shm_remove() expects parameter 1 to be resource, int given in %s007.php on line %d
-NULL
-
-Warning: shm_remove() expects parameter 1 to be resource, int given in %s007.php on line %d
-NULL
-
-Warning: shm_remove() expects parameter 1 to be resource, string given in %s007.php on line %d
-NULL
 bool(true)
 
 Warning: shm_remove(): supplied resource is not a valid sysvshm resource in %s007.php on line %d
index 188b8cd4e9e8f9301f4f6211936a2b6986927de1..dae23127b55629b732daa7b85c8070c94627196b 100644 (file)
@@ -7,17 +7,14 @@ tidy_repair_*() and invalid parameters
 
 $l = 1;
 $s = "";
-$a = array();
 
 tidy_repair_string($s, $l, $l, $l);
 tidy_repair_string($s, $s, $s, $s);
 tidy_repair_string($l, $l, $l ,$l);
-tidy_repair_string($a, $a, $a, $a);
 
 tidy_repair_file($s, $l, $l, $l);
 tidy_repair_file($s, $s, $s, $s);
 tidy_repair_file($l, $l, $l ,$l);
-tidy_repair_file($a, $a, $a, $a);
 
 echo "Done\n";
 ?>
@@ -32,11 +29,7 @@ Warning: tidy_repair_string(): Could not load configuration file '1' in %s on li
 
 Warning: tidy_repair_string(): Could not set encoding '1' in %s on line %d
 
-Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d
-
 Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d
 
 Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d
-
-Warning: tidy_repair_file() expects parameter 1 to be a valid path, array given in %s on line %d
 Done
index 4c6295cdf8d7c17dfe549442801690adc67dbf24..8e58c81891963d182926630e5e2c1c3fdf966af0 100644 (file)
@@ -126,8 +126,6 @@ echo token_name(T_HALT_COMPILER), "\n";
 
 echo token_name(-1), "\n";
 echo token_name(0x8000000F), "\n";
-echo token_name("string"), "\n";
-echo token_name(array()), "\n";
 
 echo "Done\n";
 ?>
@@ -251,10 +249,4 @@ T_CLONE
 T_HALT_COMPILER
 UNKNOWN
 UNKNOWN
-
-Warning: token_name() expects parameter 1 to be int, string given in %s on line %d
-
-
-Warning: token_name() expects parameter 1 to be int, array given in %s on line %d
-
 Done
index 3ba6d594dfa7edd1c354b1ee1a5745266a2ef74a..6c3cc4c55914cc8494c535cac7b5ebe6cc1cdbc8 100644 (file)
@@ -5,8 +5,6 @@ token_get_all() and wrong parameters
 --FILE--
 <?php
 
-var_dump(token_get_all(array()));
-var_dump(token_get_all(new stdClass));
 var_dump(token_get_all(""));
 var_dump(token_get_all(0));
 var_dump(token_get_all(-1));
@@ -14,11 +12,6 @@ var_dump(token_get_all(-1));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: token_get_all() expects parameter 1 to be string, object given in %s on line %d
-NULL
 array(0) {
 }
 array(1) {
index 49dfba8f1049a39ddcc27fedd820038888b2010a..af41530ab2076933273050b17f4d26e9b1567042 100644 (file)
@@ -7,7 +7,6 @@ xmlrpc_encode_request() with wrong arguments
 
 var_dump(xmlrpc_encode_request(-1, 1));
 var_dump(xmlrpc_encode_request("", 1));
-var_dump(xmlrpc_encode_request(array(), 1));
 var_dump(xmlrpc_encode_request(3.4, 1));
 
 echo "Done\n";
@@ -37,9 +36,6 @@ string(160) "<?xml version="1.0" encoding="iso-8859-1"?>
 </params>
 </methodCall>
 "
-
-Warning: xmlrpc_encode_request() expects parameter 1 to be string, array given in %s on line %d
-NULL
 string(175) "<?xml version="1.0" encoding="iso-8859-1"?>
 <methodCall>
 <methodName>3.4</methodName>
index cb4b4aa818e26fbbab458b1823bea96d90fd98c9..a79108233757ab107eb29734d1d84123b1ef7018 100644 (file)
@@ -21,10 +21,6 @@ $r = xmlrpc_encode_request(-1, "");
 var_dump(xmlrpc_decode_request($r, $method));
 var_dump($method);
 
-$r = xmlrpc_encode_request(array(), 1);
-var_dump(xmlrpc_decode_request($r, $method));
-var_dump($method);
-
 echo "Done\n";
 ?>
 --EXPECTF--
@@ -46,8 +42,4 @@ array(1) {
   string(0) ""
 }
 string(2) "-1"
-
-Warning: xmlrpc_encode_request() expects parameter 1 to be string, array given in %s on line %d
-NULL
-string(2) "-1"
 Done
index c87af8472274512d74eafff50505863898795dd5..886e14926160d5cb767aaad99ba75e7a5d7a51cf 100644 (file)
@@ -15,7 +15,6 @@ $xml->writeElement('foo', null);
 $xml->writeElement('foo2', "");
 $xml->writeElement('foo3');
 $xml->startElement('bar');
-$xml->endElement('bar');
 $xml->endElement();
 $xml->endElement();
 print $xml->flush(true);
@@ -37,7 +36,6 @@ $xw->endDocument();
 print $xw->flush(true);
 ?>
 --EXPECTF--
-Warning: XMLWriter::endElement() expects exactly 0 parameters, 1 given in %s on line %d
 <?xml version="1.0"?>
 <test>
  <foo/>
index c6b505828dd2b087724af19245a7474c8046e971..b3da94e5f81f02e7a21e64fe6bb798417fe6cc42 100644 (file)
@@ -20,7 +20,6 @@ echo $zip->getCommentName('foo') . "\n";
 echo $zip->getCommentIndex($idx);
 
 echo $zip->getCommentName('') . "\n";
-echo $zip->getCommentName() . "\n";
 
 $zip->close();
 
@@ -30,6 +29,3 @@ Zip archive comment
 foo comment
 foo comment
 Notice: ZipArchive::getCommentName(): Empty string as entry name in %s on line %d
-
-
-Warning: ZipArchive::getCommentName() expects at least 1 parameter, 0 given in %s on line %d
index eaa1d9731e37255bfc94acf558723843208eaf51..068956b81f6667402d51e157484349793f807e89 100644 (file)
@@ -12,10 +12,7 @@ if(!extension_loaded('zip')) die('skip');
 echo "Test case 1:";
 $zip = zip_open("");
 
-echo "Test case 2:";
-$zip = zip_open("i_dont_care_about_this_parameter", "this_is_one_to_many");
-
-echo "Test case 3:\n";
+echo "Test case 2:\n";
 $zip = zip_open("/non_exisitng_directory/test_procedural.zip");
 echo is_resource($zip) ? "OK" : "Failure";
 ?>
@@ -23,6 +20,4 @@ echo is_resource($zip) ? "OK" : "Failure";
 Test case 1:
 Warning: zip_open(): Empty string as source in %s on line %d
 Test case 2:
-Warning: zip_open() expects exactly 1 parameter, 2 given in %s on line %d
-Test case 3:
 Failure
index 92f7db1b708dd71959ac4678514a0b4f4ff4da8f..607228fd6f69bb6887ff086d6341fee30035c679 100644 (file)
@@ -5,9 +5,7 @@ gzfile() with various invalid params
 --FILE--
 <?php
 
-var_dump(gzfile());
 var_dump(gzfile("nonexistent_file_gzfile",1));
-var_dump(gzfile(1,1,1));
 
 var_dump(gzfile(dirname(__FILE__)."/004私はガラスを食べられます.txt.gz"));
 var_dump(gzfile(dirname(__FILE__)."/004私はガラスを食べられます.txt.gz", 1));
@@ -15,14 +13,8 @@ var_dump(gzfile(dirname(__FILE__)."/004私はガラスを食べられます.txt.
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gzfile() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gzfile(nonexistent_file_gzfile): failed to open stream: No such file or directory in %s on line %d
 bool(false)
-
-Warning: gzfile() expects at most 2 parameters, 3 given in %s on line %d
-NULL
 array(6) {
   [0]=>
   string(36) "When you're taught through feelings
index b8d0f0eccd2c120a823f2db8e1441926bd89fd28..4437ab154fc7116ff818d55b97b18b993b60250b 100644 (file)
@@ -5,9 +5,7 @@ gzfile() with various invalid params
 --FILE--
 <?php
 
-var_dump(gzfile());
 var_dump(gzfile("nonexistent_file_gzfile",1));
-var_dump(gzfile(1,1,1));
 
 var_dump(gzfile(dirname(__FILE__)."/004.txt.gz"));
 var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", 1));
@@ -15,14 +13,8 @@ var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", 1));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gzfile() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gzfile(nonexistent_file_gzfile): failed to open stream: No such file or directory in %s on line %d
 bool(false)
-
-Warning: gzfile() expects at most 2 parameters, 3 given in %s on line %d
-NULL
 array(6) {
   [0]=>
   string(36) "When you're taught through feelings
index 6333612183086c230ae98241b7a096009c0e64ed..69fe8efe6ae68cb82742a92e6b0f07a2778d6109 100644 (file)
@@ -5,7 +5,6 @@ gzcompress()/gzuncompress() and invalid params
 --FILE--
 <?php
 
-var_dump(gzcompress());
 var_dump(gzcompress("", 1000));
 var_dump(gzcompress("", -1));
 
@@ -19,7 +18,6 @@ Desolation, grief and agony";
 var_dump($data1 = gzcompress($string));
 var_dump($data2 = gzcompress($string, 9));
 
-var_dump(gzuncompress());
 var_dump(gzuncompress("", 1000));
 var_dump(gzuncompress("", -1));
 
@@ -34,9 +32,6 @@ var_dump(gzuncompress($data2));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gzcompress() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gzcompress(): compression level (1000) must be within -1..9 in %s on line %d
 bool(false)
 string(%d) "%a"
@@ -45,9 +40,6 @@ string(%d) "%a"
 string(%d) "%a"
 string(%d) "%a"
 
-Warning: gzuncompress() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gzuncompress(): %s error in %s on line %d
 bool(false)
 
index 0d082092ca3775472d5246521c170c783dcaec3e..2c666390c89154d42ebaf517aa62702e3c36c695 100644 (file)
@@ -5,7 +5,6 @@ gzdeflate()/gzinflate() and invalid params
 --FILE--
 <?php
 
-var_dump(gzdeflate());
 var_dump(gzdeflate("", 1000));
 var_dump(gzdeflate("", -1));
 
@@ -19,7 +18,6 @@ Desolation, grief and agony";
 var_dump($data1 = gzdeflate($string));
 var_dump($data2 = gzdeflate($string, 9));
 
-var_dump(gzinflate());
 var_dump(gzinflate(""));
 var_dump(gzinflate("asfwe", 1000));
 var_dump(gzinflate("asdf", -1));
@@ -35,9 +33,6 @@ var_dump(gzinflate($data2));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gzdeflate() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gzdeflate(): compression level (1000) must be within -1..9 in %s on line %d
 bool(false)
 string(%d) "%a"
@@ -46,9 +41,6 @@ string(%d) "%a"
 string(%d) "%a"
 string(%d) "%a"
 
-Warning: gzinflate() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: gzinflate(): data error in %s on line %d
 bool(false)
 
index 6c42bf67dbe8774e1f7b8f13c92ce4fa99925ab6..6028104b9ad0df296a77374c3a8565bc1f132622 100644 (file)
@@ -5,8 +5,6 @@ gzencode() and invalid params
 --FILE--
 <?php
 
-var_dump(gzencode());
-var_dump(gzencode(1,1,1,1));
 var_dump(gzencode("", -10));
 var_dump(gzencode("", 100));
 var_dump(gzencode("", 1, 100));
@@ -27,12 +25,6 @@ var_dump(gzencode($string, 9, ZLIB_ENCODING_DEFLATE));
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: gzencode() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: gzencode() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 Warning: gzencode(): compression level (-10) must be within -1..9 in %s on line %d
 bool(false)
 
index 3f742a4dca5a0131dae95b6a074d1e9679818b21..3601c61b53fef8f34e898a398bbf211154c50674 100644 (file)
@@ -20,53 +20,22 @@ if (!extension_loaded("zlib")) {
 
 echo "*** Testing gzcompress() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing gzcompress() function with Zero arguments --\n";
-var_dump( gzcompress() );
-
-//Test gzcompress with one more than the expected number of arguments
-echo "\n-- Testing gzcompress() function with more than expected no. of arguments --\n";
-$data = 'string_val';
-$level = 2;
-$encoding = ZLIB_ENCODING_RAW;
-$extra_arg = 10;
-var_dump( gzcompress($data, $level, $encoding, $extra_arg) );
-
 echo "\n-- Testing with incorrect compression level --\n";
+$data = 'string_val';
 $bad_level = 99;
 var_dump(gzcompress($data, $bad_level));
 
 echo "\n-- Testing with invalid encoding --\n";
 $data = 'string_val';
+$level = 2;
 $encoding = 99;
 var_dump(gzcompress($data, $level, $encoding));
 
-echo "\n-- Testing with incorrect parameters --\n";
-
-class Tester {
-    function Hello() {
-        echo "Hello\n";
-    }
-}
-
-$testclass = new Tester();
-var_dump(gzcompress($testclass));
-
 ?>
 ===Done===
 --EXPECTF--
 *** Testing gzcompress() : error conditions ***
 
--- Testing gzcompress() function with Zero arguments --
-
-Warning: gzcompress() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing gzcompress() function with more than expected no. of arguments --
-
-Warning: gzcompress() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing with incorrect compression level --
 
 Warning: gzcompress(): compression level (99) must be within -1..9 in %s on line %d
@@ -76,9 +45,4 @@ bool(false)
 
 Warning: gzcompress(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
 bool(false)
-
--- Testing with incorrect parameters --
-
-Warning: gzcompress() expects parameter 1 to be string, object given in %s on line %d
-NULL
 ===Done===
index 93f8c03b4c7cae48447bea616127361ab0964d98..af74d1c771a06a11ed336d7fe4ed6fbac3bc1a6b 100644 (file)
@@ -20,52 +20,22 @@ if (!extension_loaded("zlib")) {
 
 echo "*** Testing gzdeflate() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing gzdeflate() function with Zero arguments --\n";
-var_dump( gzdeflate() );
-
-//Test gzdeflate with one more than the expected number of arguments
-echo "\n-- Testing gzdeflate() function with more than expected no. of arguments --\n";
 $data = 'string_val';
-$level = 2;
-$encoding = ZLIB_ENCODING_RAW;
-$extra_arg = 10;
-var_dump( gzdeflate($data, $level, $encoding, $extra_arg) );
 
 echo "\n-- Testing with incorrect compression level --\n";
 $bad_level = 99;
 var_dump(gzdeflate($data, $bad_level));
 
 echo "\n-- Testing with incorrect encoding --\n";
+$level = 2;
 $bad_encoding = 99;
 var_dump(gzdeflate($data, $level, $bad_encoding));
 
-class Tester {
-    function Hello() {
-        echo "Hello\n";
-    }
-}
-
-echo "\n-- Testing with incorrect parameters --\n";
-$testclass = new Tester();
-var_dump(gzdeflate($testclass));
-var_dump(gzdeflate($data, $testclass));
-
 ?>
 ===Done===
 --EXPECTF--
 *** Testing gzdeflate() : error conditions ***
 
--- Testing gzdeflate() function with Zero arguments --
-
-Warning: gzdeflate() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing gzdeflate() function with more than expected no. of arguments --
-
-Warning: gzdeflate() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing with incorrect compression level --
 
 Warning: gzdeflate(): compression level (99) must be within -1..9 in %s on line %d
@@ -75,12 +45,4 @@ bool(false)
 
 Warning: gzdeflate(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
 bool(false)
-
--- Testing with incorrect parameters --
-
-Warning: gzdeflate() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: gzdeflate() expects parameter 2 to be int, object given in %s on line %d
-NULL
 ===Done===
index ac846866c54f381d582192b840816f680324518d..15b70afb8a1471187f0f38b084c1b5b2e068167d 100644 (file)
@@ -20,17 +20,9 @@ if (!extension_loaded("zlib")) {
 
 echo "*** Testing gzencode() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing gzencode() function with Zero arguments --\n";
-var_dump( gzencode() );
-
-//Test gzencode with one more than the expected number of arguments
-echo "\n-- Testing gzencode() function with more than expected no. of arguments --\n";
 $data = 'string_val';
 $level = 2;
 $encoding_mode = FORCE_DEFLATE;
-$extra_arg = 10;
-var_dump( gzencode($data, $level, $encoding_mode, $extra_arg) );
 
 echo "\n-- Testing with incorrect compression level --\n";
 $bad_level = 99;
@@ -40,35 +32,11 @@ echo "\n-- Testing with incorrect encoding_mode --\n";
 $bad_mode = 99;
 var_dump(gzencode($data, $level, $bad_mode));
 
-class Tester {
-    function Hello() {
-        echo "Hello\n";
-    }
-}
-
-echo "\n-- Testing with incorrect parameters --\n";
-$testclass = new Tester();
-var_dump(gzencode($testclass));
-var_dump(gzencode($data, $testclass));
-var_dump(gzencode($data, -1, 99.99));
-var_dump(gzencode($data, -1, $testclass));
-var_dump(gzencode($data, "a very none numeric string\n"));
-
 ?>
 ===Done===
 --EXPECTF--
 *** Testing gzencode() : error conditions ***
 
--- Testing gzencode() function with Zero arguments --
-
-Warning: gzencode() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing gzencode() function with more than expected no. of arguments --
-
-Warning: gzencode() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
 -- Testing with incorrect compression level --
 
 Warning: gzencode(): compression level (99) must be within -1..9 in %s on line %d
@@ -78,21 +46,4 @@ bool(false)
 
 Warning: gzencode(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
 bool(false)
-
--- Testing with incorrect parameters --
-
-Warning: gzencode() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: gzencode() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Warning: gzencode(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
-bool(false)
-
-Warning: gzencode() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
-Warning: gzencode() expects parameter 2 to be int, string given in %s on line %d
-NULL
 ===Done===
index cbfe615511005fe1edcf2d2cb173bed2dc06ee3c..5b8e40620ccdeb11f351dbf9c804f07b77494020 100644 (file)
@@ -18,58 +18,20 @@ include(dirname(__FILE__) . '/data.inc');
 
 echo "*** Testing gzinflate() : error conditions ***\n";
 
-echo "\n-- Testing gzcompress() function with Zero arguments --\n";
-var_dump( gzinflate() );
-
-echo "\n-- Testing gzcompress() function with more than expected no. of arguments --\n";
-$data = 'string_val';
-$length = 10;
-$extra_arg = 10;
-var_dump( gzinflate($data, $length, $extra_arg) );
-
 echo "\n-- Testing with a buffer that is too small --\n";
+$data = 'string_val';
 $short_len = strlen($data) - 1;
 $compressed = gzcompress($data);
 
 var_dump(gzinflate($compressed, $short_len));
 
-echo "\n-- Testing with incorrect parameters --\n";
-
-class Tester {
-    function Hello() {
-        echo "Hello\n";
-    }
-}
-
-$testclass = new Tester();
-var_dump(gzinflate($testclass));
-var_dump(gzinflate($data, $testclass));
-
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing gzinflate() : error conditions ***
 
--- Testing gzcompress() function with Zero arguments --
-
-Warning: gzinflate() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing gzcompress() function with more than expected no. of arguments --
-
-Warning: gzinflate() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Testing with a buffer that is too small --
 
 Warning: gzinflate(): data error in %s on line %d
 bool(false)
-
--- Testing with incorrect parameters --
-
-Warning: gzinflate() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: gzinflate() expects parameter 2 to be int, object given in %s on line %d
-NULL
 ===DONE===
index baa9c715aeb544eebf4ffe01b006dc21dc793a7b..b02c7152a884fdbf4a0c49b82d0faaa11681afe7 100644 (file)
@@ -32,73 +32,82 @@ restore_include_path();
 chdir($baseDir);
 rmdir($workingDir);
 foreach($newdirs as $newdir) {
-   rmdir($newdir);
+    rmdir($newdir);
 }
 
 chdir("..");
 rmdir($thisTestDir);
 
 function test_gzopen($mode) {
-   global $scriptFile, $secondFile, $firstFile, $filename;
-
-   // create a file in the middle directory
-   $h = gzopen($secondFile, "w");
-   gzwrite($h, "This is a file in dir2");
-   gzclose($h);
-
-   echo "\n** testing with mode=$mode **\n";
-   // should read dir2 file
-   $h = gzopen($filename, $mode, true);
-   gzpassthru($h);
-   gzclose($h);
-   echo "\n";
-
-   //create a file in dir1
-   $h = gzopen($firstFile, "w");
-   gzwrite($h, "This is a file in dir1");
-   gzclose($h);
-
-   //should now read dir1 file
-   $h = gzopen($filename, $mode, true);
-   gzpassthru($h);
-   gzclose($h);
-   echo "\n";
-
-   // create a file in working directory
-   $h = gzopen($filename, "w");
-   gzwrite($h, "This is a file in working dir");
-   gzclose($h);
-
-   //should still read dir1 file
-   $h = gzopen($filename, $mode, true);
-   gzpassthru($h);
-   gzclose($h);
-   echo "\n";
-
-   unlink($firstFile);
-   unlink($secondFile);
-
-   //should read the file in working dir
-   $h = gzopen($filename, $mode, true);
-   gzpassthru($h);
-   gzclose($h);
-   echo "\n";
-
-   // create a file in the script directory
-   $h = gzopen($scriptFile, "w");
-   gzwrite($h, "This is a file in script dir");
-   gzclose($h);
-
-   //should read the file in script dir
-   $h = gzopen($filename, $mode, true);
-   gzpassthru($h);
-   gzclose($h);
-   echo "\n";
-
-   //cleanup
-   unlink($filename);
-   unlink($scriptFile);
-
+    global $scriptFile, $secondFile, $firstFile, $filename;
+
+    // create a file in the middle directory
+    $h = gzopen($secondFile, "w");
+    gzwrite($h, "This is a file in dir2");
+    gzclose($h);
+
+    echo "\n** testing with mode=$mode **\n";
+    // should read dir2 file
+    $h = gzopen($filename, $mode, true);
+    if ($h) {
+        gzpassthru($h);
+        gzclose($h);
+        echo "\n";
+    }
+
+    //create a file in dir1
+    $h = gzopen($firstFile, "w");
+    gzwrite($h, "This is a file in dir1");
+    gzclose($h);
+
+    //should now read dir1 file
+    $h = gzopen($filename, $mode, true);
+    if ($h) {
+        gzpassthru($h);
+        gzclose($h);
+        echo "\n";
+    }
+
+    // create a file in working directory
+    $h = gzopen($filename, "w");
+    gzwrite($h, "This is a file in working dir");
+    gzclose($h);
+
+    //should still read dir1 file
+    $h = gzopen($filename, $mode, true);
+    if ($h) {
+        gzpassthru($h);
+        gzclose($h);
+        echo "\n";
+    }
+
+    unlink($firstFile);
+    unlink($secondFile);
+
+    //should read the file in working dir
+    $h = gzopen($filename, $mode, true);
+    if ($h) {
+        gzpassthru($h);
+        gzclose($h);
+        echo "\n";
+    }
+
+    // create a file in the script directory
+    $h = gzopen($scriptFile, "w");
+    gzwrite($h, "This is a file in script dir");
+    gzclose($h);
+
+    //should read the file in script dir
+    $h = gzopen($filename, $mode, true);
+    if ($h) {
+        gzpassthru($h);
+        gzclose($h);
+        echo "\n";
+    }
+
+    //cleanup
+    unlink($filename);
+    unlink($scriptFile);
 }
 
 ?>
@@ -119,39 +128,14 @@ This is a file in script dir
 
 Warning: gzopen(): cannot open a zlib stream for reading and writing at the same time! in %s on line %d
 
-Warning: gzpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: gzclose() expects parameter 1 to be resource, bool given in %s on line %d
-
-
 Warning: gzopen(): cannot open a zlib stream for reading and writing at the same time! in %s on line %d
 
-Warning: gzpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: gzclose() expects parameter 1 to be resource, bool given in %s on line %d
-
-
 Warning: gzopen(): cannot open a zlib stream for reading and writing at the same time! in %s on line %d
 
-Warning: gzpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: gzclose() expects parameter 1 to be resource, bool given in %s on line %d
-
-
 Warning: gzopen(): cannot open a zlib stream for reading and writing at the same time! in %s on line %d
 
-Warning: gzpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: gzclose() expects parameter 1 to be resource, bool given in %s on line %d
-
-
 Warning: gzopen(): cannot open a zlib stream for reading and writing at the same time! in %s on line %d
 
-Warning: gzpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-
-Warning: gzclose() expects parameter 1 to be resource, bool given in %s on line %d
-
-
 ** testing with mode=rt **
 This is a file in dir2
 This is a file in dir1
index f200951d4c9ff6c3bd6514b0b03cc8177f32143a..8683a6c829b4e6b702c5b0c55a52c3e317b9c81a 100644 (file)
@@ -16,18 +16,8 @@ if (!extension_loaded("zlib")) {
 
 echo "*** Testing gzuncompress() : error conditions ***\n";
 
-// Zero arguments
-echo "\n-- Testing gzuncompress() function with Zero arguments --\n";
-var_dump( gzuncompress() );
-
-//Test gzuncompress with one more than the expected number of arguments
-echo "\n-- Testing gzuncompress() function with more than expected no. of arguments --\n";
-$data = 'string_val';
-$length = 10;
-$extra_arg = 10;
-var_dump( gzuncompress($data, $length, $extra_arg) );
-
 echo "\n-- Testing with a buffer that is too small --\n";
+$data = 'string_val';
 $short_len = strlen($data) - 1;
 $compressed = gzcompress($data);
 
@@ -36,32 +26,11 @@ var_dump(gzuncompress($compressed, $short_len));
 echo "\n-- Testing with incorrect arguments --\n";
 var_dump(gzuncompress(123));
 
-class Tester {
-    function Hello() {
-        echo "Hello\n";
-    }
-}
-
-$testclass = new Tester();
-var_dump(gzuncompress($testclass));
-
-var_dump(gzuncompress($compressed, "this is not a number\n"));
-
 ?>
 ===DONE===
 --EXPECTF--
 *** Testing gzuncompress() : error conditions ***
 
--- Testing gzuncompress() function with Zero arguments --
-
-Warning: gzuncompress() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing gzuncompress() function with more than expected no. of arguments --
-
-Warning: gzuncompress() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
 -- Testing with a buffer that is too small --
 
 Warning: gzuncompress(): insufficient memory in %s on line %d
@@ -71,10 +40,4 @@ bool(false)
 
 Warning: gzuncompress(): data error in %s on line %d
 bool(false)
-
-Warning: gzuncompress() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: gzuncompress() expects parameter 2 to be int, string given in %s on line %d
-NULL
 ===DONE===
index 58773e61d34ba4748f136ff2b9bc48c0c3b14a8d..504f795aec65bed200a86b1ad8d01a2b5a5c0986 100644 (file)
@@ -8,12 +8,8 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-var_dump(inflate_init());
 var_dump(inflate_init(42));
 ?>
 --EXPECTF--
-Warning: inflate_init() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
 Warning: inflate_init(): encoding mode must be ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
 bool(false)
diff --git a/ext/zlib/tests/readgzfile_variation10.phpt b/ext/zlib/tests/readgzfile_variation10.phpt
deleted file mode 100644 (file)
index 004a077..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---TEST--
-Test function readgzfile() by substituting argument 2 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
-if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
-?>
---FILE--
-<?php
-
-
-$filename = dirname(__FILE__)."/004.txt.gz";
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation = array(
-  'unset var' => @$unset_var,
-  'undefined var' => @$undefined_var,
-  'empty string DQ' => "",
-  'empty string SQ' => '',
-  'uppercase NULL' => NULL,
-  'lowercase null' => null,
-  );
-
-
-foreach ( $variation as $var ) {
-  var_dump(readgzfile( $filename, $var  ) );
-}
-?>
-===DONE===
---EXPECTF--
-When you're taught through feelings
-Destiny flying high above
-all I know is that you can realize it
-Destiny who cares
-as it turns around
-and I know that it descends down on me
-int(176)
-When you're taught through feelings
-Destiny flying high above
-all I know is that you can realize it
-Destiny who cares
-as it turns around
-and I know that it descends down on me
-int(176)
-
-Warning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
-NULL
-When you're taught through feelings
-Destiny flying high above
-all I know is that you can realize it
-Destiny who cares
-as it turns around
-and I know that it descends down on me
-int(176)
-When you're taught through feelings
-Destiny flying high above
-all I know is that you can realize it
-Destiny who cares
-as it turns around
-and I know that it descends down on me
-int(176)
-===DONE===
index 6ce810c836ec12f8fc41e797a01074a74c5d09bb..c69eaa458ce4b0a0dfee57b4b71f349ee6560b0b 100644 (file)
@@ -20,12 +20,15 @@ $o = new test;
 
 $o->func();
 
-call_user_func(array($o, 'test_base::func'));
+try {
+    call_user_func(array($o, 'test_base::func'));
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 
 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 test::func()
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, cannot call abstract method test_base::func() in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, cannot call abstract method test_base::func()
 ===DONE===
index 4fc41c85f5a3c08e27fda86f7fe2fd1f9703ca38..c5b32debae17c709aaeb312dc113e2452a6664d3 100644 (file)
@@ -3,12 +3,15 @@ Ensure callback methods in unknown classes trigger autoload.
 --FILE--
 <?php
 spl_autoload_register(function ($name) {
-  echo "In autoload: ";
-  var_dump($name);
+    echo "In autoload: ";
+    var_dump($name);
 });
-call_user_func("UndefC::test");
+try {
+    call_user_func("UndefC::test");
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
+--EXPECT--
 In autoload: string(6) "UndefC"
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found
index ba44806bfec86ac8a240e25a022a2f9f5a9bc5b2..4e227a1075c10fc1f2bb40fe44685bfcce893206 100644 (file)
@@ -2,27 +2,30 @@
 Bug #27504 (call_user_func_array allows calling of private/protected methods)
 --FILE--
 <?php
-       class foo {
-               function __construct () {
-                       $this->bar('1');
-               }
-               private function bar ( $param ) {
-                       echo 'Called function foo:bar('.$param.')'."\n";
-               }
-       }
+class foo {
+    function __construct () {
+        $this->bar('1');
+    }
+    private function bar ( $param ) {
+        echo 'Called function foo:bar('.$param.')'."\n";
+    }
+}
 
-       $foo = new foo();
+$foo = new foo();
 
-       call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );
+try {
+    call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
+try {
+    $foo->bar('3');
+} catch (Error $e) {
+    echo $e->getMessage(), "\n";
+}
 
-       $foo->bar('3');
 ?>
---EXPECTF--
+--EXPECT--
 Called function foo:bar(1)
-
-Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar() in %s on line %d
-
-Fatal error: Uncaught Error: Call to private method foo::bar() from context '' in %s:%d
-Stack trace:
-#0 {main}
-  thrown in %s on line %d
+call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar()
+Call to private method foo::bar() from context ''
index 741b6604c0d373d67afef2dc9d78c8dddea83107..bd1fa5b4c5c3cf565f87003fdd0436f03bde5cec 100644 (file)
@@ -6,9 +6,6 @@ func_get_arg test
 function foo($a)
 {
    $a=5;
-   echo func_get_arg();
-   echo func_get_arg(2,2);
-   echo func_get_arg("hello");
    echo func_get_arg(-1);
    echo func_get_arg(2);
 }
@@ -16,12 +13,6 @@ foo(2);
 echo "\n";
 ?>
 --EXPECTF--
-Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: func_get_arg() expects parameter 1 to be int, string given in %s on line %d
-
 Warning: func_get_arg():  The argument number should be >= 0 in %s on line %d
 
 Warning: func_get_arg():  Argument 2 not passed to function in %s on line %d
index 09534270f36778033b729428c2b7cf6d89900491..bc46f2ae580c175af3e41a18133a74af0f4902ee 100644 (file)
@@ -4,19 +4,12 @@ output buffering - failure
 <?php
 ob_start("str_rot13");
 echo "foo\n";
-// str_rot13 expects 1 param and returns NULL when passed 2 params.
-// It is invoked with 2 params when used as an OB callback.
-// Therefore, there will be no data in the buffer. This is expected: see bug 46900.
-ob_end_flush();
-
-// Show the error.
-print_r(error_get_last());
+try {
+    ob_end_flush();
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ?>
---EXPECTF--
-Array
-(
-    [type] => 2
-    [message] => str_rot13() expects exactly 1 parameter, 2 given
-    [file] => %s
-    [line] => 7
-)
+--EXPECT--
+foo
+str_rot13() expects exactly 1 parameter, 2 given
index 2acdb40d0a09daf2a8f84b0a8828c62550919799..2bc08687d77fdbcfc14e8aa946465bd61234c2c3 100644 (file)
@@ -3,20 +3,13 @@ output buffering - failure
 --FILE--
 <?php
 ob_start("str_rot13", 1);
-echo "foo\n";
-// str_rot13 expects 1 param and returns NULL when passed 2 params.
-// It is invoked with 2 params when used as an OB callback.
-// Therefore, there will be no data in the buffer. This is expected: see bug 46900.
+try {
+    echo "foo\n";
+} catch (TypeError $e) {
+    echo $e->getMessage(), "\n";
+}
 ob_end_flush();
-
-// Show the error.
-print_r(error_get_last());
 ?>
---EXPECTF--
-Array
-(
-    [type] => 2
-    [message] => str_rot13() expects exactly 1 parameter, 2 given
-    [file] => %s
-    [line] => 7
-)
+--EXPECT--
+foo
+str_rot13() expects exactly 1 parameter, 2 given
index 29288e2028e463d6e9494ed1cfd011a7e0aaf60a..83b3a4186d4ce0023694ff520bfbec1230e89c29 100644 (file)
@@ -16,38 +16,14 @@ $arg_2 = 0;
 $arg_3 = false;
 $extra_arg = 1;
 
-echo "\n- Too many arguments\n";
-var_dump(ob_start($arg_1, $arg_2, $arg_3, $extra_arg));
-
-echo "\n- Arg 1 wrong type\n";
+echo "\nArg 1 wrong type\n";
 var_dump(ob_start(1.5));
 
-echo "\n- Arg 2 wrong type\n";
-var_dump(ob_start("justPrint", "this should be an int"));
-
-echo "\n- Arg 3 wrong type\n";
-var_dump(ob_start("justPrint", 0, "this should be a bool"));
-
 ?>
 --EXPECTF--
-- Too many arguments
-
-Warning: ob_start() expects at most 3 parameters, 4 given in %s on line 17
-NULL
-
-- Arg 1 wrong type
+Arg 1 wrong type
 
-Warning: ob_start(): no array or string given in %s on line 20
+Warning: ob_start(): no array or string given in %s on line 17
 
-Notice: ob_start(): failed to create buffer in %s on line 20
+Notice: ob_start(): failed to create buffer in %s on line 17
 bool(false)
-
-- Arg 2 wrong type
-
-Warning: ob_start() expects parameter 2 to be int, string given in %s on line 23
-NULL
-
-- Arg 3 wrong type
-
-Warning: ob_start() expects parameter 3 to be int, string given in %s on line 26
-NULL
index 4b7f39986f4af6de2ae304e99790abf37471cca9..9700fd98f15f3d0e828c8b9966caffcd30b83bca 100644 (file)
@@ -12,7 +12,6 @@ function testToStdOut()
         'STDERR (constant)'             => STDERR,
         'STDERR (fopen)'                => fopen('php://stderr', 'wb'),
         'STDERR (php://fd/2)'           => fopen('php://fd/2', 'wb'),
-        'Not a stream'                  => 'foo',
         'Invalid stream (php://temp)'   => fopen('php://temp', 'wb'),
         'Invalid stream (php://input)'  => fopen('php://input', 'wb'),
         'Invalid stream (php://memory)' => fopen('php://memory', 'wb'),
index b071862c93a99387749afd2236130a753aa34f4c..614d9205af9c859664ed9a69ba361874373ac8af 100644 (file)
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(true)
 STDERR (constant): bool(false)
 STDERR (fopen): bool(false)
 STDERR (php://fd/2): bool(false)
-Not a stream: 
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
 Invalid stream (php://temp): bool(false)
 Invalid stream (php://input): bool(false)
 Invalid stream (php://memory): bool(false)
index fac84efb57e3e5a47a035cc506aa86a85ba4412f..1b3de7db8d55cdfb15878b505598038e9919b5bd 100644 (file)
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(true)
 STDERR (constant): bool(false)
 STDERR (fopen): bool(false)
 STDERR (php://fd/2): bool(false)
-Not a stream: 
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
 Invalid stream (php://temp): bool(false)
 Invalid stream (php://input): bool(false)
 Invalid stream (php://memory): bool(false)
index 56c49f70a8e86774a1c8815f59da6174ec5bc52e..b83c2d219988666e11104c9c320754100fd5e542 100644 (file)
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
 STDERR (constant): bool(false)
 STDERR (fopen): bool(false)
 STDERR (php://fd/2): bool(false)
-Not a stream: 
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
 Invalid stream (php://temp): bool(false)
 Invalid stream (php://input): bool(false)
 Invalid stream (php://memory): bool(false)
index 70f2c030f4f6e885ff7d1cba7f2f8711016fe254..f047eff297c71ee1bcf98bf5c7ecbb65c0e370d4 100644 (file)
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
 STDERR (constant): bool(true)
 STDERR (fopen): bool(true)
 STDERR (php://fd/2): bool(true)
-Not a stream: 
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
 Invalid stream (php://temp): bool(false)
 Invalid stream (php://input): bool(false)
 Invalid stream (php://memory): bool(false)
index 4bd06d124d7abfc11689803e6edf40bd61775e3d..c0003d85490cc703e4b60db5395e34ba0abb38b6 100644 (file)
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
 STDERR (constant): bool(false)
 STDERR (fopen): bool(false)
 STDERR (php://fd/2): bool(false)
-Not a stream: 
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
 Invalid stream (php://temp): bool(false)
 Invalid stream (php://input): bool(false)
 Invalid stream (php://memory): bool(false)
index 14e1fb8607b92e1754982c09df4e9a80ca1fd0ab..442a603c304058a909dfe30d8b149fca7cf88330 100644 (file)
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
 STDERR (constant): bool(true)
 STDERR (fopen): bool(true)
 STDERR (php://fd/2): bool(true)
-Not a stream: 
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
 Invalid stream (php://temp): bool(false)
 Invalid stream (php://input): bool(false)
 Invalid stream (php://memory): bool(false)