summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/tests/011.phpt7
-rw-r--r--Zend/tests/012.phpt9
-rw-r--r--Zend/tests/013.phpt9
-rw-r--r--Zend/tests/014.phpt10
-rw-r--r--Zend/tests/015.phpt8
-rw-r--r--Zend/tests/017.phpt23
-rw-r--r--Zend/tests/018.phpt13
-rw-r--r--Zend/tests/020.phpt8
-rw-r--r--Zend/tests/bug31720.phpt9
-rw-r--r--Zend/tests/bug45186.phpt11
-rw-r--r--Zend/tests/bug45186_2.phpt20
-rw-r--r--Zend/tests/bug46106.phpt7
-rw-r--r--Zend/tests/bug51827.phpt6
-rw-r--r--Zend/tests/bug70895.phpt28
-rw-r--r--Zend/tests/bug70898.phpt26
-rw-r--r--Zend/tests/bug73338.phpt5
-rw-r--r--Zend/tests/call_user_func_001.phpt20
-rw-r--r--Zend/tests/call_user_func_002.phpt38
-rw-r--r--Zend/tests/class_exists_002.phpt6
-rw-r--r--Zend/tests/closure_040.phpt9
-rw-r--r--Zend/tests/error_reporting10.phpt1
-rw-r--r--Zend/tests/exception_handler_004.phpt6
-rw-r--r--Zend/tests/function_arguments/argument_count_incorrect_internal.phpt13
-rw-r--r--Zend/tests/interface_exists_001.phpt6
-rw-r--r--Zend/tests/methods-on-non-objects-call-user-func.phpt15
-rw-r--r--Zend/tests/trait_exists_001.phpt6
-rw-r--r--Zend/tests/unexpected_ref_bug.phpt15
-rw-r--r--ext/bz2/tests/001.phpt4
-rw-r--r--ext/bz2/tests/003-mb.phpt7
-rw-r--r--ext/bz2/tests/003.phpt7
-rw-r--r--ext/bz2/tests/005.phpt11
-rw-r--r--ext/calendar/tests/jdtomonthname.phpt23
-rw-r--r--ext/curl/tests/curl_setopt_error.phpt32
-rw-r--r--ext/date/tests/005.phpt9
-rw-r--r--ext/date/tests/006.phpt5
-rw-r--r--ext/date/tests/007.phpt3
-rw-r--r--ext/date/tests/008.phpt3
-rw-r--r--ext/date/tests/009.phpt9
-rw-r--r--ext/date/tests/009_win32.phpt9
-rw-r--r--ext/date/tests/011.phpt5
-rw-r--r--ext/date/tests/012.phpt13
-rw-r--r--ext/date/tests/013.phpt12
-rw-r--r--ext/date/tests/014.phpt4
-rw-r--r--ext/date/tests/68062.phpt12
-rw-r--r--ext/date/tests/DateTimeImmutable_createFromMutable.phpt13
-rw-r--r--ext/date/tests/DateTime_createFromImmutable.phpt11
-rw-r--r--ext/date/tests/bug36988.phpt10
-rw-r--r--ext/date/tests/bug52062.phpt9
-rw-r--r--ext/date/tests/bug70245.phpt9
-rw-r--r--ext/date/tests/date_default_timezone_set_error.phpt17
-rw-r--r--ext/date/tests/date_parse_001.phpt4
-rw-r--r--ext/date/tests/date_parse_error.phpt18
-rw-r--r--ext/date/tests/date_sunrise_variation9.phpt61
-rw-r--r--ext/date/tests/date_sunset_variation9.phpt61
-rw-r--r--ext/date/tests/getdate_variation7.phpt37
-rw-r--r--ext/date/tests/gmdate_variation14.phpt40
-rw-r--r--ext/date/tests/gmmktime_basic.phpt6
-rw-r--r--ext/date/tests/idate_variation3.phpt41
-rw-r--r--ext/date/tests/localtime_variation3.phpt50
-rw-r--r--ext/date/tests/microtime_error.phpt26
-rw-r--r--ext/date/tests/mktime_error.phpt20
-rw-r--r--ext/date/tests/strftime_variation23.phpt42
-rw-r--r--ext/date/tests/timezone_offset_get_error.phpt40
-rw-r--r--ext/dba/tests/dba011.phpt4
-rw-r--r--ext/dba/tests/dba_handlers.phpt11
-rw-r--r--ext/dba/tests/dba_optimize.phpt8
-rw-r--r--ext/dba/tests/dba_split.phpt3
-rw-r--r--ext/dba/tests/dba_sync.phpt8
-rw-r--r--ext/exif/tests/exif_imagetype_error.phpt17
-rw-r--r--ext/fileinfo/tests/bug71527-mb.phpt5
-rw-r--r--ext/fileinfo/tests/bug71527.phpt5
-rw-r--r--ext/fileinfo/tests/finfo_close_error.phpt21
-rw-r--r--ext/fileinfo/tests/finfo_open_001.phpt10
-rw-r--r--ext/fileinfo/tests/finfo_open_error.phpt27
-rw-r--r--ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt8
-rw-r--r--ext/fileinfo/tests/finfo_set_flags_basic.phpt8
-rw-r--r--ext/filter/tests/007.phpt27
-rw-r--r--ext/filter/tests/008.phpt4
-rw-r--r--ext/filter/tests/009.phpt10
-rw-r--r--ext/filter/tests/010.phpt4
-rw-r--r--ext/filter/tests/011.phpt18
-rw-r--r--ext/filter/tests/039.phpt4
-rw-r--r--ext/filter/tests/040.phpt13
-rw-r--r--ext/ftp/tests/004.phpt58
-rw-r--r--ext/ftp/tests/006.phpt108
-rw-r--r--ext/ftp/tests/ftp_get_basic.phpt6
-rw-r--r--ext/ftp/tests/ftp_ssl_connect_error.phpt20
-rw-r--r--ext/gd/tests/imagecolorallocatealpha_error1.phpt10
-rw-r--r--ext/gd/tests/imagecolorstotal_error.phpt19
-rw-r--r--ext/gd/tests/imagecreatetruecolor_error2.phpt6
-rw-r--r--ext/gd/tests/imagefilter_error1.phpt11
-rw-r--r--ext/gd/tests/imagegd2_nullbyte_injection.phpt11
-rw-r--r--ext/gd/tests/imagegd_nullbyte_injection.phpt11
-rw-r--r--ext/gd/tests/imageistruecolor_error1.phpt8
-rw-r--r--ext/gd/tests/imagesetthickness_error1.phpt7
-rw-r--r--ext/gd/tests/imagetruecolortopalette_error1.phpt10
-rw-r--r--ext/gd/tests/imagetruecolortopalette_error3.phpt12
-rw-r--r--ext/gd/tests/lines.phpt5
-rw-r--r--ext/gettext/tests/dcngettext.phpt5
-rw-r--r--ext/gmp/tests/gmp_abs.phpt8
-rw-r--r--ext/gmp/tests/gmp_and.phpt8
-rw-r--r--ext/gmp/tests/gmp_clrbit.phpt18
-rw-r--r--ext/gmp/tests/gmp_cmp.phpt12
-rw-r--r--ext/gmp/tests/gmp_com.phpt6
-rw-r--r--ext/gmp/tests/gmp_div_q.phpt8
-rw-r--r--ext/gmp/tests/gmp_div_qr.phpt8
-rw-r--r--ext/gmp/tests/gmp_div_r.phpt8
-rw-r--r--ext/gmp/tests/gmp_divexact.phpt8
-rw-r--r--ext/gmp/tests/gmp_export.phpt6
-rw-r--r--ext/gmp/tests/gmp_fact.phpt8
-rw-r--r--ext/gmp/tests/gmp_gcd.phpt14
-rw-r--r--ext/gmp/tests/gmp_gcdext.phpt12
-rw-r--r--ext/gmp/tests/gmp_hamdist.phpt8
-rw-r--r--ext/gmp/tests/gmp_import.phpt6
-rw-r--r--ext/gmp/tests/gmp_init.phpt14
-rw-r--r--ext/gmp/tests/gmp_intval.phpt3
-rw-r--r--ext/gmp/tests/gmp_invert.phpt8
-rw-r--r--ext/gmp/tests/gmp_jacobi.phpt13
-rw-r--r--ext/gmp/tests/gmp_legendre.phpt13
-rw-r--r--ext/gmp/tests/gmp_mod.phpt8
-rw-r--r--ext/gmp/tests/gmp_neg.phpt8
-rw-r--r--ext/gmp/tests/gmp_or.phpt8
-rw-r--r--ext/gmp/tests/gmp_perfect_square.phpt4
-rw-r--r--ext/gmp/tests/gmp_popcount.phpt4
-rw-r--r--ext/gmp/tests/gmp_pow.phpt26
-rw-r--r--ext/gmp/tests/gmp_pown.phpt12
-rw-r--r--ext/gmp/tests/gmp_prob_prime.phpt4
-rw-r--r--ext/gmp/tests/gmp_random_bits.phpt4
-rw-r--r--ext/gmp/tests/gmp_random_range.phpt8
-rw-r--r--ext/gmp/tests/gmp_remroot.phpt4
-rw-r--r--ext/gmp/tests/gmp_root.phpt4
-rw-r--r--ext/gmp/tests/gmp_scan0.phpt8
-rw-r--r--ext/gmp/tests/gmp_scan1.phpt8
-rw-r--r--ext/gmp/tests/gmp_setbit.phpt27
-rw-r--r--ext/gmp/tests/gmp_sign.phpt8
-rw-r--r--ext/gmp/tests/gmp_sqrt.phpt8
-rw-r--r--ext/gmp/tests/gmp_sqrtrem.phpt4
-rw-r--r--ext/gmp/tests/gmp_strval.phpt20
-rw-r--r--ext/gmp/tests/gmp_sub.phpt12
-rw-r--r--ext/gmp/tests/gmp_testbit.phpt5
-rw-r--r--ext/gmp/tests/gmp_xor.phpt8
-rw-r--r--ext/hash/tests/hash_error.phpt21
-rw-r--r--ext/hash/tests/hash_file_error.phpt17
-rw-r--r--ext/hash/tests/hash_hkdf_error.phpt20
-rw-r--r--ext/hash/tests/hash_hmac_error.phpt25
-rw-r--r--ext/hash/tests/hash_hmac_file_basic.phpt12
-rw-r--r--ext/hash/tests/hash_hmac_file_error.phpt24
-rw-r--r--ext/hash/tests/hash_init_error.phpt7
-rw-r--r--ext/hash/tests/hash_pbkdf2_error.phpt28
-rw-r--r--ext/intl/tests/breakiter_createCodePointInstance_error.phpt16
-rw-r--r--ext/intl/tests/breakiter_factories_error.phpt40
-rw-r--r--ext/intl/tests/breakiter_first_last_previous_current_error.phpt37
-rw-r--r--ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt49
-rw-r--r--ext/intl/tests/breakiter_getLocale_error.phpt31
-rw-r--r--ext/intl/tests/breakiter_getPartsIterator_error.phpt12
-rw-r--r--ext/intl/tests/breakiter_getText_error.phpt17
-rw-r--r--ext/intl/tests/breakiter_next_error.phpt25
-rw-r--r--ext/intl/tests/breakiter_setText_error.phpt42
-rw-r--r--ext/intl/tests/calendar_add_error.phpt25
-rw-r--r--ext/intl/tests/calendar_before_after_error.phpt29
-rw-r--r--ext/intl/tests/calendar_clear_error.phpt6
-rw-r--r--ext/intl/tests/calendar_createInstance_error.phpt18
-rw-r--r--ext/intl/tests/calendar_equals_error.phpt5
-rw-r--r--ext/intl/tests/calendar_fieldDifference_error.phpt29
-rw-r--r--ext/intl/tests/calendar_fromDateTime_error.phpt23
-rw-r--r--ext/intl/tests/calendar_getAvailableLocales_error.phpt22
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_error.phpt18
-rw-r--r--ext/intl/tests/calendar_getErrorCode_error.phpt9
-rw-r--r--ext/intl/tests/calendar_getErrorMessage_error.phpt9
-rw-r--r--ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt22
-rw-r--r--ext/intl/tests/calendar_getLocale_error.phpt25
-rw-r--r--ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getNow_error.phpt22
-rw-r--r--ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt28
-rw-r--r--ext/intl/tests/calendar_getTimeZone_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getTime_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getType_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_error.phpt19
-rw-r--r--ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt25
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt57
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt30
-rw-r--r--ext/intl/tests/calendar_inDaylightTime_error.phpt15
-rw-r--r--ext/intl/tests/calendar_isEquivalentTo_error.phpt10
-rw-r--r--ext/intl/tests/calendar_isLenient_error.phpt15
-rw-r--r--ext/intl/tests/calendar_isSet_error.phpt18
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt21
-rw-r--r--ext/intl/tests/calendar_roll_error.phpt14
-rw-r--r--ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt12
-rw-r--r--ext/intl/tests/calendar_setLenient_error.phpt27
-rw-r--r--ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt12
-rw-r--r--ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt52
-rw-r--r--ext/intl/tests/calendar_setTimeZone_error.phpt15
-rw-r--r--ext/intl/tests/calendar_setTime_error.phpt21
-rw-r--r--ext/intl/tests/calendar_set_error.phpt10
-rw-r--r--ext/intl/tests/calendar_toDateTime_error.phpt15
-rw-r--r--ext/intl/tests/cpbi_getLastCodePoint_error.phpt17
-rw-r--r--ext/intl/tests/dateformat_formatObject_error.phpt12
-rw-r--r--ext/intl/tests/dateformat_getCalendarObject_error.phpt42
-rw-r--r--ext/intl/tests/dateformat_getTimeZone_error.phpt42
-rw-r--r--ext/intl/tests/dateformat_setTimeZone_error.phpt24
-rw-r--r--ext/intl/tests/formatter_fail.phpt54
-rw-r--r--ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt16
-rw-r--r--ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt34
-rw-r--r--ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt45
-rw-r--r--ext/intl/tests/idn_uts46_errors.phpt17
-rw-r--r--ext/intl/tests/intl_get_error_code.phpt2
-rw-r--r--ext/intl/tests/intl_get_error_message.phpt4
-rw-r--r--ext/intl/tests/locale_accept.phpt7
-rw-r--r--ext/intl/tests/msgfmt_fail2.phpt82
-rw-r--r--ext/intl/tests/timezone_countEquivalentIDs_error.phpt18
-rw-r--r--ext/intl/tests/timezone_createDefault_error.phpt16
-rw-r--r--ext/intl/tests/timezone_createEnumeration_error.phpt7
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt24
-rw-r--r--ext/intl/tests/timezone_createTimeZone_error.phpt19
-rw-r--r--ext/intl/tests/timezone_fromDateTimeZone_error.phpt32
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_error.phpt13
-rw-r--r--ext/intl/tests/timezone_getDSTSavings_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getDisplayName_error.phpt24
-rw-r--r--ext/intl/tests/timezone_getEquivalentID_error.phpt19
-rw-r--r--ext/intl/tests/timezone_getErrorCode_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getErrorMessage_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getGMT_error.phpt16
-rw-r--r--ext/intl/tests/timezone_getID_error.phpt8
-rw-r--r--ext/intl/tests/timezone_getOffset_error.phpt13
-rw-r--r--ext/intl/tests/timezone_getRawOffset_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getRegion_error.phpt19
-rw-r--r--ext/intl/tests/timezone_getTZDataVersion_error.phpt16
-rw-r--r--ext/intl/tests/timezone_getUnknown_error.phpt25
-rw-r--r--ext/intl/tests/timezone_toDateTimeZone_error.phpt12
-rw-r--r--ext/intl/tests/timezone_useDaylightTime_error.phpt8
-rw-r--r--ext/intl/tests/transliterator_create_from_rule_error.phpt16
-rw-r--r--ext/intl/tests/transliterator_create_inverse_error.phpt9
-rw-r--r--ext/intl/tests/transliterator_get_error_code_error.phpt14
-rw-r--r--ext/intl/tests/transliterator_get_error_message_error.phpt14
-rw-r--r--ext/intl/tests/transliterator_list_ids_error.phpt17
-rw-r--r--ext/intl/tests/transliterator_transliterate_error.phpt32
-rw-r--r--ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt8
-rw-r--r--ext/json/tests/001.phpt3
-rw-r--r--ext/json/tests/json_decode_error.phpt17
-rw-r--r--ext/json/tests/json_last_error_error.phpt17
-rw-r--r--ext/json/tests/json_last_error_msg_error.phpt15
-rw-r--r--ext/libxml/tests/001.phpt6
-rw-r--r--ext/libxml/tests/004.phpt26
-rw-r--r--ext/libxml/tests/bug63389.phpt10
-rw-r--r--ext/libxml/tests/libxml_set_external_entity_loader_error1.phpt12
-rw-r--r--ext/mbstring/tests/mb_convert_encoding.phpt8
-rw-r--r--ext/mbstring/tests/mb_detect_encoding.phpt8
-rw-r--r--ext/mbstring/tests/mb_encoding_aliases.phpt2
-rw-r--r--ext/mbstring/tests/mb_ereg1.phpt18
-rw-r--r--ext/mbstring/tests/mb_ereg2.phpt13
-rw-r--r--ext/mbstring/tests/mb_ereg_variation1.phpt179
-rw-r--r--ext/mbstring/tests/mb_http_output.phpt18
-rw-r--r--ext/mbstring/tests/mb_internal_encoding.phpt18
-rw-r--r--ext/mbstring/tests/mb_stripos.phpt25
-rw-r--r--ext/mbstring/tests/mb_strlen.phpt14
-rw-r--r--ext/mbstring/tests/mb_strpos.phpt25
-rw-r--r--ext/mysqli/tests/057.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_affected_rows.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_autocommit.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_begin_transaction.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_change_user.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_character_set_name.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_character_set_name_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_close.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_close_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_commit.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_connect.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_data_seek.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_data_seek_oo.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_debug.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_dump_debug_info.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_errno.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_error.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_error_unicode.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_fetch_all.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_direct.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_oo.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_fields.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_lengths.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object.phpt11
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_oo.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_fetch_row.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_field_count.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_field_seek.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_field_tell.phpt17
-rw-r--r--ext/mysqli/tests/mysqli_free_result.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_get_charset.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_get_client_stats.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_get_connection_stats.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_get_host_info.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_get_proto_info.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_get_server_info.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_get_server_version.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_info.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_insert_id.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_kill.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_max_links.phpt28
-rw-r--r--ext/mysqli/tests/mysqli_more_results.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_multi_query.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_next_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_num_fields.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_num_rows.phpt30
-rw-r--r--ext/mysqli/tests/mysqli_options.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_ping.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_poll.phpt23
-rw-r--r--ext/mysqli/tests/mysqli_prepare.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_query.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_query_unicode.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_real_connect.phpt27
-rw-r--r--ext/mysqli/tests/mysqli_real_escape_string.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_real_query.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_reap_async_query.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_release_savepoint.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_report.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_rollback.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_savepoint.phpt15
-rw-r--r--ext/mysqli/tests/mysqli_select_db.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_set_charset.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_set_opt.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_sqlstate.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_ssl_set.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_stat.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_affected_rows.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_get.phpt15
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_set.phpt17
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_result.phpt20
-rw-r--r--ext/mysqli/tests/mysqli_stmt_close.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_data_seek.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_errno.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_error.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_execute.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_fetch.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_field_count.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_free_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result2.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_warnings.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_init.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_insert_id.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_stmt_num_rows.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_param_count.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_prepare.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_reset.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_result_metadata.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_send_long_data.phpt24
-rw-r--r--ext/mysqli/tests/mysqli_stmt_sqlstate.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_store_result.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_store_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_thread_id.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_use_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_warning_count.phpt12
-rw-r--r--ext/odbc/tests/odbc_free_result_001.phpt4
-rw-r--r--ext/opcache/tests/bug70207.phpt2
-rw-r--r--ext/openssl/tests/bug38255.phpt20
-rw-r--r--ext/openssl/tests/bug38261.phpt4
-rw-r--r--ext/openssl/tests/openssl_csr_export_bacis.phpt14
-rw-r--r--ext/openssl/tests/openssl_csr_export_to_file_basic.phpt14
-rw-r--r--ext/openssl/tests/openssl_csr_new_basic.phpt9
-rw-r--r--ext/openssl/tests/openssl_csr_sign_basic.phpt12
-rw-r--r--ext/openssl/tests/openssl_decrypt_error.phpt12
-rw-r--r--ext/openssl/tests/openssl_encrypt_error.phpt24
-rw-r--r--ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt10
-rw-r--r--ext/openssl/tests/openssl_pkcs7_read_basic.phpt9
-rw-r--r--ext/openssl/tests/openssl_pkcs7_sign_basic.phpt8
-rw-r--r--ext/openssl/tests/openssl_pkey_new_error.phpt28
-rw-r--r--ext/openssl/tests/openssl_seal_basic.phpt12
-rw-r--r--ext/openssl/tests/openssl_sign_basic.phpt4
-rw-r--r--ext/openssl/tests/openssl_x509_fingerprint_basic.phpt7
-rw-r--r--ext/openssl/tests/openssl_x509_free_basic.phpt3
-rw-r--r--ext/pcntl/tests/pcntl_alarm.phpt3
-rw-r--r--ext/pcntl/tests/pcntl_exec_3.phpt4
-rw-r--r--ext/pcntl/tests/pcntl_signal.phpt4
-rw-r--r--ext/pcntl/tests/pcntl_wait.phpt33
-rw-r--r--ext/pcre/tests/002.phpt18
-rw-r--r--ext/pcre/tests/grep2.phpt10
-rw-r--r--ext/pcre/tests/preg_grep_error1.phpt20
-rw-r--r--ext/pcre/tests/preg_match_all_error1.phpt20
-rw-r--r--ext/pcre/tests/preg_match_all_error2.phpt17
-rw-r--r--ext/pcre/tests/preg_match_error1.phpt20
-rw-r--r--ext/pcre/tests/preg_match_error2.phpt20
-rw-r--r--ext/pcre/tests/preg_replace_callback3.phpt22
-rw-r--r--ext/pcre/tests/preg_replace_callback_array2.phpt33
-rw-r--r--ext/pcre/tests/preg_split_error1.phpt20
-rw-r--r--ext/pcre/tests/split.phpt6
-rw-r--r--ext/pcre/tests/split2.phpt4
-rw-r--r--ext/pdo/tests/bug_44173.phpt8
-rw-r--r--ext/pdo/tests/pdo_drivers_error.phpt15
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt3
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt11
-rw-r--r--ext/pgsql/tests/01createdb.phpt4
-rw-r--r--ext/phar/tests/002.phpt12
-rw-r--r--ext/phar/tests/badparameters.phpt273
-rw-r--r--ext/phar/tests/bug64931/bug64931.phpt5
-rw-r--r--ext/phar/tests/create_path_error.phpt5
-rw-r--r--ext/phar/tests/fgc_edgecases.phpt8
-rw-r--r--ext/phar/tests/fopen.phpt2
-rw-r--r--ext/phar/tests/fopen_edgecases2.phpt8
-rw-r--r--ext/phar/tests/open_for_write_existing_b.phpt9
-rw-r--r--ext/phar/tests/open_for_write_existing_c.phpt9
-rw-r--r--ext/phar/tests/open_for_write_newfile_b.phpt9
-rw-r--r--ext/phar/tests/open_for_write_newfile_c.phpt9
-rw-r--r--ext/phar/tests/opendir_edgecases.phpt8
-rw-r--r--ext/phar/tests/phar_bz2.phpt3
-rw-r--r--ext/phar/tests/phar_decompress.phpt11
-rw-r--r--ext/phar/tests/phar_extract.phpt9
-rw-r--r--ext/phar/tests/phar_isvalidpharfilename.phpt4
-rw-r--r--ext/phar/tests/phar_oo_006.phpt2
-rw-r--r--ext/phar/tests/phar_running.phpt2
-rw-r--r--ext/phar/tests/phar_unlinkarchive.phpt9
-rw-r--r--ext/phar/tests/pharfileinfo_chmod.phpt3
-rw-r--r--ext/phar/tests/pharfileinfo_compression.phpt2
-rw-r--r--ext/phar/tests/pharfileinfo_setmetadata.phpt4
-rw-r--r--ext/phar/tests/readfile_edgecases.phpt2
-rw-r--r--ext/phar/tests/stat2_5.3.phpt5
-rw-r--r--ext/phar/tests/tar/open_for_write_existing_b.phpt9
-rw-r--r--ext/phar/tests/tar/open_for_write_existing_c.phpt9
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile_b.phpt9
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile_c.phpt9
-rw-r--r--ext/phar/tests/zip/open_for_write_existing_b.phpt9
-rw-r--r--ext/phar/tests/zip/open_for_write_existing_c.phpt9
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_b.phpt9
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_c.phpt9
-rw-r--r--ext/posix/tests/posix_errno_error.phpt24
-rw-r--r--ext/posix/tests/posix_getcwd.phpt4
-rw-r--r--ext/posix/tests/posix_getgrgid_error.phpt21
-rw-r--r--ext/posix/tests/posix_getpgid_error.phpt18
-rw-r--r--ext/posix/tests/posix_getpwuid_error.phpt18
-rw-r--r--ext/posix/tests/posix_getsid_error.phpt7
-rw-r--r--ext/posix/tests/posix_initgroups.phpt3
-rw-r--r--ext/posix/tests/posix_kill_error.phpt20
-rw-r--r--ext/posix/tests/posix_seteuid_variation4.phpt46
-rw-r--r--ext/posix/tests/posix_setgid_variation4.phpt46
-rw-r--r--ext/posix/tests/posix_setuid_variation4.phpt46
-rw-r--r--ext/posix/tests/posix_strerror_error.phpt18
-rw-r--r--ext/posix/tests/posix_ttyname_error_wrongparams.phpt3
-rw-r--r--ext/pspell/tests/002.phpt8
-rw-r--r--ext/readline/tests/libedit_callback_handler_install_001.phpt4
-rw-r--r--ext/readline/tests/readline_add_history_001.phpt4
-rw-r--r--ext/readline/tests/readline_callback_handler_install_001.phpt4
-rw-r--r--ext/readline/tests/readline_clear_history_001.phpt4
-rw-r--r--ext/readline/tests/readline_list_history_001.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_constructor_002.phpt17
-rw-r--r--ext/reflection/tests/ReflectionClass_getConstant_error.phpt18
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethod_002.phpt26
-rw-r--r--ext/reflection/tests/ReflectionClass_getParentClass.phpt7
-rw-r--r--ext/reflection/tests/ReflectionClass_getParentClass_001.phpt38
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_002.phpt26
-rw-r--r--ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt19
-rw-r--r--ext/reflection/tests/ReflectionClass_hasConstant_002.phpt18
-rw-r--r--ext/reflection/tests/ReflectionClass_hasMethod_002.phpt18
-rw-r--r--ext/reflection/tests/ReflectionClass_hasProperty_002.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt12
-rw-r--r--ext/reflection/tests/ReflectionClass_isIterateable_001.phpt37
-rw-r--r--ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt14
-rw-r--r--ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt25
-rw-r--r--ext/reflection/tests/ReflectionMethod_006.phpt74
-rw-r--r--ext/reflection/tests/ReflectionMethod_getClosure_error.phpt25
-rw-r--r--ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt10
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt32
-rw-r--r--ext/reflection/tests/ReflectionMethod_invoke_basic.phpt20
-rw-r--r--ext/reflection/tests/ReflectionMethod_invoke_error1.phpt6
-rw-r--r--ext/reflection/tests/ReflectionObject_getName_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt14
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt14
-rw-r--r--ext/reflection/tests/ReflectionProperty_error.phpt33
-rw-r--r--ext/reflection/tests/ReflectionProperty_export_error.phpt10
-rw-r--r--ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt6
-rw-r--r--ext/reflection/tests/ReflectionProperty_getValue_error.phpt30
-rw-r--r--ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt7
-rw-r--r--ext/reflection/tests/ReflectionProperty_setValue_error.phpt59
-rw-r--r--ext/reflection/tests/request38992.phpt21
-rw-r--r--ext/session/tests/session_cache_limiter_error.phpt8
-rw-r--r--ext/session/tests/session_set_save_handler_class_012.phpt22
-rw-r--r--ext/session/tests/session_set_save_handler_class_013.phpt9
-rw-r--r--ext/session/tests/session_set_save_handler_iface_002.phpt11
-rw-r--r--ext/shmop/tests/002.phpt42
-rw-r--r--ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt20
-rw-r--r--ext/simplexml/tests/bug37565.phpt2
-rw-r--r--ext/soap/tests/bug77088.phpt19
-rw-r--r--ext/soap/tests/bugs/bug31422.phpt5
-rw-r--r--ext/sockets/tests/socket_connect_params.phpt11
-rw-r--r--ext/sockets/tests/socket_create_listen_used.phpt3
-rw-r--r--ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt9
-rw-r--r--ext/sockets/tests/socket_create_pair-wrongparams.phpt12
-rw-r--r--ext/sockets/tests/socket_export_stream-2.phpt17
-rw-r--r--ext/sockets/tests/socket_import_stream-2.phpt18
-rw-r--r--ext/sockets/tests/socket_listen-wrongparams.phpt4
-rw-r--r--ext/sockets/tests/socket_read_params.phpt7
-rw-r--r--ext/sockets/tests/socket_select-wrongparams-2.phpt3
-rw-r--r--ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt10
-rw-r--r--ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp-win32.phpt9
-rw-r--r--ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt11
-rw-r--r--ext/sockets/tests/socket_sentto_recvfrom_unix.phpt3
-rw-r--r--ext/sockets/tests/socket_strerror.phpt2
-rw-r--r--ext/spl/tests/SplFileInfo_setFileClass_error.phpt2
-rw-r--r--ext/spl/tests/SplFileInfo_setInfoClass_error.phpt2
-rw-r--r--ext/spl/tests/SplFileObject_seek_error_001.phpt9
-rw-r--r--ext/spl/tests/arrayObject_asort_basic1.phpt10
-rw-r--r--ext/spl/tests/arrayObject_count_basic1.phpt14
-rw-r--r--ext/spl/tests/arrayObject_exchangeArray_basic3.phpt12
-rw-r--r--ext/spl/tests/arrayObject_ksort_basic1.phpt10
-rw-r--r--ext/spl/tests/arrayObject_setIteratorClass_error1.phpt15
-rw-r--r--ext/spl/tests/bug46051.phpt4
-rw-r--r--ext/spl/tests/bug65545.phpt6
-rw-r--r--ext/spl/tests/fileobject_005.phpt12
-rw-r--r--ext/spl/tests/iterator_044.phpt37
-rw-r--r--ext/spl/tests/iterator_045.phpt13
-rw-r--r--ext/spl/tests/iterator_count.phpt10
-rw-r--r--ext/spl/tests/iterator_to_array.phpt9
-rw-r--r--ext/spl/tests/regexIterator_setMode_error.phpt4
-rw-r--r--ext/spl/tests/spl_004.phpt24
-rw-r--r--ext/spl/tests/spl_heap_is_empty_basic.phpt3
-rw-r--r--ext/spl/tests/spl_object_id.phpt8
-rw-r--r--ext/sqlite3/tests/sqlite3_33_reset.phpt4
-rw-r--r--ext/sqlite3/tests/sqlite3_enable_exceptions.phpt4
-rw-r--r--ext/standard/tests/array/005.phpt24
-rw-r--r--ext/standard/tests/array/009.phpt125
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation.phpt13
-rw-r--r--ext/standard/tests/array/array_column_error.phpt32
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_error.phpt28
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation10.phpt22
-rw-r--r--ext/standard/tests/array/array_fill_error.phpt32
-rw-r--r--ext/standard/tests/array/array_fill_keys.phpt5
-rw-r--r--ext/standard/tests/array/array_fill_keys_variation3.phpt20
-rw-r--r--ext/standard/tests/array/array_filter.phpt12
-rw-r--r--ext/standard/tests/array/array_filter_variation10.phpt17
-rw-r--r--ext/standard/tests/array/array_filter_variation9.phpt20
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation8.phpt20
-rw-r--r--ext/standard/tests/array/array_key_exists.phpt40
-rw-r--r--ext/standard/tests/array/array_keys_error.phpt27
-rw-r--r--ext/standard/tests/array/array_map_error.phpt13
-rw-r--r--ext/standard/tests/array/array_map_object1.phpt26
-rw-r--r--ext/standard/tests/array/array_map_object2.phpt20
-rw-r--r--ext/standard/tests/array/array_map_object3.phpt20
-rw-r--r--ext/standard/tests/array/array_map_variation12.phpt31
-rw-r--r--ext/standard/tests/array/array_map_variation14.phpt20
-rw-r--r--ext/standard/tests/array/array_map_variation15.phpt12
-rw-r--r--ext/standard/tests/array/array_map_variation16.phpt40
-rw-r--r--ext/standard/tests/array/array_map_variation17.phpt70
-rw-r--r--ext/standard/tests/array/array_merge.phpt25
-rw-r--r--ext/standard/tests/array/array_merge_recursive_error.phpt10
-rw-r--r--ext/standard/tests/array/array_multisort_error.phpt9
-rw-r--r--ext/standard/tests/array/array_pad.phpt15
-rw-r--r--ext/standard/tests/array/array_push.phpt22
-rw-r--r--ext/standard/tests/array/array_rand.phpt8
-rw-r--r--ext/standard/tests/array/array_search1.phpt9
-rw-r--r--ext/standard/tests/array/array_search_variation3.phpt20
-rw-r--r--ext/standard/tests/array/array_slice.phpt40
-rw-r--r--ext/standard/tests/array/array_slice_variation1.phpt20
-rw-r--r--ext/standard/tests/array/array_unshift.phpt9
-rw-r--r--ext/standard/tests/array/array_walk.phpt14
-rw-r--r--ext/standard/tests/array/array_walk_closure.phpt16
-rw-r--r--ext/standard/tests/array/array_walk_error2.phpt4
-rw-r--r--ext/standard/tests/array/array_walk_objects.phpt9
-rw-r--r--ext/standard/tests/array/array_walk_rec_objects.phpt9
-rw-r--r--ext/standard/tests/array/array_walk_recursive1.phpt14
-rw-r--r--ext/standard/tests/array/array_walk_recursive_error2.phpt4
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation7.phpt7
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation8.phpt10
-rw-r--r--ext/standard/tests/array/array_walk_variation7.phpt7
-rw-r--r--ext/standard/tests/array/array_walk_variation8.phpt10
-rw-r--r--ext/standard/tests/array/bug35014.phpt5
-rw-r--r--ext/standard/tests/array/bug35014_64bit.phpt5
-rw-r--r--ext/standard/tests/array/bug40191.phpt12
-rw-r--r--ext/standard/tests/array/count_recursive.phpt26
-rw-r--r--ext/standard/tests/array/end.phpt30
-rw-r--r--ext/standard/tests/array/end_64bit.phpt30
-rw-r--r--ext/standard/tests/array/extract_error.phpt26
-rw-r--r--ext/standard/tests/array/in_array_variation3.phpt20
-rw-r--r--ext/standard/tests/array/max.phpt10
-rw-r--r--ext/standard/tests/array/min.phpt10
-rw-r--r--ext/standard/tests/array/range_errors.phpt16
-rw-r--r--ext/standard/tests/array/uasort_variation8.phpt16
-rw-r--r--ext/standard/tests/array/usort_variation8.phpt18
-rw-r--r--ext/standard/tests/assert/assert04.phpt15
-rw-r--r--ext/standard/tests/class_object/property_exists_error.phpt23
-rw-r--r--ext/standard/tests/dir/closedir_error-win32-mb.phpt51
-rw-r--r--ext/standard/tests/dir/scandir_variation3-win32-mb.phpt244
-rw-r--r--ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt17
-rw-r--r--ext/standard/tests/directory/DirectoryClass_error_001.phpt17
-rw-r--r--ext/standard/tests/file/005_error.phpt75
-rw-r--r--ext/standard/tests/file/006_error.phpt34
-rw-r--r--ext/standard/tests/file/006_variation2.phpt66
-rw-r--r--ext/standard/tests/file/007_error.phpt185
-rw-r--r--ext/standard/tests/file/basename-win32.phpt46
-rw-r--r--ext/standard/tests/file/basename.phptbin8212 -> 6843 bytes
-rw-r--r--ext/standard/tests/file/bug39863.phpt17
-rw-r--r--ext/standard/tests/file/chmod_error.phpt23
-rw-r--r--ext/standard/tests/file/copy_error.phpt16
-rw-r--r--ext/standard/tests/file/copy_variation4.phptbin4959 -> 4270 bytes
-rw-r--r--ext/standard/tests/file/disk.phpt9
-rw-r--r--ext/standard/tests/file/disk_free_space_error-win32.phpt18
-rw-r--r--ext/standard/tests/file/disk_free_space_error.phpt18
-rw-r--r--ext/standard/tests/file/disk_free_space_variation.phpt44
-rw-r--r--ext/standard/tests/file/disk_total_space_error-win32.phpt10
-rw-r--r--ext/standard/tests/file/disk_total_space_error.phpt10
-rw-r--r--ext/standard/tests/file/disk_total_space_variation.phpt24
-rw-r--r--ext/standard/tests/file/fgetc_variation2.phpt15
-rw-r--r--ext/standard/tests/file/fgets_error.phpt72
-rw-r--r--ext/standard/tests/file/fgets_variation2.phpt21
-rw-r--r--ext/standard/tests/file/file_error.phpt14
-rw-r--r--ext/standard/tests/file/file_get_contents_error.phpt14
-rw-r--r--ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt22
-rw-r--r--ext/standard/tests/file/file_get_contents_variation8-win32.phpt14
-rw-r--r--ext/standard/tests/file/file_get_contents_variation8.phpt14
-rw-r--r--ext/standard/tests/file/file_put_contents_variation8-win32.phpt28
-rw-r--r--ext/standard/tests/file/file_put_contents_variation8.phptbin2383 -> 2306 bytes
-rw-r--r--ext/standard/tests/file/filegroup_error.phpt10
-rw-r--r--ext/standard/tests/file/filegroup_variation2.phpt6
-rw-r--r--ext/standard/tests/file/filegroup_variation3.phpt14
-rw-r--r--ext/standard/tests/file/fileinode_error.phpt12
-rw-r--r--ext/standard/tests/file/fileinode_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fileinode_variation3.phpt14
-rw-r--r--ext/standard/tests/file/fileowner_error.phpt10
-rw-r--r--ext/standard/tests/file/fileowner_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fileowner_variation3.phpt14
-rw-r--r--ext/standard/tests/file/fileperms_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fileperms_variation3.phpt14
-rw-r--r--ext/standard/tests/file/filesize_error.phpt14
-rw-r--r--ext/standard/tests/file/filetype_error.phpt10
-rw-r--r--ext/standard/tests/file/flock.phpt9
-rw-r--r--ext/standard/tests/file/flock_error.phpt42
-rw-r--r--ext/standard/tests/file/fnmatch_variation.phpt146
-rw-r--r--ext/standard/tests/file/fread_error.phpt80
-rw-r--r--ext/standard/tests/file/fscanf.phpt12
-rw-r--r--ext/standard/tests/file/fscanf_error.phpt16
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_error1.phpt70
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_error2.phpt66
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_error3.phpt66
-rw-r--r--ext/standard/tests/file/ftruncate_error.phpt81
-rw-r--r--ext/standard/tests/file/fwrite.phpt22
-rw-r--r--ext/standard/tests/file/fwrite_error.phpt70
-rw-r--r--ext/standard/tests/file/get_current_user.phpt3
-rw-r--r--ext/standard/tests/file/glob_variation-win32-mb.phpt45
-rw-r--r--ext/standard/tests/file/glob_variation-win32.phpt45
-rw-r--r--ext/standard/tests/file/glob_variation.phpt45
-rw-r--r--ext/standard/tests/file/is_dir_variation3.phpt7
-rw-r--r--ext/standard/tests/file/is_dir_variation4.phpt14
-rw-r--r--ext/standard/tests/file/is_executable_error.phpt13
-rw-r--r--ext/standard/tests/file/is_executable_variation1.phpt14
-rw-r--r--ext/standard/tests/file/is_executable_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_file_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_file_variation4.phpt14
-rw-r--r--ext/standard/tests/file/is_readable_error.phpt12
-rw-r--r--ext/standard/tests/file/is_readable_variation1.phpt18
-rw-r--r--ext/standard/tests/file/is_readable_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_uploaded_file_basic.phpt10
-rw-r--r--ext/standard/tests/file/is_writable_error.phpt24
-rw-r--r--ext/standard/tests/file/is_writable_variation1.phpt36
-rw-r--r--ext/standard/tests/file/is_writable_variation3.phpt7
-rw-r--r--ext/standard/tests/file/lchown_error.phpt23
-rw-r--r--ext/standard/tests/file/lstat_stat_error.phpt29
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_error.phpt36
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_variation2.phpt20
-rw-r--r--ext/standard/tests/file/move_uploaded_file_basic.phpt12
-rw-r--r--ext/standard/tests/file/parse_ini_file_error.phpt9
-rw-r--r--ext/standard/tests/file/pathinfo_variaton.phpt51
-rw-r--r--ext/standard/tests/file/popen_pclose_error.phpt20
-rw-r--r--ext/standard/tests/file/readfile_error.phpt18
-rw-r--r--ext/standard/tests/file/readfile_variation10-win32.phpt14
-rw-r--r--ext/standard/tests/file/readfile_variation10.phptbin1862 -> 1736 bytes
-rw-r--r--ext/standard/tests/file/readlink_realpath_error.phpt23
-rw-r--r--ext/standard/tests/file/readlink_variation1.phpt6
-rw-r--r--ext/standard/tests/file/realpath_error-win32.phpt29
-rw-r--r--ext/standard/tests/file/rename_variation13-win32.phptbin5243 -> 4394 bytes
-rw-r--r--ext/standard/tests/file/rename_variation13.phpt20
-rw-r--r--ext/standard/tests/file/stat_error-win32.phpt16
-rw-r--r--ext/standard/tests/file/stream_002.phpt7
-rw-r--r--ext/standard/tests/file/stream_rfc2397_002.phpt22
-rw-r--r--ext/standard/tests/file/stream_rfc2397_006.phpt13
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt22
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt22
-rw-r--r--ext/standard/tests/file/tempnam_variation3-win32.phpt16
-rw-r--r--ext/standard/tests/file/tempnam_variation3.phpt19
-rw-r--r--ext/standard/tests/file/tempnam_variation7-win32.phpt19
-rw-r--r--ext/standard/tests/file/tempnam_variation7.phpt19
-rw-r--r--ext/standard/tests/file/touch.phpt3
-rw-r--r--ext/standard/tests/file/touch_error.phpt8
-rw-r--r--ext/standard/tests/file/unlink_error-win32-mb.phpt24
-rw-r--r--ext/standard/tests/file/unlink_error-win32.phpt24
-rw-r--r--ext/standard/tests/file/unlink_error.phpt25
-rw-r--r--ext/standard/tests/filters/001.phpt8
-rw-r--r--ext/standard/tests/filters/stream_filter_remove_error.phpt25
-rw-r--r--ext/standard/tests/general_functions/bug41970.phpt24
-rw-r--r--ext/standard/tests/general_functions/callbacks_001.phpt9
-rw-r--r--ext/standard/tests/general_functions/callbacks_002.phpt26
-rw-r--r--ext/standard/tests/general_functions/error_get_last.phpt21
-rw-r--r--ext/standard/tests/general_functions/floatval.phpt26
-rw-r--r--ext/standard/tests/general_functions/get_extension_funcs_basic.phpt4
-rw-r--r--ext/standard/tests/general_functions/get_extension_funcs_error.phpt40
-rw-r--r--ext/standard/tests/general_functions/get_include_path_basic.phpt9
-rw-r--r--ext/standard/tests/general_functions/get_included_files.phpt8
-rw-r--r--ext/standard/tests/general_functions/getrusage.phpt6
-rw-r--r--ext/standard/tests/general_functions/getservbyport_variation1.phpt16
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_error.phpt26
-rw-r--r--ext/standard/tests/general_functions/include_path.phpt22
-rw-r--r--ext/standard/tests/general_functions/intval.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_array.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_bool.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_countable_with_variables.phpt4
-rw-r--r--ext/standard/tests/general_functions/is_float.phpt31
-rw-r--r--ext/standard/tests/general_functions/is_float_64bit.phpt31
-rw-r--r--ext/standard/tests/general_functions/is_int.phpt31
-rw-r--r--ext/standard/tests/general_functions/is_int_64bit.phpt31
-rw-r--r--ext/standard/tests/general_functions/is_null.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_numeric.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_object.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_scalar.phpt19
-rw-r--r--ext/standard/tests/general_functions/is_string.phpt15
-rw-r--r--ext/standard/tests/general_functions/ob_get_flush_error.phpt7
-rw-r--r--ext/standard/tests/general_functions/ob_get_length_basic.phpt6
-rw-r--r--ext/standard/tests/general_functions/parse_ini_file.phpt16
-rw-r--r--ext/standard/tests/general_functions/parse_ini_string_002.phpt8
-rw-r--r--ext/standard/tests/general_functions/php_uname_error.phpt34
-rw-r--r--ext/standard/tests/general_functions/phpcredits.phpt4
-rw-r--r--ext/standard/tests/general_functions/phpcredits2.phpt4
-rw-r--r--ext/standard/tests/general_functions/phpinfo.phpt7
-rw-r--r--ext/standard/tests/general_functions/phpinfo2.phpt7
-rw-r--r--ext/standard/tests/general_functions/print_r.phpt21
-rw-r--r--ext/standard/tests/general_functions/print_r_64bit.phpt21
-rw-r--r--ext/standard/tests/general_functions/rand.phpt24
-rw-r--r--ext/standard/tests/general_functions/sleep_error.phpt18
-rw-r--r--ext/standard/tests/general_functions/strval.phpt15
-rw-r--r--ext/standard/tests/general_functions/sys_getloadavg.phpt3
-rw-r--r--ext/standard/tests/general_functions/usleep_error.phpt18
-rw-r--r--ext/standard/tests/general_functions/var_dump.phpt8
-rw-r--r--ext/standard/tests/general_functions/var_dump_64bit.phpt8
-rw-r--r--ext/standard/tests/general_functions/var_export-locale.phpt16
-rw-r--r--ext/standard/tests/image/image_type_to_extension.phpt16
-rw-r--r--ext/standard/tests/math/acos_variation.phpt4
-rw-r--r--ext/standard/tests/math/acosh_variation.phpt4
-rw-r--r--ext/standard/tests/math/asin_variation.phpt4
-rw-r--r--ext/standard/tests/math/asinh_variation.phpt4
-rw-r--r--ext/standard/tests/math/atan_variation.phpt4
-rw-r--r--ext/standard/tests/math/atanh_variation.phpt4
-rw-r--r--ext/standard/tests/math/base_convert_error.phpt16
-rw-r--r--ext/standard/tests/math/cos_variation.phpt4
-rw-r--r--ext/standard/tests/math/cosh_variation.phpt4
-rw-r--r--ext/standard/tests/math/deg2rad_variation.phpt4
-rw-r--r--ext/standard/tests/math/lcg_value_basic.phpt24
-rw-r--r--ext/standard/tests/math/log10_variation.phpt4
-rw-r--r--ext/standard/tests/math/log_error.phpt6
-rw-r--r--ext/standard/tests/math/rad2deg_variation.phpt4
-rw-r--r--ext/standard/tests/math/sin_variation.phpt4
-rw-r--r--ext/standard/tests/math/sinh_variation.phpt4
-rw-r--r--ext/standard/tests/math/sqrt_variation.phpt4
-rw-r--r--ext/standard/tests/math/tan_variation.phpt4
-rw-r--r--ext/standard/tests/math/tanh_variation.phpt4
-rw-r--r--ext/standard/tests/misc/get_browser_error.phpt6
-rw-r--r--ext/standard/tests/network/fsockopen_error.phpt27
-rw-r--r--ext/standard/tests/network/gethostbyaddr_error.phpt20
-rw-r--r--ext/standard/tests/network/gethostname.phpt6
-rw-r--r--ext/standard/tests/network/getprotobyname_error.phpt11
-rw-r--r--ext/standard/tests/network/getprotobynumber_error.phpt11
-rw-r--r--ext/standard/tests/network/inet.phpt8
-rw-r--r--ext/standard/tests/network/ip.phpt20
-rw-r--r--ext/standard/tests/network/ip_x86_64.phpt20
-rw-r--r--ext/standard/tests/password/password_hash_error.phpt34
-rw-r--r--ext/standard/tests/password/password_needs_rehash_error.phpt33
-rw-r--r--ext/standard/tests/password/password_verify_error.phpt16
-rw-r--r--ext/standard/tests/streams/bug46426.phpt2
-rw-r--r--ext/standard/tests/streams/stream_get_contents_001.phpt2
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_error.phpt30
-rw-r--r--ext/standard/tests/streams/stream_resolve_include_path.phpt13
-rw-r--r--ext/standard/tests/streams/stream_set_chunk_size.phpt4
-rw-r--r--ext/standard/tests/streams/stream_set_timeout_error.phpt30
-rw-r--r--ext/standard/tests/streams/stream_socket_sendto.phpt8
-rw-r--r--ext/standard/tests/strings/addcslashes_001.phptbin1585 -> 1627 bytes
-rw-r--r--ext/standard/tests/strings/bug54322.phpt14
-rw-r--r--ext/standard/tests/strings/chr_error.phpt20
-rw-r--r--ext/standard/tests/strings/chr_ord.phptbin3171 -> 2454 bytes
-rw-r--r--ext/standard/tests/strings/chunk_split_variation5.phptbin2279 -> 2321 bytes
-rw-r--r--ext/standard/tests/strings/chunk_split_variation8.phpt10
-rw-r--r--ext/standard/tests/strings/convert_cyr_string.phpt16
-rw-r--r--ext/standard/tests/strings/convert_cyr_string_error.phpt24
-rw-r--r--ext/standard/tests/strings/crypt.phpt8
-rw-r--r--ext/standard/tests/strings/dirname_error.phpt11
-rw-r--r--ext/standard/tests/strings/explode1.phpt13
-rw-r--r--ext/standard/tests/strings/fprintf_error.phpt30
-rw-r--r--ext/standard/tests/strings/highlight_file.phpt4
-rw-r--r--ext/standard/tests/strings/htmlentities24.phpt12
-rw-r--r--ext/standard/tests/strings/htmlspecialchars.phpt13
-rw-r--r--ext/standard/tests/strings/implode1.phptbin5873 -> 5594 bytes
-rw-r--r--ext/standard/tests/strings/join_error.phpt22
-rw-r--r--ext/standard/tests/strings/lcfirst.phptbin6089 -> 5423 bytes
-rw-r--r--ext/standard/tests/strings/levenshtein.phpt8
-rw-r--r--ext/standard/tests/strings/ltrim.phpt16
-rw-r--r--ext/standard/tests/strings/ltrim_error.phpt18
-rw-r--r--ext/standard/tests/strings/md5_file.phptbin2876 -> 2553 bytes
-rw-r--r--ext/standard/tests/strings/metaphone.phpt3
-rw-r--r--ext/standard/tests/strings/money_format_error.phpt24
-rw-r--r--ext/standard/tests/strings/pathinfo.phpt3
-rw-r--r--ext/standard/tests/strings/php_strip_whitespace.phpt4
-rw-r--r--ext/standard/tests/strings/printf.phpt9
-rw-r--r--ext/standard/tests/strings/printf_64bit.phpt9
-rw-r--r--ext/standard/tests/strings/printf_error.phpt10
-rw-r--r--ext/standard/tests/strings/quoted_printable_encode_001.phpt14
-rw-r--r--ext/standard/tests/strings/rtrim.phptbin2446 -> 2107 bytes
-rw-r--r--ext/standard/tests/strings/rtrim_error.phpt18
-rw-r--r--ext/standard/tests/strings/setlocale_error.phpt16
-rw-r--r--ext/standard/tests/strings/sha1_file.phpt16
-rw-r--r--ext/standard/tests/strings/soundex.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_error.phpt10
-rw-r--r--ext/standard/tests/strings/sscanf_error.phpt16
-rw-r--r--ext/standard/tests/strings/str_ireplace.phpt11
-rw-r--r--ext/standard/tests/strings/str_pad.phptbin9812 -> 9340 bytes
-rw-r--r--ext/standard/tests/strings/str_repeat.phptbin16698 -> 3492 bytes
-rw-r--r--ext/standard/tests/strings/str_replace.phpt25
-rw-r--r--ext/standard/tests/strings/str_split_variation6.phpt5
-rw-r--r--ext/standard/tests/strings/str_split_variation7.phpt5
-rw-r--r--ext/standard/tests/strings/str_word_count.phpt32
-rw-r--r--ext/standard/tests/strings/strcasecmp.phptbin21284 -> 20645 bytes
-rw-r--r--ext/standard/tests/strings/strcmp.phptbin19060 -> 18460 bytes
-rw-r--r--ext/standard/tests/strings/stripos_error.phpt20
-rw-r--r--ext/standard/tests/strings/stripos_variation10.phpt30
-rw-r--r--ext/standard/tests/strings/stripos_variation11.phpt60
-rw-r--r--ext/standard/tests/strings/stristr.phpt15
-rw-r--r--ext/standard/tests/strings/stristr_error.phpt29
-rw-r--r--ext/standard/tests/strings/stristr_variation2.phpt22
-rw-r--r--ext/standard/tests/strings/strlen.phptbin6420 -> 5900 bytes
-rw-r--r--ext/standard/tests/strings/strncasecmp_error.phpt27
-rw-r--r--ext/standard/tests/strings/strncmp_error.phpt19
-rw-r--r--ext/standard/tests/strings/strpbrk_error.phpt30
-rw-r--r--ext/standard/tests/strings/strpos.phptbin10490 -> 9009 bytes
-rw-r--r--ext/standard/tests/strings/strrchr_variation10.phpt32
-rw-r--r--ext/standard/tests/strings/strrchr_variation11.phpt32
-rw-r--r--ext/standard/tests/strings/strripos.phpt4
-rw-r--r--ext/standard/tests/strings/strripos_offset.phpt26
-rw-r--r--ext/standard/tests/strings/strrpos_offset.phpt22
-rw-r--r--ext/standard/tests/strings/strrpos_variation10.phpt32
-rw-r--r--ext/standard/tests/strings/strrpos_variation11.phpt62
-rw-r--r--ext/standard/tests/strings/strstr.phptbin11041 -> 9649 bytes
-rw-r--r--ext/standard/tests/strings/strtolower-win32.phptbin4875 -> 4406 bytes
-rw-r--r--ext/standard/tests/strings/strtolower.phptbin3886 -> 3417 bytes
-rw-r--r--ext/standard/tests/strings/strtoupper1-win32.phptbin4884 -> 4415 bytes
-rw-r--r--ext/standard/tests/strings/strtoupper1.phptbin3895 -> 3426 bytes
-rw-r--r--ext/standard/tests/strings/strval_error.phpt21
-rw-r--r--ext/standard/tests/strings/substr.phptbin4781 -> 3963 bytes
-rw-r--r--ext/standard/tests/strings/substr_compare.phpt8
-rw-r--r--ext/standard/tests/strings/substr_count_error.phpt18
-rw-r--r--ext/standard/tests/strings/substr_count_variation_001.phpt12
-rw-r--r--ext/standard/tests/strings/substr_replace_error.phpt20
-rw-r--r--ext/standard/tests/strings/trim1.phptbin2045 -> 1538 bytes
-rw-r--r--ext/standard/tests/strings/trim_error.phpt18
-rw-r--r--ext/standard/tests/strings/ucfirst.phptbin5321 -> 4655 bytes
-rw-r--r--ext/standard/tests/strings/unpack_error.phpt17
-rw-r--r--ext/standard/tests/strings/uuencode.phpt8
-rw-r--r--ext/standard/tests/strings/vfprintf_error1.phpt20
-rw-r--r--ext/standard/tests/strings/vfprintf_error4.phpt10
-rw-r--r--ext/standard/tests/strings/vfprintf_variation1.phpt6
-rw-r--r--ext/standard/tests/strings/wordwrap_error.phpt19
-rw-r--r--ext/standard/tests/time/strptime_error.phpt29
-rw-r--r--ext/sysvmsg/tests/005.phpt23
-rw-r--r--ext/sysvshm/tests/001.phpt13
-rw-r--r--ext/sysvshm/tests/002.phpt23
-rw-r--r--ext/sysvshm/tests/003.phpt21
-rw-r--r--ext/sysvshm/tests/004.phpt13
-rw-r--r--ext/sysvshm/tests/005.phpt14
-rw-r--r--ext/sysvshm/tests/006.phpt8
-rw-r--r--ext/sysvshm/tests/007.phpt16
-rw-r--r--ext/tidy/tests/019.phpt7
-rw-r--r--ext/tokenizer/tests/001.phpt8
-rw-r--r--ext/tokenizer/tests/003.phpt7
-rw-r--r--ext/xmlrpc/tests/001.phpt4
-rw-r--r--ext/xmlrpc/tests/002.phpt8
-rw-r--r--ext/xmlwriter/tests/bug41326.phpt2
-rw-r--r--ext/zip/tests/oo_getcomment.phpt4
-rw-r--r--ext/zip/tests/zip_open_error.phpt7
-rw-r--r--ext/zlib/tests/004-mb.phpt8
-rw-r--r--ext/zlib/tests/004.phpt8
-rw-r--r--ext/zlib/tests/005.phpt8
-rw-r--r--ext/zlib/tests/006.phpt8
-rw-r--r--ext/zlib/tests/007.phpt8
-rw-r--r--ext/zlib/tests/gzcompress_error1.phpt40
-rw-r--r--ext/zlib/tests/gzdeflate_error1.phpt40
-rw-r--r--ext/zlib/tests/gzencode_error1.phpt49
-rw-r--r--ext/zlib/tests/gzinflate_error1.phpt40
-rw-r--r--ext/zlib/tests/gzopen_variation4.phpt156
-rw-r--r--ext/zlib/tests/gzuncompress_error1.phpt39
-rw-r--r--ext/zlib/tests/inflate_init_error.phpt4
-rw-r--r--ext/zlib/tests/readgzfile_variation10.phpt67
-rw-r--r--tests/classes/abstract_user_call.phpt11
-rw-r--r--tests/classes/autoload_012.phpt15
-rw-r--r--tests/classes/bug27504.phpt41
-rw-r--r--tests/lang/func_get_arg_variation.phpt9
-rw-r--r--tests/output/ob_014.phpt23
-rw-r--r--tests/output/ob_015.phpt23
-rw-r--r--tests/output/ob_start_error_001.phpt32
-rw-r--r--tests/output/stream_isatty.inc1
-rw-r--r--tests/output/stream_isatty_err.phpt3
-rw-r--r--tests/output/stream_isatty_in-err.phpt3
-rw-r--r--tests/output/stream_isatty_in-out-err.phpt3
-rw-r--r--tests/output/stream_isatty_in-out.phpt3
-rw-r--r--tests/output/stream_isatty_out-err.phpt3
-rw-r--r--tests/output/stream_isatty_out.phpt3
907 files changed, 2148 insertions, 13089 deletions
diff --git a/Zend/tests/011.phpt b/Zend/tests/011.phpt
index 7bcab0798f..d36ae80ae8 100644
--- a/Zend/tests/011.phpt
+++ b/Zend/tests/011.phpt
@@ -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)
diff --git a/Zend/tests/012.phpt b/Zend/tests/012.phpt
index 40f68e9794..c238229066 100644
--- a/Zend/tests/012.phpt
+++ b/Zend/tests/012.phpt
@@ -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)
diff --git a/Zend/tests/013.phpt b/Zend/tests/013.phpt
index aec10e53f1..fd8320b536 100644
--- a/Zend/tests/013.phpt
+++ b/Zend/tests/013.phpt
@@ -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)
diff --git a/Zend/tests/014.phpt b/Zend/tests/014.phpt
index 18037a99e3..2a5cca7c4d 100644
--- a/Zend/tests/014.phpt
+++ b/Zend/tests/014.phpt
@@ -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"
diff --git a/Zend/tests/015.phpt b/Zend/tests/015.phpt
index ccf5e4ddb0..deea89d14d 100644
--- a/Zend/tests/015.phpt
+++ b/Zend/tests/015.phpt
@@ -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)
diff --git a/Zend/tests/017.phpt b/Zend/tests/017.phpt
index ed1b2a38a5..619365cbce 100644
--- a/Zend/tests/017.phpt
+++ b/Zend/tests/017.phpt
@@ -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)
diff --git a/Zend/tests/018.phpt b/Zend/tests/018.phpt
index 5ced729fce..97e53b1050 100644
--- a/Zend/tests/018.phpt
+++ b/Zend/tests/018.phpt
@@ -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
diff --git a/Zend/tests/020.phpt b/Zend/tests/020.phpt
index 1e2bcff387..efc221cb4f 100644
--- a/Zend/tests/020.phpt
+++ b/Zend/tests/020.phpt
@@ -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
diff --git a/Zend/tests/bug31720.phpt b/Zend/tests/bug31720.phpt
index c4680a4789..9031dec030 100644
--- a/Zend/tests/bug31720.phpt
+++ b/Zend/tests/bug31720.phpt
@@ -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===
diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt
index 411c2ea072..1c25a86921 100644
--- a/Zend/tests/bug45186.phpt
+++ b/Zend/tests/bug45186.phpt
@@ -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
diff --git a/Zend/tests/bug45186_2.phpt b/Zend/tests/bug45186_2.phpt
index 7c813a909c..cb098136a0 100644
--- a/Zend/tests/bug45186_2.phpt
+++ b/Zend/tests/bug45186_2.phpt
@@ -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
diff --git a/Zend/tests/bug46106.phpt b/Zend/tests/bug46106.phpt
index f18c25a6c2..b0e769e05a 100644
--- a/Zend/tests/bug46106.phpt
+++ b/Zend/tests/bug46106.phpt
@@ -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
diff --git a/Zend/tests/bug51827.phpt b/Zend/tests/bug51827.phpt
index 0834749454..77bdc069c3 100644
--- a/Zend/tests/bug51827.phpt
+++ b/Zend/tests/bug51827.phpt
@@ -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
diff --git a/Zend/tests/bug70895.phpt b/Zend/tests/bug70895.phpt
index 896bf00a7b..71ff19a0b5 100644
--- a/Zend/tests/bug70895.phpt
+++ b/Zend/tests/bug70895.phpt
@@ -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
diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt
index e31ee894bf..fa6e96d83f 100644
--- a/Zend/tests/bug70898.phpt
+++ b/Zend/tests/bug70898.phpt
@@ -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
diff --git a/Zend/tests/bug73338.phpt b/Zend/tests/bug73338.phpt
index df4c3b66e4..816a526445 100644
--- a/Zend/tests/bug73338.phpt
+++ b/Zend/tests/bug73338.phpt
@@ -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===
diff --git a/Zend/tests/call_user_func_001.phpt b/Zend/tests/call_user_func_001.phpt
index 15d0aec263..a6e43f3060 100644
--- a/Zend/tests/call_user_func_001.phpt
+++ b/Zend/tests/call_user_func_001.phpt
@@ -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()
diff --git a/Zend/tests/call_user_func_002.phpt b/Zend/tests/call_user_func_002.phpt
index 454c6fda96..9d007a8af3 100644
--- a/Zend/tests/call_user_func_002.phpt
+++ b/Zend/tests/call_user_func_002.phpt
@@ -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
diff --git a/Zend/tests/class_exists_002.phpt b/Zend/tests/class_exists_002.phpt
index ebe04575af..5e5df1d371 100644
--- a/Zend/tests/class_exists_002.phpt
+++ b/Zend/tests/class_exists_002.phpt
@@ -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
diff --git a/Zend/tests/closure_040.phpt b/Zend/tests/closure_040.phpt
index 231ab4081c..531ecb271a 100644
--- a/Zend/tests/closure_040.phpt
+++ b/Zend/tests/closure_040.phpt
@@ -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
diff --git a/Zend/tests/error_reporting10.phpt b/Zend/tests/error_reporting10.phpt
index 8b0c7b9923..c18c04d8f0 100644
--- a/Zend/tests/error_reporting10.phpt
+++ b/Zend/tests/error_reporting10.phpt
@@ -8,7 +8,6 @@ error_reporting(E_ALL);
function make_exception()
{
@$blah;
- str_replace();
error_reporting(0);
throw new Exception();
}
diff --git a/Zend/tests/exception_handler_004.phpt b/Zend/tests/exception_handler_004.phpt
index 69a4136b08..6552141b73 100644
--- a/Zend/tests/exception_handler_004.phpt
+++ b/Zend/tests/exception_handler_004.phpt
@@ -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
diff --git a/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt b/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt
index a8ba71c0bf..5c0770ff65 100644
--- a/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt
+++ b/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt
@@ -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
diff --git a/Zend/tests/interface_exists_001.phpt b/Zend/tests/interface_exists_001.phpt
index ab20dd20ea..84e9c6df1e 100644
--- a/Zend/tests/interface_exists_001.phpt
+++ b/Zend/tests/interface_exists_001.phpt
@@ -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
diff --git a/Zend/tests/methods-on-non-objects-call-user-func.phpt b/Zend/tests/methods-on-non-objects-call-user-func.phpt
index 027aa64c20..63884abc79 100644
--- a/Zend/tests/methods-on-non-objects-call-user-func.phpt
+++ b/Zend/tests/methods-on-non-objects-call-user-func.phpt
@@ -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
diff --git a/Zend/tests/trait_exists_001.phpt b/Zend/tests/trait_exists_001.phpt
index 10ce3fa0cb..8a7c55d586 100644
--- a/Zend/tests/trait_exists_001.phpt
+++ b/Zend/tests/trait_exists_001.phpt
@@ -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
diff --git a/Zend/tests/unexpected_ref_bug.phpt b/Zend/tests/unexpected_ref_bug.phpt
index ba61ee582a..c7f66f05a0 100644
--- a/Zend/tests/unexpected_ref_bug.phpt
+++ b/Zend/tests/unexpected_ref_bug.phpt
@@ -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--
diff --git a/ext/bz2/tests/001.phpt b/ext/bz2/tests/001.phpt
index 5a6b2878b8..ee1872f0ef 100644
--- a/ext/bz2/tests/001.phpt
+++ b/ext/bz2/tests/001.phpt
@@ -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)
diff --git a/ext/bz2/tests/003-mb.phpt b/ext/bz2/tests/003-mb.phpt
index 6454d0d182..13bc85d5e7 100644
--- a/ext/bz2/tests/003-mb.phpt
+++ b/ext/bz2/tests/003-mb.phpt
@@ -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
diff --git a/ext/bz2/tests/003.phpt b/ext/bz2/tests/003.phpt
index 23b005ac11..af1a65e5b2 100644
--- a/ext/bz2/tests/003.phpt
+++ b/ext/bz2/tests/003.phpt
@@ -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
diff --git a/ext/bz2/tests/005.phpt b/ext/bz2/tests/005.phpt
index da29a6d0b4..4241513526 100644
--- a/ext/bz2/tests/005.phpt
+++ b/ext/bz2/tests/005.phpt
@@ -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)
diff --git a/ext/calendar/tests/jdtomonthname.phpt b/ext/calendar/tests/jdtomonthname.phpt
index 2ad50a450e..c7fa6cc774 100644
--- a/ext/calendar/tests/jdtomonthname.phpt
+++ b/ext/calendar/tests/jdtomonthname.phpt
@@ -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"
diff --git a/ext/curl/tests/curl_setopt_error.phpt b/ext/curl/tests/curl_setopt_error.phpt
index ab864d4b2d..0a7db7265f 100644
--- a/ext/curl/tests/curl_setopt_error.phpt
+++ b/ext/curl/tests/curl_setopt_error.phpt
@@ -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
diff --git a/ext/date/tests/005.phpt b/ext/date/tests/005.phpt
index e1075ef248..23fff3b731 100644
--- a/ext/date/tests/005.phpt
+++ b/ext/date/tests/005.phpt
@@ -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)
diff --git a/ext/date/tests/006.phpt b/ext/date/tests/006.phpt
index 425430a470..5171c430e2 100644
--- a/ext/date/tests/006.phpt
+++ b/ext/date/tests/006.phpt
@@ -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)
diff --git a/ext/date/tests/007.phpt b/ext/date/tests/007.phpt
index 141e251753..4e0b24ce75 100644
--- a/ext/date/tests/007.phpt
+++ b/ext/date/tests/007.phpt
@@ -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)
diff --git a/ext/date/tests/008.phpt b/ext/date/tests/008.phpt
index e67b4bd0a4..701403d1f8 100644
--- a/ext/date/tests/008.phpt
+++ b/ext/date/tests/008.phpt
@@ -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)
diff --git a/ext/date/tests/009.phpt b/ext/date/tests/009.phpt
index ae8011eebd..40d5c5f72b 100644
--- a/ext/date/tests/009.phpt
+++ b/ext/date/tests/009.phpt
@@ -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 %"
diff --git a/ext/date/tests/009_win32.phpt b/ext/date/tests/009_win32.phpt
index 3da5b35c81..63ad623b18 100644
--- a/ext/date/tests/009_win32.phpt
+++ b/ext/date/tests/009_win32.phpt
@@ -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"
diff --git a/ext/date/tests/011.phpt b/ext/date/tests/011.phpt
index 092a4b7758..ca9820c4ef 100644
--- a/ext/date/tests/011.phpt
+++ b/ext/date/tests/011.phpt
@@ -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)
diff --git a/ext/date/tests/012.phpt b/ext/date/tests/012.phpt
index be7e4e32af..ee8faf1c00 100644
--- a/ext/date/tests/012.phpt
+++ b/ext/date/tests/012.phpt
@@ -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
diff --git a/ext/date/tests/013.phpt b/ext/date/tests/013.phpt
index 266dafe06a..6010071be6 100644
--- a/ext/date/tests/013.phpt
+++ b/ext/date/tests/013.phpt
@@ -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"
diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt
index 2e72bdabe0..5c1c061e75 100644
--- a/ext/date/tests/014.phpt
+++ b/ext/date/tests/014.phpt
@@ -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
diff --git a/ext/date/tests/68062.phpt b/ext/date/tests/68062.phpt
index 6b1e16ae67..1270382158 100644
--- a/ext/date/tests/68062.phpt
+++ b/ext/date/tests/68062.phpt
@@ -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
diff --git a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt
index ac92fb4bb4..671afc1229 100644
--- a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt
+++ b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt
@@ -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
diff --git a/ext/date/tests/DateTime_createFromImmutable.phpt b/ext/date/tests/DateTime_createFromImmutable.phpt
index ee7731855a..841a3d4d33 100644
--- a/ext/date/tests/DateTime_createFromImmutable.phpt
+++ b/ext/date/tests/DateTime_createFromImmutable.phpt
@@ -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
diff --git a/ext/date/tests/bug36988.phpt b/ext/date/tests/bug36988.phpt
index ab0f3a3c8a..691bb4a7e2 100644
--- a/ext/date/tests/bug36988.phpt
+++ b/ext/date/tests/bug36988.phpt
@@ -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
diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt
index cbcccf84b9..b1f7f25d7b 100644
--- a/ext/date/tests/bug52062.phpt
+++ b/ext/date/tests/bug52062.phpt
@@ -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"
diff --git a/ext/date/tests/bug70245.phpt b/ext/date/tests/bug70245.phpt
index f754bf65a1..b480192326 100644
--- a/ext/date/tests/bug70245.phpt
+++ b/ext/date/tests/bug70245.phpt
@@ -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
diff --git a/ext/date/tests/date_default_timezone_set_error.phpt b/ext/date/tests/date_default_timezone_set_error.phpt
index 15c6aa6fed..24a851ff01 100644
--- a/ext/date/tests/date_default_timezone_set_error.phpt
+++ b/ext/date/tests/date_default_timezone_set_error.phpt
@@ -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
diff --git a/ext/date/tests/date_parse_001.phpt b/ext/date/tests/date_parse_001.phpt
index b5c5ac0f48..0d58c1f8e9 100644
--- a/ext/date/tests/date_parse_001.phpt
+++ b/ext/date/tests/date_parse_001.phpt
@@ -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
diff --git a/ext/date/tests/date_parse_error.phpt b/ext/date/tests/date_parse_error.phpt
index 9f444bb435..dc03944004 100644
--- a/ext/date/tests/date_parse_error.phpt
+++ b/ext/date/tests/date_parse_error.phpt
@@ -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
index 75794cc632..0000000000
--- a/ext/date/tests/date_sunrise_variation9.phpt
+++ /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
index 4f897e1df0..0000000000
--- a/ext/date/tests/date_sunset_variation9.phpt
+++ /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
index e24f3e6d84..0000000000
--- a/ext/date/tests/getdate_variation7.phpt
+++ /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
index 5b6c48fca5..0000000000
--- a/ext/date/tests/gmdate_variation14.phpt
+++ /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===
diff --git a/ext/date/tests/gmmktime_basic.phpt b/ext/date/tests/gmmktime_basic.phpt
index c125e353c4..dca6675e6c 100644
--- a/ext/date/tests/gmmktime_basic.phpt
+++ b/ext/date/tests/gmmktime_basic.phpt
@@ -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
index 9b6bc567e0..0000000000
--- a/ext/date/tests/idate_variation3.phpt
+++ /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
index 42731dc6ce..0000000000
--- a/ext/date/tests/localtime_variation3.phpt
+++ /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===
diff --git a/ext/date/tests/microtime_error.phpt b/ext/date/tests/microtime_error.phpt
index 699416d382..0e4b5d5a35 100644
--- a/ext/date/tests/microtime_error.phpt
+++ b/ext/date/tests/microtime_error.phpt
@@ -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)
diff --git a/ext/date/tests/mktime_error.phpt b/ext/date/tests/mktime_error.phpt
index 02e94a7d4d..c507ecf78b 100644
--- a/ext/date/tests/mktime_error.phpt
+++ b/ext/date/tests/mktime_error.phpt
@@ -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
index 22f079702a..0000000000
--- a/ext/date/tests/strftime_variation23.phpt
+++ /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===
diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt
index 413755ac72..f77836c8ef 100644
--- a/ext/date/tests/timezone_offset_get_error.phpt
+++ b/ext/date/tests/timezone_offset_get_error.phpt
@@ -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"
diff --git a/ext/dba/tests/dba011.phpt b/ext/dba/tests/dba011.phpt
index 0891a30f48..1642587a43 100644
--- a/ext/dba/tests/dba011.phpt
+++ b/ext/dba/tests/dba011.phpt
@@ -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
diff --git a/ext/dba/tests/dba_handlers.phpt b/ext/dba/tests/dba_handlers.phpt
index 41c23b5cf6..3c9d174514 100644
--- a/ext/dba/tests/dba_handlers.phpt
+++ b/ext/dba/tests/dba_handlers.phpt
@@ -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
diff --git a/ext/dba/tests/dba_optimize.phpt b/ext/dba/tests/dba_optimize.phpt
index 6347d4983c..21e135de81 100644
--- a/ext/dba/tests/dba_optimize.phpt
+++ b/ext/dba/tests/dba_optimize.phpt
@@ -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===
diff --git a/ext/dba/tests/dba_split.phpt b/ext/dba/tests/dba_split.phpt
index 0989f09feb..1f660daf09 100644
--- a/ext/dba/tests/dba_split.phpt
+++ b/ext/dba/tests/dba_split.phpt
@@ -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) ""
diff --git a/ext/dba/tests/dba_sync.phpt b/ext/dba/tests/dba_sync.phpt
index 0e64ea2905..5b2ae5bb76 100644
--- a/ext/dba/tests/dba_sync.phpt
+++ b/ext/dba/tests/dba_sync.phpt
@@ -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===
diff --git a/ext/exif/tests/exif_imagetype_error.phpt b/ext/exif/tests/exif_imagetype_error.phpt
index 3627ad969d..2098b2d273 100644
--- a/ext/exif/tests/exif_imagetype_error.phpt
+++ b/ext/exif/tests/exif_imagetype_error.phpt
@@ -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
diff --git a/ext/fileinfo/tests/bug71527-mb.phpt b/ext/fileinfo/tests/bug71527-mb.phpt
index 60af049f4f..1f56b679f8 100644
--- a/ext/fileinfo/tests/bug71527-mb.phpt
+++ b/ext/fileinfo/tests/bug71527-mb.phpt
@@ -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)
diff --git a/ext/fileinfo/tests/bug71527.phpt b/ext/fileinfo/tests/bug71527.phpt
index 1feb29dd73..a670a79b51 100644
--- a/ext/fileinfo/tests/bug71527.phpt
+++ b/ext/fileinfo/tests/bug71527.phpt
@@ -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)
diff --git a/ext/fileinfo/tests/finfo_close_error.phpt b/ext/fileinfo/tests/finfo_close_error.phpt
index 374787aa55..acd26896f0 100644
--- a/ext/fileinfo/tests/finfo_close_error.phpt
+++ b/ext/fileinfo/tests/finfo_close_error.phpt
@@ -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
diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt
index 17935c3676..98901f3a8e 100644
--- a/ext/fileinfo/tests/finfo_open_001.phpt
+++ b/ext/fileinfo/tests/finfo_open_001.phpt
@@ -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)
diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt
index 6a0ef96a4e..60fcbce9c2 100644
--- a/ext/fileinfo/tests/finfo_open_error.phpt
+++ b/ext/fileinfo/tests/finfo_open_error.phpt
@@ -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===
diff --git a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt
index 615afd40f8..2641e7eb11 100644
--- a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt
+++ b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt
@@ -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===
diff --git a/ext/fileinfo/tests/finfo_set_flags_basic.phpt b/ext/fileinfo/tests/finfo_set_flags_basic.phpt
index 3b7168a684..12748c385f 100644
--- a/ext/fileinfo/tests/finfo_set_flags_basic.phpt
+++ b/ext/fileinfo/tests/finfo_set_flags_basic.phpt
@@ -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===
diff --git a/ext/filter/tests/007.phpt b/ext/filter/tests/007.phpt
index 87f9a77a12..dc966b8cc9 100644
--- a/ext/filter/tests/007.phpt
+++ b/ext/filter/tests/007.phpt
@@ -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
diff --git a/ext/filter/tests/008.phpt b/ext/filter/tests/008.phpt
index a3cb7172ff..b34c977425 100644
--- a/ext/filter/tests/008.phpt
+++ b/ext/filter/tests/008.phpt
@@ -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
diff --git a/ext/filter/tests/009.phpt b/ext/filter/tests/009.phpt
index 5c38e5603a..f456dc6dc1 100644
--- a/ext/filter/tests/009.phpt
+++ b/ext/filter/tests/009.phpt
@@ -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
diff --git a/ext/filter/tests/010.phpt b/ext/filter/tests/010.phpt
index 3e71d331bd..14f8db01af 100644
--- a/ext/filter/tests/010.phpt
+++ b/ext/filter/tests/010.phpt
@@ -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"
diff --git a/ext/filter/tests/011.phpt b/ext/filter/tests/011.phpt
index b5075d1821..1b2a2ec357 100644
--- a/ext/filter/tests/011.phpt
+++ b/ext/filter/tests/011.phpt
@@ -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
diff --git a/ext/filter/tests/039.phpt b/ext/filter/tests/039.phpt
index 501414deee..bdd090ae86 100644
--- a/ext/filter/tests/039.phpt
+++ b/ext/filter/tests/039.phpt
@@ -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) {
diff --git a/ext/filter/tests/040.phpt b/ext/filter/tests/040.phpt
index d77b33135e..2ef6839405 100644
--- a/ext/filter/tests/040.phpt
+++ b/ext/filter/tests/040.phpt
@@ -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
diff --git a/ext/ftp/tests/004.phpt b/ext/ftp/tests/004.phpt
index 3fcf272e3b..b95c12c518 100644
--- a/ext/ftp/tests/004.phpt
+++ b/ext/ftp/tests/004.phpt
@@ -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
index ff0d258917..0000000000
--- a/ext/ftp/tests/006.phpt
+++ /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
diff --git a/ext/ftp/tests/ftp_get_basic.phpt b/ext/ftp/tests/ftp_get_basic.phpt
index 60f1b1de79..43022cde45 100644
--- a/ext/ftp/tests/ftp_get_basic.phpt
+++ b/ext/ftp/tests/ftp_get_basic.phpt
@@ -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
diff --git a/ext/ftp/tests/ftp_ssl_connect_error.phpt b/ext/ftp/tests/ftp_ssl_connect_error.phpt
index b0ece5d63b..13c8f9e9c0 100644
--- a/ext/ftp/tests/ftp_ssl_connect_error.phpt
+++ b/ext/ftp/tests/ftp_ssl_connect_error.phpt
@@ -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
diff --git a/ext/gd/tests/imagecolorallocatealpha_error1.phpt b/ext/gd/tests/imagecolorallocatealpha_error1.phpt
index 793c02d106..cdc83d8479 100644
--- a/ext/gd/tests/imagecolorallocatealpha_error1.phpt
+++ b/ext/gd/tests/imagecolorallocatealpha_error1.phpt
@@ -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
diff --git a/ext/gd/tests/imagecolorstotal_error.phpt b/ext/gd/tests/imagecolorstotal_error.phpt
index 59999423ca..328cf12e7c 100644
--- a/ext/gd/tests/imagecolorstotal_error.phpt
+++ b/ext/gd/tests/imagecolorstotal_error.phpt
@@ -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
diff --git a/ext/gd/tests/imagecreatetruecolor_error2.phpt b/ext/gd/tests/imagecreatetruecolor_error2.phpt
index 3ab4cf1e1f..8847333722 100644
--- a/ext/gd/tests/imagecreatetruecolor_error2.phpt
+++ b/ext/gd/tests/imagecreatetruecolor_error2.phpt
@@ -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
diff --git a/ext/gd/tests/imagefilter_error1.phpt b/ext/gd/tests/imagefilter_error1.phpt
index 41637994b4..407944d899 100644
--- a/ext/gd/tests/imagefilter_error1.phpt
+++ b/ext/gd/tests/imagefilter_error1.phpt
@@ -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()
diff --git a/ext/gd/tests/imagegd2_nullbyte_injection.phpt b/ext/gd/tests/imagegd2_nullbyte_injection.phpt
index 2370d5036e..5eae5c719c 100644
--- a/ext/gd/tests/imagegd2_nullbyte_injection.phpt
+++ b/ext/gd/tests/imagegd2_nullbyte_injection.phpt
@@ -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)
diff --git a/ext/gd/tests/imagegd_nullbyte_injection.phpt b/ext/gd/tests/imagegd_nullbyte_injection.phpt
index 25e54fe36c..235bd4680c 100644
--- a/ext/gd/tests/imagegd_nullbyte_injection.phpt
+++ b/ext/gd/tests/imagegd_nullbyte_injection.phpt
@@ -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)
diff --git a/ext/gd/tests/imageistruecolor_error1.phpt b/ext/gd/tests/imageistruecolor_error1.phpt
index ab0a9fe653..e2364bcec6 100644
--- a/ext/gd/tests/imageistruecolor_error1.phpt
+++ b/ext/gd/tests/imageistruecolor_error1.phpt
@@ -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
diff --git a/ext/gd/tests/imagesetthickness_error1.phpt b/ext/gd/tests/imagesetthickness_error1.phpt
index f54270afbc..2542444c87 100644
--- a/ext/gd/tests/imagesetthickness_error1.phpt
+++ b/ext/gd/tests/imagesetthickness_error1.phpt
@@ -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
diff --git a/ext/gd/tests/imagetruecolortopalette_error1.phpt b/ext/gd/tests/imagetruecolortopalette_error1.phpt
index 3418449c01..a4d3bdfc16 100644
--- a/ext/gd/tests/imagetruecolortopalette_error1.phpt
+++ b/ext/gd/tests/imagetruecolortopalette_error1.phpt
@@ -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
diff --git a/ext/gd/tests/imagetruecolortopalette_error3.phpt b/ext/gd/tests/imagetruecolortopalette_error3.phpt
index d89bbcb31b..2a256ba957 100644
--- a/ext/gd/tests/imagetruecolortopalette_error3.phpt
+++ b/ext/gd/tests/imagetruecolortopalette_error3.phpt
@@ -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
diff --git a/ext/gd/tests/lines.phpt b/ext/gd/tests/lines.phpt
index dda8497222..9401b6c82d 100644
--- a/ext/gd/tests/lines.phpt
+++ b/ext/gd/tests/lines.phpt
@@ -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
diff --git a/ext/gettext/tests/dcngettext.phpt b/ext/gettext/tests/dcngettext.phpt
index 4bf493507b..f004febcb6 100644
--- a/ext/gettext/tests/dcngettext.phpt
+++ b/ext/gettext/tests/dcngettext.phpt
@@ -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"
diff --git a/ext/gmp/tests/gmp_abs.phpt b/ext/gmp/tests/gmp_abs.phpt
index 811ab3d5ee..236acc4684 100644
--- a/ext/gmp/tests/gmp_abs.phpt
+++ b/ext/gmp/tests/gmp_abs.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_and.phpt b/ext/gmp/tests/gmp_and.phpt
index 2fb27c3e70..b582a6b480 100644
--- a/ext/gmp/tests/gmp_and.phpt
+++ b/ext/gmp/tests/gmp_and.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_clrbit.phpt b/ext/gmp/tests/gmp_clrbit.phpt
index 0aab89dd37..255b9947b9 100644
--- a/ext/gmp/tests/gmp_clrbit.phpt
+++ b/ext/gmp/tests/gmp_clrbit.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_cmp.phpt b/ext/gmp/tests/gmp_cmp.phpt
index 2e48d3b83b..4748e7db87 100644
--- a/ext/gmp/tests/gmp_cmp.phpt
+++ b/ext/gmp/tests/gmp_cmp.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_com.phpt b/ext/gmp/tests/gmp_com.phpt
index ae6ec59200..97299dd064 100644
--- a/ext/gmp/tests/gmp_com.phpt
+++ b/ext/gmp/tests/gmp_com.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_div_q.phpt b/ext/gmp/tests/gmp_div_q.phpt
index afc64c3547..9fd94efdac 100644
--- a/ext/gmp/tests/gmp_div_q.phpt
+++ b/ext/gmp/tests/gmp_div_q.phpt
@@ -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"
diff --git a/ext/gmp/tests/gmp_div_qr.phpt b/ext/gmp/tests/gmp_div_qr.phpt
index 936fbc6ef1..373beb5701 100644
--- a/ext/gmp/tests/gmp_div_qr.phpt
+++ b/ext/gmp/tests/gmp_div_qr.phpt
@@ -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) {
diff --git a/ext/gmp/tests/gmp_div_r.phpt b/ext/gmp/tests/gmp_div_r.phpt
index bab243e465..2b19ed1f48 100644
--- a/ext/gmp/tests/gmp_div_r.phpt
+++ b/ext/gmp/tests/gmp_div_r.phpt
@@ -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"
diff --git a/ext/gmp/tests/gmp_divexact.phpt b/ext/gmp/tests/gmp_divexact.phpt
index 53f0c677ab..c6183cb734 100644
--- a/ext/gmp/tests/gmp_divexact.phpt
+++ b/ext/gmp/tests/gmp_divexact.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_export.phpt b/ext/gmp/tests/gmp_export.phpt
index 52449ecf0a..bbc26d086c 100644
--- a/ext/gmp/tests/gmp_export.phpt
+++ b/ext/gmp/tests/gmp_export.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_fact.phpt b/ext/gmp/tests/gmp_fact.phpt
index 032f735435..d861fae40e 100644
--- a/ext/gmp/tests/gmp_fact.phpt
+++ b/ext/gmp/tests/gmp_fact.phpt
@@ -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"]=>
diff --git a/ext/gmp/tests/gmp_gcd.phpt b/ext/gmp/tests/gmp_gcd.phpt
index cf4eac9e92..4e130a1fd9 100644
--- a/ext/gmp/tests/gmp_gcd.phpt
+++ b/ext/gmp/tests/gmp_gcd.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_gcdext.phpt b/ext/gmp/tests/gmp_gcdext.phpt
index 4adecf25d2..d02f341129 100644
--- a/ext/gmp/tests/gmp_gcdext.phpt
+++ b/ext/gmp/tests/gmp_gcdext.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_hamdist.phpt b/ext/gmp/tests/gmp_hamdist.phpt
index 60ef89f84d..7057c5f32a 100644
--- a/ext/gmp/tests/gmp_hamdist.phpt
+++ b/ext/gmp/tests/gmp_hamdist.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_import.phpt b/ext/gmp/tests/gmp_import.phpt
index a9e9314483..b3c4e0154a 100644
--- a/ext/gmp/tests/gmp_import.phpt
+++ b/ext/gmp/tests/gmp_import.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_init.phpt b/ext/gmp/tests/gmp_init.phpt
index a35f12345c..7da7c8e55e 100644
--- a/ext/gmp/tests/gmp_init.phpt
+++ b/ext/gmp/tests/gmp_init.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_intval.phpt b/ext/gmp/tests/gmp_intval.phpt
index f30b391573..019ab3d070 100644
--- a/ext/gmp/tests/gmp_intval.phpt
+++ b/ext/gmp/tests/gmp_intval.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_invert.phpt b/ext/gmp/tests/gmp_invert.phpt
index 8c1d7c577c..40793afd53 100644
--- a/ext/gmp/tests/gmp_invert.phpt
+++ b/ext/gmp/tests/gmp_invert.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_jacobi.phpt b/ext/gmp/tests/gmp_jacobi.phpt
index da92b87401..2040b666f6 100644
--- a/ext/gmp/tests/gmp_jacobi.phpt
+++ b/ext/gmp/tests/gmp_jacobi.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_legendre.phpt b/ext/gmp/tests/gmp_legendre.phpt
index 71191e133d..6b6197f25a 100644
--- a/ext/gmp/tests/gmp_legendre.phpt
+++ b/ext/gmp/tests/gmp_legendre.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_mod.phpt b/ext/gmp/tests/gmp_mod.phpt
index 4f216965c9..135c2ca11c 100644
--- a/ext/gmp/tests/gmp_mod.phpt
+++ b/ext/gmp/tests/gmp_mod.phpt
@@ -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) {
diff --git a/ext/gmp/tests/gmp_neg.phpt b/ext/gmp/tests/gmp_neg.phpt
index c457fa6574..777de69105 100644
--- a/ext/gmp/tests/gmp_neg.phpt
+++ b/ext/gmp/tests/gmp_neg.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_or.phpt b/ext/gmp/tests/gmp_or.phpt
index ef486df8e9..affd6ae5b8 100644
--- a/ext/gmp/tests/gmp_or.phpt
+++ b/ext/gmp/tests/gmp_or.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_perfect_square.phpt b/ext/gmp/tests/gmp_perfect_square.phpt
index 0f519c7b79..b477910378 100644
--- a/ext/gmp/tests/gmp_perfect_square.phpt
+++ b/ext/gmp/tests/gmp_perfect_square.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_popcount.phpt b/ext/gmp/tests/gmp_popcount.phpt
index 26a7b5af8d..76dc2a89c0 100644
--- a/ext/gmp/tests/gmp_popcount.phpt
+++ b/ext/gmp/tests/gmp_popcount.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_pow.phpt b/ext/gmp/tests/gmp_pow.phpt
index 5424d410a0..e9525867e1 100644
--- a/ext/gmp/tests/gmp_pow.phpt
+++ b/ext/gmp/tests/gmp_pow.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_pown.phpt b/ext/gmp/tests/gmp_pown.phpt
index b732aa331f..9a5b5deb11 100644
--- a/ext/gmp/tests/gmp_pown.phpt
+++ b/ext/gmp/tests/gmp_pown.phpt
@@ -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) {
diff --git a/ext/gmp/tests/gmp_prob_prime.phpt b/ext/gmp/tests/gmp_prob_prime.phpt
index 99735bd7c0..2872e01d84 100644
--- a/ext/gmp/tests/gmp_prob_prime.phpt
+++ b/ext/gmp/tests/gmp_prob_prime.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_random_bits.phpt b/ext/gmp/tests/gmp_random_bits.phpt
index b4aa5d7b73..42b90d6fe3 100644
--- a/ext/gmp/tests/gmp_random_bits.phpt
+++ b/ext/gmp/tests/gmp_random_bits.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_random_range.phpt b/ext/gmp/tests/gmp_random_range.phpt
index 654ffbefb3..fec8274167 100644
--- a/ext/gmp/tests/gmp_random_range.phpt
+++ b/ext/gmp/tests/gmp_random_range.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_remroot.phpt b/ext/gmp/tests/gmp_remroot.phpt
index acd8f84925..1316d7651c 100644
--- a/ext/gmp/tests/gmp_remroot.phpt
+++ b/ext/gmp/tests/gmp_remroot.phpt
@@ -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) {
diff --git a/ext/gmp/tests/gmp_root.phpt b/ext/gmp/tests/gmp_root.phpt
index 654e2ffeb6..47c1fcc608 100644
--- a/ext/gmp/tests/gmp_root.phpt
+++ b/ext/gmp/tests/gmp_root.phpt
@@ -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"
diff --git a/ext/gmp/tests/gmp_scan0.phpt b/ext/gmp/tests/gmp_scan0.phpt
index fb70cf8b25..c06f91f7dd 100644
--- a/ext/gmp/tests/gmp_scan0.phpt
+++ b/ext/gmp/tests/gmp_scan0.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_scan1.phpt b/ext/gmp/tests/gmp_scan1.phpt
index a89a9195b0..43a2fdfa1b 100644
--- a/ext/gmp/tests/gmp_scan1.phpt
+++ b/ext/gmp/tests/gmp_scan1.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_setbit.phpt b/ext/gmp/tests/gmp_setbit.phpt
index 2eac23db0e..15270eaf7b 100644
--- a/ext/gmp/tests/gmp_setbit.phpt
+++ b/ext/gmp/tests/gmp_setbit.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_sign.phpt b/ext/gmp/tests/gmp_sign.phpt
index 7ac03013d4..ac01845395 100644
--- a/ext/gmp/tests/gmp_sign.phpt
+++ b/ext/gmp/tests/gmp_sign.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_sqrt.phpt b/ext/gmp/tests/gmp_sqrt.phpt
index e824de3706..03c460b79a 100644
--- a/ext/gmp/tests/gmp_sqrt.phpt
+++ b/ext/gmp/tests/gmp_sqrt.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_sqrtrem.phpt b/ext/gmp/tests/gmp_sqrtrem.phpt
index 595a1dc45a..c19969158e 100644
--- a/ext/gmp/tests/gmp_sqrtrem.phpt
+++ b/ext/gmp/tests/gmp_sqrtrem.phpt
@@ -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
diff --git a/ext/gmp/tests/gmp_strval.phpt b/ext/gmp/tests/gmp_strval.phpt
index cfa7335667..b349d31699 100644
--- a/ext/gmp/tests/gmp_strval.phpt
+++ b/ext/gmp/tests/gmp_strval.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_sub.phpt b/ext/gmp/tests/gmp_sub.phpt
index fabc0c0ebb..b8dce49774 100644
--- a/ext/gmp/tests/gmp_sub.phpt
+++ b/ext/gmp/tests/gmp_sub.phpt
@@ -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) {
diff --git a/ext/gmp/tests/gmp_testbit.phpt b/ext/gmp/tests/gmp_testbit.phpt
index bdabe3d841..f18af5d44d 100644
--- a/ext/gmp/tests/gmp_testbit.phpt
+++ b/ext/gmp/tests/gmp_testbit.phpt
@@ -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)
diff --git a/ext/gmp/tests/gmp_xor.phpt b/ext/gmp/tests/gmp_xor.phpt
index 9bf31f02f4..cc508907aa 100644
--- a/ext/gmp/tests/gmp_xor.phpt
+++ b/ext/gmp/tests/gmp_xor.phpt
@@ -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)
diff --git a/ext/hash/tests/hash_error.phpt b/ext/hash/tests/hash_error.phpt
index e760819e69..f879d491d7 100644
--- a/ext/hash/tests/hash_error.phpt
+++ b/ext/hash/tests/hash_error.phpt
@@ -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
diff --git a/ext/hash/tests/hash_file_error.phpt b/ext/hash/tests/hash_file_error.phpt
index a634070de5..b001001861 100644
--- a/ext/hash/tests/hash_file_error.phpt
+++ b/ext/hash/tests/hash_file_error.phpt
@@ -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===
diff --git a/ext/hash/tests/hash_hkdf_error.phpt b/ext/hash/tests/hash_hkdf_error.phpt
index b833054e80..e5903f126a 100644
--- a/ext/hash/tests/hash_hkdf_error.phpt
+++ b/ext/hash/tests/hash_hkdf_error.phpt
@@ -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
diff --git a/ext/hash/tests/hash_hmac_error.phpt b/ext/hash/tests/hash_hmac_error.phpt
index 89d29b8df8..1ed3e54127 100644
--- a/ext/hash/tests/hash_hmac_error.phpt
+++ b/ext/hash/tests/hash_hmac_error.phpt
@@ -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
diff --git a/ext/hash/tests/hash_hmac_file_basic.phpt b/ext/hash/tests/hash_hmac_file_basic.phpt
index 9135825008..7ad271b00b 100644
--- a/ext/hash/tests/hash_hmac_file_basic.phpt
+++ b/ext/hash/tests/hash_hmac_file_basic.phpt
@@ -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===
diff --git a/ext/hash/tests/hash_hmac_file_error.phpt b/ext/hash/tests/hash_hmac_file_error.phpt
index 5b82c288ec..505d52fef9 100644
--- a/ext/hash/tests/hash_hmac_file_error.phpt
+++ b/ext/hash/tests/hash_hmac_file_error.phpt
@@ -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
diff --git a/ext/hash/tests/hash_init_error.phpt b/ext/hash/tests/hash_init_error.phpt
index e941aabca5..9105b96801 100644
--- a/ext/hash/tests/hash_init_error.phpt
+++ b/ext/hash/tests/hash_init_error.phpt
@@ -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
diff --git a/ext/hash/tests/hash_pbkdf2_error.phpt b/ext/hash/tests/hash_pbkdf2_error.phpt
index c0a76e17b4..a7fd08649b 100644
--- a/ext/hash/tests/hash_pbkdf2_error.phpt
+++ b/ext/hash/tests/hash_pbkdf2_error.phpt
@@ -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
index 13adc53b03..0000000000
--- a/ext/intl/tests/breakiter_createCodePointInstance_error.phpt
+++ /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
index 4f3a912a15..0000000000
--- a/ext/intl/tests/breakiter_factories_error.phpt
+++ /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
index da37ffea78..0000000000
--- a/ext/intl/tests/breakiter_first_last_previous_current_error.phpt
+++ /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
index 56ed60ffcf..0000000000
--- a/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
+++ /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
index f318743948..0000000000
--- a/ext/intl/tests/breakiter_getLocale_error.phpt
+++ /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)
diff --git a/ext/intl/tests/breakiter_getPartsIterator_error.phpt b/ext/intl/tests/breakiter_getPartsIterator_error.phpt
index b756540578..506b376c19 100644
--- a/ext/intl/tests/breakiter_getPartsIterator_error.phpt
+++ b/ext/intl/tests/breakiter_getPartsIterator_error.phpt
@@ -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
index d66b4bb69f..0000000000
--- a/ext/intl/tests/breakiter_getText_error.phpt
+++ /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
index eb4664308c..0000000000
--- a/ext/intl/tests/breakiter_next_error.phpt
+++ /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
index c94a8433f1..0000000000
--- a/ext/intl/tests/breakiter_setText_error.phpt
+++ /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"
diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt
index 017551821d..1fc12828e1 100644
--- a/ext/intl/tests/calendar_add_error.phpt
+++ b/ext/intl/tests/calendar_add_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt
index 279e3d816e..805f064841 100644
--- a/ext/intl/tests/calendar_before_after_error.phpt
+++ b/ext/intl/tests/calendar_before_after_error.phpt
@@ -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
diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt
index bffa103eac..e91b7a6326 100644
--- a/ext/intl/tests/calendar_clear_error.phpt
+++ b/ext/intl/tests/calendar_clear_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_createInstance_error.phpt b/ext/intl/tests/calendar_createInstance_error.phpt
index 5cb9fa1c63..516cc9260e 100644
--- a/ext/intl/tests/calendar_createInstance_error.phpt
+++ b/ext/intl/tests/calendar_createInstance_error.phpt
@@ -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
diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt
index 4c585a6018..d716c1a698 100644
--- a/ext/intl/tests/calendar_equals_error.phpt
+++ b/ext/intl/tests/calendar_equals_error.phpt
@@ -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
diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt
index 4f3fc351cb..fa88605348 100644
--- a/ext/intl/tests/calendar_fieldDifference_error.phpt
+++ b/ext/intl/tests/calendar_fieldDifference_error.phpt
@@ -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:
diff --git a/ext/intl/tests/calendar_fromDateTime_error.phpt b/ext/intl/tests/calendar_fromDateTime_error.phpt
index 1074159687..6fbaeb57f8 100644
--- a/ext/intl/tests/calendar_fromDateTime_error.phpt
+++ b/ext/intl/tests/calendar_fromDateTime_error.phpt
@@ -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
index 3aee500fea..0000000000
--- a/ext/intl/tests/calendar_getAvailableLocales_error.phpt
+++ /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)
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
index 46fe17d9cd..2722f54052 100644
--- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
+++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt
index fd999fbbbf..56e748fa12 100644
--- a/ext/intl/tests/calendar_getErrorCode_error.phpt
+++ b/ext/intl/tests/calendar_getErrorCode_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt
index cc52449d94..8cdbb1f34b 100644
--- a/ext/intl/tests/calendar_getErrorMessage_error.phpt
+++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
index ca2dc4a9f2..68e0fd9074 100644
--- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
+++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
@@ -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
index 717c435be7..0000000000
--- a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
+++ /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)
diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt
index 008e1b756e..c033d82cf3 100644
--- a/ext/intl/tests/calendar_getLocale_error.phpt
+++ b/ext/intl/tests/calendar_getLocale_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
index a1190e5ce0..fe3825ad68 100644
--- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
+++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
@@ -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
index 712e210851..0000000000
--- a/ext/intl/tests/calendar_getNow_error.phpt
+++ /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)
diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
index 06aa679c5a..57eca0996e 100644
--- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt
index ea7e85db4c..f78d93f454 100644
--- a/ext/intl/tests/calendar_getTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_getTimeZone_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt
index 61eaea97dc..51cb0cfe7e 100644
--- a/ext/intl/tests/calendar_getTime_error.phpt
+++ b/ext/intl/tests/calendar_getTime_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt
index c124151893..abc5f17fdd 100644
--- a/ext/intl/tests/calendar_getType_error.phpt
+++ b/ext/intl/tests/calendar_getType_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
index d61c9d5a25..f6a4a71c18 100644
--- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt
+++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
index 6c6f67f953..9612862119 100644
--- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
+++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
index d7d20ed6cd..3853d612a3 100644
--- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
index 37e3816fef..98408a4327 100644
--- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
@@ -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
diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt
index 6644f477ea..bbcfcaabb1 100644
--- a/ext/intl/tests/calendar_inDaylightTime_error.phpt
+++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
index c7e30fd645..254d1dab84 100644
--- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt
+++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
@@ -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
diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt
index 263d82bb37..6fec307349 100644
--- a/ext/intl/tests/calendar_isLenient_error.phpt
+++ b/ext/intl/tests/calendar_isLenient_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt
index 7e5b2beaa6..9cb266f742 100644
--- a/ext/intl/tests/calendar_isSet_error.phpt
+++ b/ext/intl/tests/calendar_isSet_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
index c1f8180fa3..de40b2aee6 100644
--- a/ext/intl/tests/calendar_isWeekend_error.phpt
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt
index 27160ee8ca..bc00896d8b 100644
--- a/ext/intl/tests/calendar_roll_error.phpt
+++ b/ext/intl/tests/calendar_roll_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
index a22c3b2842..6dcff918a7 100644
--- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
+++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt
index b2a6f25d5d..2d73857c2b 100644
--- a/ext/intl/tests/calendar_setLenient_error.phpt
+++ b/ext/intl/tests/calendar_setLenient_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
index 48d18bf28d..430fc953bd 100644
--- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
+++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
index 776cb8b825..e3d03815dc 100644
--- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt
index dee773d377..1cace3b4ea 100644
--- a/ext/intl/tests/calendar_setTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_setTimeZone_error.phpt
@@ -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
diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt
index d3fa46c591..6ecbd698bf 100644
--- a/ext/intl/tests/calendar_setTime_error.phpt
+++ b/ext/intl/tests/calendar_setTime_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt
index 5827ad41ec..2116786d32 100644
--- a/ext/intl/tests/calendar_set_error.phpt
+++ b/ext/intl/tests/calendar_set_error.phpt
@@ -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)
diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt
index 584bd28f65..e251c501b6 100644
--- a/ext/intl/tests/calendar_toDateTime_error.phpt
+++ b/ext/intl/tests/calendar_toDateTime_error.phpt
@@ -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
index 505a076ca3..0000000000
--- a/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
+++ /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)
diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt
index bfcc951b73..24be090035 100644
--- a/ext/intl/tests/dateformat_formatObject_error.phpt
+++ b/ext/intl/tests/dateformat_formatObject_error.phpt
@@ -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
index d5a7833ded..0000000000
--- a/ext/intl/tests/dateformat_getCalendarObject_error.phpt
+++ /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
index d2ab92d86a..0000000000
--- a/ext/intl/tests/dateformat_getTimeZone_error.phpt
+++ /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==
diff --git a/ext/intl/tests/dateformat_setTimeZone_error.phpt b/ext/intl/tests/dateformat_setTimeZone_error.phpt
index b58d159088..e5ba550910 100644
--- a/ext/intl/tests/dateformat_setTimeZone_error.phpt
+++ b/ext/intl/tests/dateformat_setTimeZone_error.phpt
@@ -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==
diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt
index 9cfc6f5054..0a8d7f398b 100644
--- a/ext/intl/tests/formatter_fail.phpt
+++ b/ext/intl/tests/formatter_fail.phpt
@@ -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'
diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
index a1cfb593d7..3353690d1c 100644
--- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
@@ -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)
diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
index 9da5aaf418..701e643e00 100644
--- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
@@ -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
index 0dd27802b5..0000000000
--- a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
+++ /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
diff --git a/ext/intl/tests/idn_uts46_errors.phpt b/ext/intl/tests/idn_uts46_errors.phpt
index 55d2d56215..e468e8caf8 100644
--- a/ext/intl/tests/idn_uts46_errors.phpt
+++ b/ext/intl/tests/idn_uts46_errors.phpt
@@ -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
diff --git a/ext/intl/tests/intl_get_error_code.phpt b/ext/intl/tests/intl_get_error_code.phpt
index 6cd361ba71..797aee4fb7 100644
--- a/ext/intl/tests/intl_get_error_code.phpt
+++ b/ext/intl/tests/intl_get_error_code.phpt
@@ -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
{
diff --git a/ext/intl/tests/intl_get_error_message.phpt b/ext/intl/tests/intl_get_error_message.phpt
index f81b5c03d5..e03fb80658 100644
--- a/ext/intl/tests/intl_get_error_message.phpt
+++ b/ext/intl/tests/intl_get_error_message.phpt
@@ -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
diff --git a/ext/intl/tests/locale_accept.phpt b/ext/intl/tests/locale_accept.phpt
index a2834d8ade..6a29cd6723 100644
--- a/ext/intl/tests/locale_accept.phpt
+++ b/ext/intl/tests/locale_accept.phpt
@@ -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:
diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt
index 0016de4bb7..688e65a861 100644
--- a/ext/intl/tests/msgfmt_fail2.phpt
+++ b/ext/intl/tests/msgfmt_fail2.phpt
@@ -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'
diff --git a/ext/intl/tests/timezone_countEquivalentIDs_error.phpt b/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
index 3087f49cbe..4fc9b02a1d 100644
--- a/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
+++ b/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
@@ -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
index f2f2e021b9..0000000000
--- a/ext/intl/tests/timezone_createDefault_error.phpt
+++ /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
diff --git a/ext/intl/tests/timezone_createEnumeration_error.phpt b/ext/intl/tests/timezone_createEnumeration_error.phpt
index ea92e28d95..4e190129d4 100644
--- a/ext/intl/tests/timezone_createEnumeration_error.phpt
+++ b/ext/intl/tests/timezone_createEnumeration_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
index 5edfaeaf6b..2b847ec841 100644
--- a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_createTimeZone_error.phpt b/ext/intl/tests/timezone_createTimeZone_error.phpt
index 553223ee4c..a06f26b128 100644
--- a/ext/intl/tests/timezone_createTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_createTimeZone_error.phpt
@@ -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
diff --git a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
index f50e59f97c..54a70d1f17 100644
--- a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
@@ -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
diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt
index 684d946b1e..c1f7b6927a 100644
--- a/ext/intl/tests/timezone_getCanonicalID_error.phpt
+++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt
index 9df04f08c1..ebb0eb7776 100644
--- a/ext/intl/tests/timezone_getDSTSavings_error.phpt
+++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt
index 8d30f8840f..108530d2c3 100644
--- a/ext/intl/tests/timezone_getDisplayName_error.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_error.phpt
@@ -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')
diff --git a/ext/intl/tests/timezone_getEquivalentID_error.phpt b/ext/intl/tests/timezone_getEquivalentID_error.phpt
index facb8fe8cf..12afaee2fa 100644
--- a/ext/intl/tests/timezone_getEquivalentID_error.phpt
+++ b/ext/intl/tests/timezone_getEquivalentID_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt
index f5b06b0757..657e09b240 100644
--- a/ext/intl/tests/timezone_getErrorCode_error.phpt
+++ b/ext/intl/tests/timezone_getErrorCode_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt
index 6b8ce7d5c8..3ea812050b 100644
--- a/ext/intl/tests/timezone_getErrorMessage_error.phpt
+++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt
@@ -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
index ca478a10d1..0000000000
--- a/ext/intl/tests/timezone_getGMT_error.phpt
+++ /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
diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt
index 4d0ffeb96f..81d36b9d0b 100644
--- a/ext/intl/tests/timezone_getID_error.phpt
+++ b/ext/intl/tests/timezone_getID_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt
index d66716e552..3ae06e4ce0 100644
--- a/ext/intl/tests/timezone_getOffset_error.phpt
+++ b/ext/intl/tests/timezone_getOffset_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt
index dc7df51cca..9e0691f39d 100644
--- a/ext/intl/tests/timezone_getRawOffset_error.phpt
+++ b/ext/intl/tests/timezone_getRawOffset_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_getRegion_error.phpt b/ext/intl/tests/timezone_getRegion_error.phpt
index 7a9e1e1ca7..28fd73c1a7 100644
--- a/ext/intl/tests/timezone_getRegion_error.phpt
+++ b/ext/intl/tests/timezone_getRegion_error.phpt
@@ -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
index eab4573a36..0000000000
--- a/ext/intl/tests/timezone_getTZDataVersion_error.phpt
+++ /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
index 57773c256b..0000000000
--- a/ext/intl/tests/timezone_getUnknown_error.phpt
+++ /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
diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
index d00e78fd3a..c402dec673 100644
--- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
@@ -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)
diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt
index c6ab2eefe5..b872dcb18b 100644
--- a/ext/intl/tests/timezone_useDaylightTime_error.phpt
+++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt
@@ -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)
diff --git a/ext/intl/tests/transliterator_create_from_rule_error.phpt b/ext/intl/tests/transliterator_create_from_rule_error.phpt
index d1549ec1b6..64c57da854 100644
--- a/ext/intl/tests/transliterator_create_from_rule_error.phpt
+++ b/ext/intl/tests/transliterator_create_from_rule_error.phpt
@@ -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
diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt
index 1a1e80ba68..a7fffa62b1 100644
--- a/ext/intl/tests/transliterator_create_inverse_error.phpt
+++ b/ext/intl/tests/transliterator_create_inverse_error.phpt
@@ -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')
diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt
index e700d2b172..813c8c480e 100644
--- a/ext/intl/tests/transliterator_get_error_code_error.phpt
+++ b/ext/intl/tests/transliterator_get_error_code_error.phpt
@@ -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)
diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt
index ec8282447a..7bcc7df169 100644
--- a/ext/intl/tests/transliterator_get_error_message_error.phpt
+++ b/ext/intl/tests/transliterator_get_error_message_error.phpt
@@ -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
index fa651387f1..0000000000
--- a/ext/intl/tests/transliterator_list_ids_error.phpt
+++ /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.
diff --git a/ext/intl/tests/transliterator_transliterate_error.phpt b/ext/intl/tests/transliterator_transliterate_error.phpt
index cdddcfb87b..da9a887455 100644
--- a/ext/intl/tests/transliterator_transliterate_error.phpt
+++ b/ext/intl/tests/transliterator_transliterate_error.phpt
@@ -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
index 4e381289b3..0000000000
--- a/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt
+++ /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
diff --git a/ext/json/tests/001.phpt b/ext/json/tests/001.phpt
index e908b44349..63a303998a 100644
--- a/ext/json/tests/001.phpt
+++ b/ext/json/tests/001.phpt
@@ -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
diff --git a/ext/json/tests/json_decode_error.phpt b/ext/json/tests/json_decode_error.phpt
index 9906a2b0d4..4089a7897f 100644
--- a/ext/json/tests/json_decode_error.phpt
+++ b/ext/json/tests/json_decode_error.phpt
@@ -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
diff --git a/ext/json/tests/json_last_error_error.phpt b/ext/json/tests/json_last_error_error.phpt
index e733b32854..cd88ef8a9e 100644
--- a/ext/json/tests/json_last_error_error.phpt
+++ b/ext/json/tests/json_last_error_error.phpt
@@ -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
diff --git a/ext/json/tests/json_last_error_msg_error.phpt b/ext/json/tests/json_last_error_msg_error.phpt
index 719e9fc50c..75b06f72a2 100644
--- a/ext/json/tests/json_last_error_msg_error.phpt
+++ b/ext/json/tests/json_last_error_msg_error.phpt
@@ -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
diff --git a/ext/libxml/tests/001.phpt b/ext/libxml/tests/001.phpt
index b636ab7adc..7914ef509b 100644
--- a/ext/libxml/tests/001.phpt
+++ b/ext/libxml/tests/001.phpt
@@ -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)
diff --git a/ext/libxml/tests/004.phpt b/ext/libxml/tests/004.phpt
index 9d5121089d..9338bc90d4 100644
--- a/ext/libxml/tests/004.phpt
+++ b/ext/libxml/tests/004.phpt
@@ -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)
diff --git a/ext/libxml/tests/bug63389.phpt b/ext/libxml/tests/bug63389.phpt
index e9498aae08..df7af1b2b6 100644
--- a/ext/libxml/tests/bug63389.phpt
+++ b/ext/libxml/tests/bug63389.phpt
@@ -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
diff --git a/ext/libxml/tests/libxml_set_external_entity_loader_error1.phpt b/ext/libxml/tests/libxml_set_external_entity_loader_error1.phpt
index 40b31ea85d..9a6826ca54 100644
--- a/ext/libxml/tests/libxml_set_external_entity_loader_error1.phpt
+++ b/ext/libxml/tests/libxml_set_external_entity_loader_error1.phpt
@@ -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
diff --git a/ext/mbstring/tests/mb_convert_encoding.phpt b/ext/mbstring/tests/mb_convert_encoding.phpt
index f2fda35124..ac5d0d32a6 100644
--- a/ext/mbstring/tests/mb_convert_encoding.phpt
+++ b/ext/mbstring/tests/mb_convert_encoding.phpt
@@ -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:
diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt
index 0c8015d86d..9a8f51281b 100644
--- a/ext/mbstring/tests/mb_detect_encoding.phpt
+++ b/ext/mbstring/tests/mb_detect_encoding.phpt
@@ -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:
diff --git a/ext/mbstring/tests/mb_encoding_aliases.phpt b/ext/mbstring/tests/mb_encoding_aliases.phpt
index 8bc0453350..798bdeb5ca 100644
--- a/ext/mbstring/tests/mb_encoding_aliases.phpt
+++ b/ext/mbstring/tests/mb_encoding_aliases.phpt
@@ -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"
diff --git a/ext/mbstring/tests/mb_ereg1.phpt b/ext/mbstring/tests/mb_ereg1.phpt
index 85db1d1c98..05b3486545 100644
--- a/ext/mbstring/tests/mb_ereg1.phpt
+++ b/ext/mbstring/tests/mb_ereg1.phpt
@@ -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) {
diff --git a/ext/mbstring/tests/mb_ereg2.phpt b/ext/mbstring/tests/mb_ereg2.phpt
index 30e857eed7..22e3cd36c5 100644
--- a/ext/mbstring/tests/mb_ereg2.phpt
+++ b/ext/mbstring/tests/mb_ereg2.phpt
@@ -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
index 2ee33c9e80..0000000000
--- a/ext/mbstring/tests/mb_ereg_variation1.phpt
+++ /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
diff --git a/ext/mbstring/tests/mb_http_output.phpt b/ext/mbstring/tests/mb_http_output.phpt
index 71af8b094d..c3dab5e35f 100644
--- a/ext/mbstring/tests/mb_http_output.phpt
+++ b/ext/mbstring/tests/mb_http_output.phpt
@@ -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
diff --git a/ext/mbstring/tests/mb_internal_encoding.phpt b/ext/mbstring/tests/mb_internal_encoding.phpt
index 8b332b0594..22fe919cbc 100644
--- a/ext/mbstring/tests/mb_internal_encoding.phpt
+++ b/ext/mbstring/tests/mb_internal_encoding.phpt
@@ -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
diff --git a/ext/mbstring/tests/mb_stripos.phpt b/ext/mbstring/tests/mb_stripos.phpt
index 9da6456992..067c3f2826 100644
--- a/ext/mbstring/tests/mb_stripos.phpt
+++ b/ext/mbstring/tests/mb_stripos.phpt
@@ -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==
diff --git a/ext/mbstring/tests/mb_strlen.phpt b/ext/mbstring/tests/mb_strlen.phpt
index 3ea9ae12e6..2decf18fca 100644
--- a/ext/mbstring/tests/mb_strlen.phpt
+++ b/ext/mbstring/tests/mb_strlen.phpt
@@ -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
diff --git a/ext/mbstring/tests/mb_strpos.phpt b/ext/mbstring/tests/mb_strpos.phpt
index 9bca0ba390..c86b77e7de 100644
--- a/ext/mbstring/tests/mb_strpos.phpt
+++ b/ext/mbstring/tests/mb_strpos.phpt
@@ -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==
diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt
index dab3dfa78d..e0dd351d4c 100644
--- a/ext/mysqli/tests/057.phpt
+++ b/ext/mysqli/tests/057.phpt
@@ -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]=>
diff --git a/ext/mysqli/tests/mysqli_affected_rows.phpt b/ext/mysqli/tests/mysqli_affected_rows.phpt
index 95c3bb3426..81a7f5b6de 100644
--- a/ext/mysqli/tests/mysqli_affected_rows.phpt
+++ b/ext/mysqli/tests/mysqli_affected_rows.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt
index cc41786bdb..ea91408b60 100644
--- a/ext/mysqli/tests/mysqli_autocommit.phpt
+++ b/ext/mysqli/tests/mysqli_autocommit.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_begin_transaction.phpt b/ext/mysqli/tests/mysqli_begin_transaction.phpt
index b316ca9fe3..8a0dac8816 100644
--- a/ext/mysqli/tests/mysqli_begin_transaction.phpt
+++ b/ext/mysqli/tests/mysqli_begin_transaction.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_change_user.phpt b/ext/mysqli/tests/mysqli_change_user.phpt
index 7b9f23cf9e..bf1515e645 100644
--- a/ext/mysqli/tests/mysqli_change_user.phpt
+++ b/ext/mysqli/tests/mysqli_change_user.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_character_set_name.phpt b/ext/mysqli/tests/mysqli_character_set_name.phpt
index 90dd46fa73..4e7153e5b0 100644
--- a/ext/mysqli/tests/mysqli_character_set_name.phpt
+++ b/ext/mysqli/tests/mysqli_character_set_name.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
index 5d303fd503..4b760ec5bb 100644
--- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
+++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
@@ -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();
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
index 7367a5cd7c..b8ab4a4af5 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
@@ -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!
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
index 8fc4583a4c..3e3301361d 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
@@ -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!
diff --git a/ext/mysqli/tests/mysqli_close.phpt b/ext/mysqli/tests/mysqli_close.phpt
index a300fb8314..0110847334 100644
--- a/ext/mysqli/tests/mysqli_close.phpt
+++ b/ext/mysqli/tests/mysqli_close.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_close_oo.phpt b/ext/mysqli/tests/mysqli_close_oo.phpt
index 305d5edf88..be189ba232 100644
--- a/ext/mysqli/tests/mysqli_close_oo.phpt
+++ b/ext/mysqli/tests/mysqli_close_oo.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt
index 27ae3a928a..73a9cdf25d 100644
--- a/ext/mysqli/tests/mysqli_commit.phpt
+++ b/ext/mysqli/tests/mysqli_commit.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_connect.phpt b/ext/mysqli/tests/mysqli_connect.phpt
index 66cd94bd54..d5e4febbef 100644
--- a/ext/mysqli/tests/mysqli_connect.phpt
+++ b/ext/mysqli/tests/mysqli_connect.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_data_seek.phpt b/ext/mysqli/tests/mysqli_data_seek.phpt
index 9bc3b12f73..0859ee61d5 100644
--- a/ext/mysqli/tests/mysqli_data_seek.phpt
+++ b/ext/mysqli/tests/mysqli_data_seek.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_data_seek_oo.phpt b/ext/mysqli/tests/mysqli_data_seek_oo.phpt
index 7fb14f0956..2c4377d845 100644
--- a/ext/mysqli/tests/mysqli_data_seek_oo.phpt
+++ b/ext/mysqli/tests/mysqli_data_seek_oo.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_debug.phpt b/ext/mysqli/tests/mysqli_debug.phpt
index aa455d7f6e..478dcf7d08 100644
--- a/ext/mysqli/tests/mysqli_debug.phpt
+++ b/ext/mysqli/tests/mysqli_debug.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_dump_debug_info.phpt b/ext/mysqli/tests/mysqli_dump_debug_info.phpt
index b3fbde7fd9..d9c894dfff 100644
--- a/ext/mysqli/tests/mysqli_dump_debug_info.phpt
+++ b/ext/mysqli/tests/mysqli_dump_debug_info.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
index a0b5365432..58eb63cb2b 100644
--- a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
+++ b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
@@ -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,
diff --git a/ext/mysqli/tests/mysqli_errno.phpt b/ext/mysqli/tests/mysqli_errno.phpt
index 0a9c245341..f26a30e089 100644
--- a/ext/mysqli/tests/mysqli_errno.phpt
+++ b/ext/mysqli/tests/mysqli_errno.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_error.phpt b/ext/mysqli/tests/mysqli_error.phpt
index fd61f0f5d2..4154f45f1d 100644
--- a/ext/mysqli/tests/mysqli_error.phpt
+++ b/ext/mysqli/tests/mysqli_error.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_error_unicode.phpt b/ext/mysqli/tests/mysqli_error_unicode.phpt
index f4d8da9110..8127931882 100644
--- a/ext/mysqli/tests/mysqli_error_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_error_unicode.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt
index f9a7ee3770..9f18499454 100644
--- a/ext/mysqli/tests/mysqli_fetch_all.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_all.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt
index e9dd1602b5..775c6f20c4 100644
--- a/ext/mysqli/tests/mysqli_fetch_array.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array.phpt
@@ -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")) {
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt
index 6b98b5f51c..3097eb2bc4 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
index e4f6465176..db3457a4a0 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
@@ -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);
}
diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt
index 684795a48e..5035cf70d2 100644
--- a/ext/mysqli/tests/mysqli_fetch_field.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field.phpt
@@ -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');
diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
index be883ef625..5acc3b75d4 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
@@ -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")) {
diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
index c240050e17..c1220c7832 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
index 2293c9581a..35fdbb050e 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
@@ -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'))
diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt
index c79555c3a1..6dee8108f9 100644
--- a/ext/mysqli/tests/mysqli_fetch_fields.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt
@@ -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');
diff --git a/ext/mysqli/tests/mysqli_fetch_lengths.phpt b/ext/mysqli/tests/mysqli_fetch_lengths.phpt
index 85921f800d..b407d91894 100644
--- a/ext/mysqli/tests/mysqli_fetch_lengths.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_lengths.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt
index 09ea19161a..262b48d49f 100644
--- a/ext/mysqli/tests/mysqli_fetch_object.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object.phpt
@@ -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
diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
index d8c8cc70fd..2688f050fa 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
@@ -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
diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt
index 7ca1b9a132..c16ca1da77 100644
--- a/ext/mysqli/tests/mysqli_fetch_row.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_row.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_field_count.phpt b/ext/mysqli/tests/mysqli_field_count.phpt
index d6581c6699..18fc3c9ec1 100644
--- a/ext/mysqli/tests/mysqli_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_field_count.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt
index c34cf3f647..3cd60c7ce9 100644
--- a/ext/mysqli/tests/mysqli_field_seek.phpt
+++ b/ext/mysqli/tests/mysqli_field_seek.phpt
@@ -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"]=>
diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt
index 9885c1d9d8..0b1d3bd0c1 100644
--- a/ext/mysqli/tests/mysqli_field_tell.phpt
+++ b/ext/mysqli/tests/mysqli_field_tell.phpt
@@ -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"]=>
diff --git a/ext/mysqli/tests/mysqli_free_result.phpt b/ext/mysqli/tests/mysqli_free_result.phpt
index 6cd7778319..be377a8817 100644
--- a/ext/mysqli/tests/mysqli_free_result.phpt
+++ b/ext/mysqli/tests/mysqli_free_result.phpt
@@ -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!
diff --git a/ext/mysqli/tests/mysqli_get_charset.phpt b/ext/mysqli/tests/mysqli_get_charset.phpt
index 537809dd70..cd7cfb3ae4 100644
--- a/ext/mysqli/tests/mysqli_get_charset.phpt
+++ b/ext/mysqli/tests/mysqli_get_charset.phpt
@@ -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'))
diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt
index 07ef78f296..6df6e2bee7 100644
--- a/ext/mysqli/tests/mysqli_get_client_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
index 80875a44e6..45d09b1baf 100644
--- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt
index ada57f7d9f..534765808b 100644
--- a/ext/mysqli/tests/mysqli_get_host_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_host_info.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_get_proto_info.phpt b/ext/mysqli/tests/mysqli_get_proto_info.phpt
index b24ab11fbd..c46fe30379 100644
--- a/ext/mysqli/tests/mysqli_get_proto_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_proto_info.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_get_server_info.phpt b/ext/mysqli/tests/mysqli_get_server_info.phpt
index 3ea1b4a70d..25278528a6 100644
--- a/ext/mysqli/tests/mysqli_get_server_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_server_info.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_get_server_version.phpt b/ext/mysqli/tests/mysqli_get_server_version.phpt
index ddbf4e73bb..6589e335b4 100644
--- a/ext/mysqli/tests/mysqli_get_server_version.phpt
+++ b/ext/mysqli/tests/mysqli_get_server_version.phpt
@@ -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! */
diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt
index 56ee2cce05..b3a090b6e8 100644
--- a/ext/mysqli/tests/mysqli_info.phpt
+++ b/ext/mysqli/tests/mysqli_info.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_insert_id.phpt b/ext/mysqli/tests/mysqli_insert_id.phpt
index 7d4c0e085c..383ed087b7 100644
--- a/ext/mysqli/tests/mysqli_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_insert_id.phpt
@@ -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)))
diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt
index 85eb90e65a..7d96ac9426 100644
--- a/ext/mysqli/tests/mysqli_kill.phpt
+++ b/ext/mysqli/tests/mysqli_kill.phpt
@@ -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
diff --git a/ext/mysqli/tests/mysqli_max_links.phpt b/ext/mysqli/tests/mysqli_max_links.phpt
index f3469e20e6..8586cb9276 100644
--- a/ext/mysqli/tests/mysqli_max_links.phpt
+++ b/ext/mysqli/tests/mysqli_max_links.phpt
@@ -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!
diff --git a/ext/mysqli/tests/mysqli_more_results.phpt b/ext/mysqli/tests/mysqli_more_results.phpt
index 4ce6a19c79..50a09c0fef 100644
--- a/ext/mysqli/tests/mysqli_more_results.phpt
+++ b/ext/mysqli/tests/mysqli_more_results.phpt
@@ -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";
diff --git a/ext/mysqli/tests/mysqli_multi_query.phpt b/ext/mysqli/tests/mysqli_multi_query.phpt
index 28898b1dcb..12ffe2c38d 100644
--- a/ext/mysqli/tests/mysqli_multi_query.phpt
+++ b/ext/mysqli/tests/mysqli_multi_query.phpt
@@ -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, "")))
diff --git a/ext/mysqli/tests/mysqli_next_result.phpt b/ext/mysqli/tests/mysqli_next_result.phpt
index e01f507c20..2967d12983 100644
--- a/ext/mysqli/tests/mysqli_next_result.phpt
+++ b/ext/mysqli/tests/mysqli_next_result.phpt
@@ -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)))
diff --git a/ext/mysqli/tests/mysqli_num_fields.phpt b/ext/mysqli/tests/mysqli_num_fields.phpt
index f891b309c2..1f33b4d2d9 100644
--- a/ext/mysqli/tests/mysqli_num_fields.phpt
+++ b/ext/mysqli/tests/mysqli_num_fields.phpt
@@ -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) {
diff --git a/ext/mysqli/tests/mysqli_num_rows.phpt b/ext/mysqli/tests/mysqli_num_rows.phpt
index c6e646e4c3..15d3f90257 100644
--- a/ext/mysqli/tests/mysqli_num_rows.phpt
+++ b/ext/mysqli/tests/mysqli_num_rows.phpt
@@ -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 '.+?'!
diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt
index 6d5247943b..13590bf5a9 100644
--- a/ext/mysqli/tests/mysqli_options.phpt
+++ b/ext/mysqli/tests/mysqli_options.phpt
@@ -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'));
diff --git a/ext/mysqli/tests/mysqli_ping.phpt b/ext/mysqli/tests/mysqli_ping.phpt
index 6ddb29efef..93deeebfa3 100644
--- a/ext/mysqli/tests/mysqli_ping.phpt
+++ b/ext/mysqli/tests/mysqli_ping.phpt
@@ -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
diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt
index b9c66381f9..f6d99c8e13 100644
--- a/ext/mysqli/tests/mysqli_poll.phpt
+++ b/ext/mysqli/tests/mysqli_poll.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_prepare.phpt b/ext/mysqli/tests/mysqli_prepare.phpt
index 0c3bedf5b5..c6400e0b17 100644
--- a/ext/mysqli/tests/mysqli_prepare.phpt
+++ b/ext/mysqli/tests/mysqli_prepare.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_query.phpt b/ext/mysqli/tests/mysqli_query.phpt
index bfa703bb01..cf6d282c63 100644
--- a/ext/mysqli/tests/mysqli_query.phpt
+++ b/ext/mysqli/tests/mysqli_query.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_query_unicode.phpt b/ext/mysqli/tests/mysqli_query_unicode.phpt
index 819a849d94..f167b4373a 100644
--- a/ext/mysqli/tests/mysqli_query_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_query_unicode.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt
index 5e4b56173b..32c37b9a14 100644
--- a/ext/mysqli/tests/mysqli_real_connect.phpt
+++ b/ext/mysqli/tests/mysqli_real_connect.phpt
@@ -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");
diff --git a/ext/mysqli/tests/mysqli_real_escape_string.phpt b/ext/mysqli/tests/mysqli_real_escape_string.phpt
index 05588cac63..57ab99eb89 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
index b3465ad2b1..3db0ecce62 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt
index 9b99435d42..4515810310 100644
--- a/ext/mysqli/tests/mysqli_real_query.phpt
+++ b/ext/mysqli/tests/mysqli_real_query.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_reap_async_query.phpt b/ext/mysqli/tests/mysqli_reap_async_query.phpt
index b43b6b2478..5f13c2bbd9 100644
--- a/ext/mysqli/tests/mysqli_reap_async_query.phpt
+++ b/ext/mysqli/tests/mysqli_reap_async_query.phpt
@@ -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) {
diff --git a/ext/mysqli/tests/mysqli_release_savepoint.phpt b/ext/mysqli/tests/mysqli_release_savepoint.phpt
index bb9a77a0af..219b5975b4 100644
--- a/ext/mysqli/tests/mysqli_release_savepoint.phpt
+++ b/ext/mysqli/tests/mysqli_release_savepoint.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt
index 889fda5fbd..6215e6508c 100644
--- a/ext/mysqli/tests/mysqli_report.phpt
+++ b/ext/mysqli/tests/mysqli_report.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_rollback.phpt b/ext/mysqli/tests/mysqli_rollback.phpt
index 15fc21c16a..72a79cfcaa 100644
--- a/ext/mysqli/tests/mysqli_rollback.phpt
+++ b/ext/mysqli/tests/mysqli_rollback.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_savepoint.phpt b/ext/mysqli/tests/mysqli_savepoint.phpt
index cb0d1169c8..00e51deb6e 100644
--- a/ext/mysqli/tests/mysqli_savepoint.phpt
+++ b/ext/mysqli/tests/mysqli_savepoint.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt
index 041b7fbb22..e023866c17 100644
--- a/ext/mysqli/tests/mysqli_select_db.phpt
+++ b/ext/mysqli/tests/mysqli_select_db.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt
index df90333867..33ebb8347b 100644
--- a/ext/mysqli/tests/mysqli_set_charset.phpt
+++ b/ext/mysqli/tests/mysqli_set_charset.phpt
@@ -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'))
diff --git a/ext/mysqli/tests/mysqli_set_opt.phpt b/ext/mysqli/tests/mysqli_set_opt.phpt
index 757b8490b7..6769d2c530 100644
--- a/ext/mysqli/tests/mysqli_set_opt.phpt
+++ b/ext/mysqli/tests/mysqli_set_opt.phpt
@@ -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'));
diff --git a/ext/mysqli/tests/mysqli_sqlstate.phpt b/ext/mysqli/tests/mysqli_sqlstate.phpt
index b36291872e..55dd115403 100644
--- a/ext/mysqli/tests/mysqli_sqlstate.phpt
+++ b/ext/mysqli/tests/mysqli_sqlstate.phpt
@@ -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"
diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt
index 8463cc58b8..4f28350ef5 100644
--- a/ext/mysqli/tests/mysqli_ssl_set.phpt
+++ b/ext/mysqli/tests/mysqli_ssl_set.phpt
@@ -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.
diff --git a/ext/mysqli/tests/mysqli_stat.phpt b/ext/mysqli/tests/mysqli_stat.phpt
index 2507a4c8f8..71f7af5a54 100644
--- a/ext/mysqli/tests/mysqli_stat.phpt
+++ b/ext/mysqli/tests/mysqli_stat.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
index 1e08f0dec3..cfe5d53516 100644
--- a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
index 92937a15ce..f3634a7621 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
@@ -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;
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
index b3d60380cb..6e5710a0fc 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
@@ -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');
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
index d2d825438e..027460fc5f 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
index dcd05e5f68..c166d91c48 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
@@ -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
diff --git a/ext/mysqli/tests/mysqli_stmt_close.phpt b/ext/mysqli/tests/mysqli_stmt_close.phpt
index 6ea64e815a..dfeab7075d 100644
--- a/ext/mysqli/tests/mysqli_stmt_close.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_close.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
index f9224eef62..23ecea0be3 100644
--- a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_errno.phpt b/ext/mysqli/tests/mysqli_stmt_errno.phpt
index d98a98b87a..39760e3003 100644
--- a/ext/mysqli/tests/mysqli_stmt_errno.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_errno.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_error.phpt b/ext/mysqli/tests/mysqli_stmt_error.phpt
index ad8efef602..49e03c8aee 100644
--- a/ext/mysqli/tests/mysqli_stmt_error.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_error.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt
index d97111a6fd..fd0fd3c628 100644
--- a/ext/mysqli/tests/mysqli_stmt_execute.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_fetch.phpt b/ext/mysqli/tests/mysqli_stmt_fetch.phpt
index 4b41c9213d..25a1f52eb1 100644
--- a/ext/mysqli/tests/mysqli_stmt_fetch.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_fetch.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_stmt_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_field_count.phpt
index 847fe04a3b..2fa8a8ac80 100644
--- a/ext/mysqli/tests/mysqli_stmt_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_field_count.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_stmt_free_result.phpt b/ext/mysqli/tests/mysqli_stmt_free_result.phpt
index 292905ab63..9d28d8a116 100644
--- a/ext/mysqli/tests/mysqli_stmt_free_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_free_result.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result.phpt b/ext/mysqli/tests/mysqli_stmt_get_result.phpt
index e8f2843920..594e112cac 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
index 00ed7adee4..ab261bd82b 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
index 51198523c9..c63a91487b 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
@@ -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
diff --git a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
index 1ebe6d051f..958a278554 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_init.phpt b/ext/mysqli/tests/mysqli_stmt_init.phpt
index b82a855dd2..c16f708fe6 100644
--- a/ext/mysqli/tests/mysqli_stmt_init.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_init.phpt
@@ -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!
diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
index e3ef9a25ec..fedf305650 100644
--- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
index 5355b3deb7..f798e22f71 100644
--- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_param_count.phpt b/ext/mysqli/tests/mysqli_stmt_param_count.phpt
index e847d165f6..4176de60c5 100644
--- a/ext/mysqli/tests/mysqli_stmt_param_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_param_count.phpt
@@ -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--
diff --git a/ext/mysqli/tests/mysqli_stmt_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_prepare.phpt
index d0e38075d9..52c7597ef6 100644
--- a/ext/mysqli/tests/mysqli_stmt_prepare.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_prepare.phpt
@@ -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);
diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt
index b7ec4e3ed7..339b885b72 100644
--- a/ext/mysqli/tests/mysqli_stmt_reset.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
index 8f4e13ef39..adb7f6f726 100644
--- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
@@ -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!";
?>
diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
index 1fc2745511..b42e393503 100644
--- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
@@ -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!";
?>
diff --git a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
index 1784106162..2740195931 100644
--- a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt
index 89b8ed3bf8..a6634e56f9 100644
--- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt
@@ -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));
diff --git a/ext/mysqli/tests/mysqli_store_result.phpt b/ext/mysqli/tests/mysqli_store_result.phpt
index b87d147e38..5ee8a14f6b 100644
--- a/ext/mysqli/tests/mysqli_store_result.phpt
+++ b/ext/mysqli/tests/mysqli_store_result.phpt
@@ -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"))
diff --git a/ext/mysqli/tests/mysqli_thread_id.phpt b/ext/mysqli/tests/mysqli_thread_id.phpt
index 4a71d60f41..f8e286b54c 100644
--- a/ext/mysqli/tests/mysqli_thread_id.phpt
+++ b/ext/mysqli/tests/mysqli_thread_id.phpt
@@ -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))
diff --git a/ext/mysqli/tests/mysqli_use_result.phpt b/ext/mysqli/tests/mysqli_use_result.phpt
index 190cafa5d5..650a130c89 100644
--- a/ext/mysqli/tests/mysqli_use_result.phpt
+++ b/ext/mysqli/tests/mysqli_use_result.phpt
@@ -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"))
diff --git a/ext/mysqli/tests/mysqli_warning_count.phpt b/ext/mysqli/tests/mysqli_warning_count.phpt
index 9d59f26e52..5e6a2e2381 100644
--- a/ext/mysqli/tests/mysqli_warning_count.phpt
+++ b/ext/mysqli/tests/mysqli_warning_count.phpt
@@ -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));
diff --git a/ext/odbc/tests/odbc_free_result_001.phpt b/ext/odbc/tests/odbc_free_result_001.phpt
index cdc421117d..e17b4de1b9 100644
--- a/ext/odbc/tests/odbc_free_result_001.phpt
+++ b/ext/odbc/tests/odbc_free_result_001.phpt
@@ -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)
diff --git a/ext/opcache/tests/bug70207.phpt b/ext/opcache/tests/bug70207.phpt
index c684ee6d33..806ea7535b 100644
--- a/ext/opcache/tests/bug70207.phpt
+++ b/ext/opcache/tests/bug70207.phpt
@@ -14,7 +14,7 @@ function bar() {
}
function foo() {
try { return bar(); }
- finally { @fclose(null); }
+ finally { @str_repeat("foo", -10); }
}
var_dump(foo());
diff --git a/ext/openssl/tests/bug38255.phpt b/ext/openssl/tests/bug38255.phpt
index f49b77485c..03f9f29a03 100644
--- a/ext/openssl/tests/bug38255.phpt
+++ b/ext/openssl/tests/bug38255.phpt
@@ -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
diff --git a/ext/openssl/tests/bug38261.phpt b/ext/openssl/tests/bug38261.phpt
index fa25d93d62..41a881cc86 100644
--- a/ext/openssl/tests/bug38261.phpt
+++ b/ext/openssl/tests/bug38261.phpt
@@ -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
diff --git a/ext/openssl/tests/openssl_csr_export_bacis.phpt b/ext/openssl/tests/openssl_csr_export_bacis.phpt
index 228a173764..e9c89d6c01 100644
--- a/ext/openssl/tests/openssl_csr_export_bacis.phpt
+++ b/ext/openssl/tests/openssl_csr_export_bacis.phpt
@@ -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)
diff --git a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt
index ccbd00f49a..a0c50fc5a1 100644
--- a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt
+++ b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt
@@ -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)
diff --git a/ext/openssl/tests/openssl_csr_new_basic.phpt b/ext/openssl/tests/openssl_csr_new_basic.phpt
index 816c6f9d90..1fadc00f27 100644
--- a/ext/openssl/tests/openssl_csr_new_basic.phpt
+++ b/ext/openssl/tests/openssl_csr_new_basic.phpt
@@ -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
diff --git a/ext/openssl/tests/openssl_csr_sign_basic.phpt b/ext/openssl/tests/openssl_csr_sign_basic.phpt
index 57c9e75c0e..c585eb14f6 100644
--- a/ext/openssl/tests/openssl_csr_sign_basic.phpt
+++ b/ext/openssl/tests/openssl_csr_sign_basic.phpt
@@ -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)
diff --git a/ext/openssl/tests/openssl_decrypt_error.phpt b/ext/openssl/tests/openssl_decrypt_error.phpt
index be40f8080f..5f79cd86c2 100644
--- a/ext/openssl/tests/openssl_decrypt_error.phpt
+++ b/ext/openssl/tests/openssl_decrypt_error.phpt
@@ -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="
diff --git a/ext/openssl/tests/openssl_encrypt_error.phpt b/ext/openssl/tests/openssl_encrypt_error.phpt
index ea39bff604..53bc371f46 100644
--- a/ext/openssl/tests/openssl_encrypt_error.phpt
+++ b/ext/openssl/tests/openssl_encrypt_error.phpt
@@ -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="
diff --git a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt
index 2132b402aa..099596c033 100644
--- a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt
@@ -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
diff --git a/ext/openssl/tests/openssl_pkcs7_read_basic.phpt b/ext/openssl/tests/openssl_pkcs7_read_basic.phpt
index 64c7c2c130..9ee745434d 100644
--- a/ext/openssl/tests/openssl_pkcs7_read_basic.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_read_basic.phpt
@@ -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)
diff --git a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
index 0e29901c7e..bd8bb48464 100644
--- a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
@@ -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
diff --git a/ext/openssl/tests/openssl_pkey_new_error.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt
index c7dc193d53..9249f252d8 100644
--- a/ext/openssl/tests/openssl_pkey_new_error.phpt
+++ b/ext/openssl/tests/openssl_pkey_new_error.phpt
@@ -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
diff --git a/ext/openssl/tests/openssl_seal_basic.phpt b/ext/openssl/tests/openssl_seal_basic.phpt
index 1899ebac3b..c3c79214fe 100644
--- a/ext/openssl/tests/openssl_seal_basic.phpt
+++ b/ext/openssl/tests/openssl_seal_basic.phpt
@@ -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)
diff --git a/ext/openssl/tests/openssl_sign_basic.phpt b/ext/openssl/tests/openssl_sign_basic.phpt
index 0200e5ba6e..36655dd61a 100644
--- a/ext/openssl/tests/openssl_sign_basic.phpt
+++ b/ext/openssl/tests/openssl_sign_basic.phpt
@@ -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
diff --git a/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt
index ceaafc2234..fa3fce36ab 100644
--- a/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt
+++ b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt
@@ -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 **
diff --git a/ext/openssl/tests/openssl_x509_free_basic.phpt b/ext/openssl/tests/openssl_x509_free_basic.phpt
index 663adccc2c..59acb090c3 100644
--- a/ext/openssl/tests/openssl_x509_free_basic.phpt
+++ b/ext/openssl/tests/openssl_x509_free_basic.phpt
@@ -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
diff --git a/ext/pcntl/tests/pcntl_alarm.phpt b/ext/pcntl/tests/pcntl_alarm.phpt
index a9cae1616b..337ba3ad4b 100644
--- a/ext/pcntl/tests/pcntl_alarm.phpt
+++ b/ext/pcntl/tests/pcntl_alarm.phpt
@@ -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)
diff --git a/ext/pcntl/tests/pcntl_exec_3.phpt b/ext/pcntl/tests/pcntl_exec_3.phpt
index 5349381d92..7d7f6b5271 100644
--- a/ext/pcntl/tests/pcntl_exec_3.phpt
+++ b/ext/pcntl/tests/pcntl_exec_3.phpt
@@ -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)
diff --git a/ext/pcntl/tests/pcntl_signal.phpt b/ext/pcntl/tests/pcntl_signal.phpt
index a6441935c1..5bba18c2a0 100644
--- a/ext/pcntl/tests/pcntl_signal.phpt
+++ b/ext/pcntl/tests/pcntl_signal.phpt
@@ -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
diff --git a/ext/pcntl/tests/pcntl_wait.phpt b/ext/pcntl/tests/pcntl_wait.phpt
index d5ab709b76..c745a21dc7 100644
--- a/ext/pcntl/tests/pcntl_wait.phpt
+++ b/ext/pcntl/tests/pcntl_wait.phpt
@@ -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
diff --git a/ext/pcre/tests/002.phpt b/ext/pcre/tests/002.phpt
index d4780447bc..073a7a8d56 100644
--- a/ext/pcre/tests/002.phpt
+++ b/ext/pcre/tests/002.phpt
@@ -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
diff --git a/ext/pcre/tests/grep2.phpt b/ext/pcre/tests/grep2.phpt
index a739cb60ac..5aee98b9e4 100644
--- a/ext/pcre/tests/grep2.phpt
+++ b/ext/pcre/tests/grep2.phpt
@@ -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]=>
diff --git a/ext/pcre/tests/preg_grep_error1.phpt b/ext/pcre/tests/preg_grep_error1.phpt
index fcc36e7d91..79fcb98897 100644
--- a/ext/pcre/tests/preg_grep_error1.phpt
+++ b/ext/pcre/tests/preg_grep_error1.phpt
@@ -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
diff --git a/ext/pcre/tests/preg_match_all_error1.phpt b/ext/pcre/tests/preg_match_all_error1.phpt
index 95ab905d7d..bd0f28c8c4 100644
--- a/ext/pcre/tests/preg_match_all_error1.phpt
+++ b/ext/pcre/tests/preg_match_all_error1.phpt
@@ -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
diff --git a/ext/pcre/tests/preg_match_all_error2.phpt b/ext/pcre/tests/preg_match_all_error2.phpt
index 1c55cce64e..8c52b73076 100644
--- a/ext/pcre/tests/preg_match_all_error2.phpt
+++ b/ext/pcre/tests/preg_match_all_error2.phpt
@@ -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
diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt
index 42bb5abd27..23d6829c48 100644
--- a/ext/pcre/tests/preg_match_error1.phpt
+++ b/ext/pcre/tests/preg_match_error1.phpt
@@ -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
diff --git a/ext/pcre/tests/preg_match_error2.phpt b/ext/pcre/tests/preg_match_error2.phpt
index cb0917a228..9530983e81 100644
--- a/ext/pcre/tests/preg_match_error2.phpt
+++ b/ext/pcre/tests/preg_match_error2.phpt
@@ -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
diff --git a/ext/pcre/tests/preg_replace_callback3.phpt b/ext/pcre/tests/preg_replace_callback3.phpt
index f5c87176f9..842dfacb39 100644
--- a/ext/pcre/tests/preg_replace_callback3.phpt
+++ b/ext/pcre/tests/preg_replace_callback3.phpt
@@ -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
diff --git a/ext/pcre/tests/preg_replace_callback_array2.phpt b/ext/pcre/tests/preg_replace_callback_array2.phpt
index f2f20ef645..03d7a60eee 100644
--- a/ext/pcre/tests/preg_replace_callback_array2.phpt
+++ b/ext/pcre/tests/preg_replace_callback_array2.phpt
@@ -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) {
}
diff --git a/ext/pcre/tests/preg_split_error1.phpt b/ext/pcre/tests/preg_split_error1.phpt
index 79942a9480..1c1e3ec646 100644
--- a/ext/pcre/tests/preg_split_error1.phpt
+++ b/ext/pcre/tests/preg_split_error1.phpt
@@ -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
diff --git a/ext/pcre/tests/split.phpt b/ext/pcre/tests/split.phpt
index c87d1b03a9..df4b9af92f 100644
--- a/ext/pcre/tests/split.phpt
+++ b/ext/pcre/tests/split.phpt
@@ -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]=>
diff --git a/ext/pcre/tests/split2.phpt b/ext/pcre/tests/split2.phpt
index b0411e6df2..f4fd60022e 100644
--- a/ext/pcre/tests/split2.phpt
+++ b/ext/pcre/tests/split2.phpt
@@ -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]=>
diff --git a/ext/pdo/tests/bug_44173.phpt b/ext/pdo/tests/bug_44173.phpt
index aab73d87a6..7d4111144f 100644
--- a/ext/pdo/tests/bug_44173.phpt
+++ b/ext/pdo/tests/bug_44173.phpt
@@ -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
index 5a371f02bc..0000000000
--- a/ext/pdo/tests/pdo_drivers_error.phpt
+++ /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
diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
index e280ded294..d733a2b544 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
@@ -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));
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt
index 10ccba2291..07ad3d9d33 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt
@@ -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");
diff --git a/ext/pgsql/tests/01createdb.phpt b/ext/pgsql/tests/01createdb.phpt
index aa2e43748f..45062c3b49 100644
--- a/ext/pgsql/tests/01createdb.phpt
+++ b/ext/pgsql/tests/01createdb.phpt
@@ -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
}
diff --git a/ext/phar/tests/002.phpt b/ext/phar/tests/002.phpt
index 41cb9be716..cfd8cc5e66 100644
--- a/ext/phar/tests/002.phpt
+++ b/ext/phar/tests/002.phpt
@@ -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)
diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt
index e8ddb1f62a..bf9c5d5696 100644
--- a/ext/phar/tests/badparameters.phpt
+++ b/ext/phar/tests/badparameters.phpt
@@ -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===
diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt
index 4439fcf792..aa2d17182c 100644
--- a/ext/phar/tests/bug64931/bug64931.phpt
+++ b/ext/phar/tests/bug64931/bug64931.phpt
@@ -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===
diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt
index fd200d8613..c10d19c711 100644
--- a/ext/phar/tests/create_path_error.phpt
+++ b/ext/phar/tests/create_path_error.phpt
@@ -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===
diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt
index b75601a07b..d061cf3c91 100644
--- a/ext/phar/tests/fgc_edgecases.phpt
+++ b/ext/phar/tests/fgc_edgecases.phpt
@@ -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__));
diff --git a/ext/phar/tests/fopen.phpt b/ext/phar/tests/fopen.phpt
index b55bc59c84..9f9022cc8d 100644
--- a/ext/phar/tests/fopen.phpt
+++ b/ext/phar/tests/fopen.phpt
@@ -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===
diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt
index 4ac529a4e0..2c70e17352 100644
--- a/ext/phar/tests/fopen_edgecases2.phpt
+++ b/ext/phar/tests/fopen_edgecases2.phpt
@@ -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
diff --git a/ext/phar/tests/open_for_write_existing_b.phpt b/ext/phar/tests/open_for_write_existing_b.phpt
index ce59d9824f..edd5a65048 100644
--- a/ext/phar/tests/open_for_write_existing_b.phpt
+++ b/ext/phar/tests/open_for_write_existing_b.phpt
@@ -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===
diff --git a/ext/phar/tests/open_for_write_existing_c.phpt b/ext/phar/tests/open_for_write_existing_c.phpt
index eb0c27bf64..5c389956fa 100644
--- a/ext/phar/tests/open_for_write_existing_c.phpt
+++ b/ext/phar/tests/open_for_write_existing_c.phpt
@@ -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===
diff --git a/ext/phar/tests/open_for_write_newfile_b.phpt b/ext/phar/tests/open_for_write_newfile_b.phpt
index 53b31e03d5..775b90b1bb 100644
--- a/ext/phar/tests/open_for_write_newfile_b.phpt
+++ b/ext/phar/tests/open_for_write_newfile_b.phpt
@@ -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
diff --git a/ext/phar/tests/open_for_write_newfile_c.phpt b/ext/phar/tests/open_for_write_newfile_c.phpt
index 8275c02baa..2b313ebf90 100644
--- a/ext/phar/tests/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/open_for_write_newfile_c.phpt
@@ -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
diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt
index be899df81b..68ea62d3c3 100644
--- a/ext/phar/tests/opendir_edgecases.phpt
+++ b/ext/phar/tests/opendir_edgecases.phpt
@@ -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
diff --git a/ext/phar/tests/phar_bz2.phpt b/ext/phar/tests/phar_bz2.phpt
index c269a8b34f..7da4c97493 100644
--- a/ext/phar/tests/phar_bz2.phpt
+++ b/ext/phar/tests/phar_bz2.phpt
@@ -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===
diff --git a/ext/phar/tests/phar_decompress.phpt b/ext/phar/tests/phar_decompress.phpt
index 3344d9bbbd..3a76fb12e8 100644
--- a/ext/phar/tests/phar_decompress.phpt
+++ b/ext/phar/tests/phar_decompress.phpt
@@ -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===
diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt
index f7d1403d59..2d1091dbac 100644
--- a/ext/phar/tests/phar_extract.phpt
+++ b/ext/phar/tests/phar_extract.phpt
@@ -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
diff --git a/ext/phar/tests/phar_isvalidpharfilename.phpt b/ext/phar/tests/phar_isvalidpharfilename.phpt
index a59f498b95..84d2e757e9 100644
--- a/ext/phar/tests/phar_isvalidpharfilename.phpt
+++ b/ext/phar/tests/phar_isvalidpharfilename.phpt
@@ -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)
diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt
index de9b499a83..b71ecda23d 100644
--- a/ext/phar/tests/phar_oo_006.phpt
+++ b/ext/phar/tests/phar_oo_006.phpt
@@ -23,7 +23,7 @@ try
{
$phar->setFileClass('SplFileInfo');
}
-catch (UnexpectedValueException $e)
+catch (TypeError $e)
{
echo $e->getMessage() . "\n";
}
diff --git a/ext/phar/tests/phar_running.phpt b/ext/phar/tests/phar_running.phpt
index 25acf82285..194946b498 100644
--- a/ext/phar/tests/phar_running.phpt
+++ b/ext/phar/tests/phar_running.phpt
@@ -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) ""
diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt
index 98001fcbf0..9e7d0f2383 100644
--- a/ext/phar/tests/phar_unlinkarchive.phpt
+++ b/ext/phar/tests/phar_unlinkarchive.phpt
@@ -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()
diff --git a/ext/phar/tests/pharfileinfo_chmod.phpt b/ext/phar/tests/pharfileinfo_chmod.phpt
index 23ce5c914a..6a6b07b4d1 100644
--- a/ext/phar/tests/pharfileinfo_chmod.phpt
+++ b/ext/phar/tests/pharfileinfo_chmod.phpt
@@ -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===
diff --git a/ext/phar/tests/pharfileinfo_compression.phpt b/ext/phar/tests/pharfileinfo_compression.phpt
index 9f5480be4f..dbf9e8fa38 100644
--- a/ext/phar/tests/pharfileinfo_compression.phpt
+++ b/ext/phar/tests/pharfileinfo_compression.phpt
@@ -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
diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt
index 8fb6935f26..1dc3ab9118 100644
--- a/ext/phar/tests/pharfileinfo_setmetadata.phpt
+++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt
@@ -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===
diff --git a/ext/phar/tests/readfile_edgecases.phpt b/ext/phar/tests/readfile_edgecases.phpt
index f6a0dc65b9..20617c6b28 100644
--- a/ext/phar/tests/readfile_edgecases.phpt
+++ b/ext/phar/tests/readfile_edgecases.phpt
@@ -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__));
diff --git a/ext/phar/tests/stat2_5.3.phpt b/ext/phar/tests/stat2_5.3.phpt
index 99f658fa78..de21dd5c08 100644
--- a/ext/phar/tests/stat2_5.3.phpt
+++ b/ext/phar/tests/stat2_5.3.phpt
@@ -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)
diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt
index 4c67def631..0bd97d55ba 100644
--- a/ext/phar/tests/tar/open_for_write_existing_b.phpt
+++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt
@@ -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===
diff --git a/ext/phar/tests/tar/open_for_write_existing_c.phpt b/ext/phar/tests/tar/open_for_write_existing_c.phpt
index 9e73f1e899..d3c12b8e05 100644
--- a/ext/phar/tests/tar/open_for_write_existing_c.phpt
+++ b/ext/phar/tests/tar/open_for_write_existing_c.phpt
@@ -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===
diff --git a/ext/phar/tests/tar/open_for_write_newfile_b.phpt b/ext/phar/tests/tar/open_for_write_newfile_b.phpt
index 5c57587234..657782fb38 100644
--- a/ext/phar/tests/tar/open_for_write_newfile_b.phpt
+++ b/ext/phar/tests/tar/open_for_write_newfile_b.phpt
@@ -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
diff --git a/ext/phar/tests/tar/open_for_write_newfile_c.phpt b/ext/phar/tests/tar/open_for_write_newfile_c.phpt
index b5078426fe..0a65086cc7 100644
--- a/ext/phar/tests/tar/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/tar/open_for_write_newfile_c.phpt
@@ -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
diff --git a/ext/phar/tests/zip/open_for_write_existing_b.phpt b/ext/phar/tests/zip/open_for_write_existing_b.phpt
index 789067eb29..9527583b19 100644
--- a/ext/phar/tests/zip/open_for_write_existing_b.phpt
+++ b/ext/phar/tests/zip/open_for_write_existing_b.phpt
@@ -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===
diff --git a/ext/phar/tests/zip/open_for_write_existing_c.phpt b/ext/phar/tests/zip/open_for_write_existing_c.phpt
index adcb50ff93..a115985ca3 100644
--- a/ext/phar/tests/zip/open_for_write_existing_c.phpt
+++ b/ext/phar/tests/zip/open_for_write_existing_c.phpt
@@ -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===
diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt
index 134bb4f0dd..30e33293af 100644
--- a/ext/phar/tests/zip/open_for_write_newfile_b.phpt
+++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt
@@ -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
diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
index 86e33da7c9..415547d5a1 100644
--- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
@@ -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
index 0a77fb0009..0000000000
--- a/ext/posix/tests/posix_errno_error.phpt
+++ /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
diff --git a/ext/posix/tests/posix_getcwd.phpt b/ext/posix/tests/posix_getcwd.phpt
index 20f7b0372e..f6f180925a 100644
--- a/ext/posix/tests/posix_getcwd.phpt
+++ b/ext/posix/tests/posix_getcwd.phpt
@@ -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
diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt
index ef7fa57a9d..e9dbe2a6ce 100644
--- a/ext/posix/tests/posix_getgrgid_error.phpt
+++ b/ext/posix/tests/posix_getgrgid_error.phpt
@@ -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
diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt
index 88d68554ee..19e306b2ee 100644
--- a/ext/posix/tests/posix_getpgid_error.phpt
+++ b/ext/posix/tests/posix_getpgid_error.phpt
@@ -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
diff --git a/ext/posix/tests/posix_getpwuid_error.phpt b/ext/posix/tests/posix_getpwuid_error.phpt
index 440edf6a76..365033b689 100644
--- a/ext/posix/tests/posix_getpwuid_error.phpt
+++ b/ext/posix/tests/posix_getpwuid_error.phpt
@@ -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
diff --git a/ext/posix/tests/posix_getsid_error.phpt b/ext/posix/tests/posix_getsid_error.phpt
index 6013a40b96..833ae9a0db 100644
--- a/ext/posix/tests/posix_getsid_error.phpt
+++ b/ext/posix/tests/posix_getsid_error.phpt
@@ -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===
diff --git a/ext/posix/tests/posix_initgroups.phpt b/ext/posix/tests/posix_initgroups.phpt
index 5b0ec8adad..20cf8cef8b 100644
--- a/ext/posix/tests/posix_initgroups.phpt
+++ b/ext/posix/tests/posix_initgroups.phpt
@@ -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)
diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt
index 0c8f6ef642..89474c4994 100644
--- a/ext/posix/tests/posix_kill_error.phpt
+++ b/ext/posix/tests/posix_kill_error.phpt
@@ -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
index 4224bafa82..0000000000
--- a/ext/posix/tests/posix_seteuid_variation4.phpt
+++ /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
index d85b5a900a..0000000000
--- a/ext/posix/tests/posix_setgid_variation4.phpt
+++ /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
index 7423ba324e..0000000000
--- a/ext/posix/tests/posix_setuid_variation4.phpt
+++ /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)
diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt
index 3007f976c6..60b096656a 100644
--- a/ext/posix/tests/posix_strerror_error.phpt
+++ b/ext/posix/tests/posix_strerror_error.phpt
@@ -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
diff --git a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
index 158a2d0ca7..ba340db300 100644
--- a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
+++ b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
@@ -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
diff --git a/ext/pspell/tests/002.phpt b/ext/pspell/tests/002.phpt
index 1b0dc2cdfa..538775d013 100644
--- a/ext/pspell/tests/002.phpt
+++ b/ext/pspell/tests/002.phpt
@@ -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)
diff --git a/ext/readline/tests/libedit_callback_handler_install_001.phpt b/ext/readline/tests/libedit_callback_handler_install_001.phpt
index b5d921e279..fb69ba5cb0 100644
--- a/ext/readline/tests/libedit_callback_handler_install_001.phpt
+++ b/ext/readline/tests/libedit_callback_handler_install_001.phpt
@@ -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
diff --git a/ext/readline/tests/readline_add_history_001.phpt b/ext/readline/tests/readline_add_history_001.phpt
index a4bd524736..fe7c8c406e 100644
--- a/ext/readline/tests/readline_add_history_001.phpt
+++ b/ext/readline/tests/readline_add_history_001.phpt
@@ -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
diff --git a/ext/readline/tests/readline_callback_handler_install_001.phpt b/ext/readline/tests/readline_callback_handler_install_001.phpt
index cc054b0aa6..9dd13b4de1 100644
--- a/ext/readline/tests/readline_callback_handler_install_001.phpt
+++ b/ext/readline/tests/readline_callback_handler_install_001.phpt
@@ -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
diff --git a/ext/readline/tests/readline_clear_history_001.phpt b/ext/readline/tests/readline_clear_history_001.phpt
index 5df1ae77a0..8dea376ccf 100644
--- a/ext/readline/tests/readline_clear_history_001.phpt
+++ b/ext/readline/tests/readline_clear_history_001.phpt
@@ -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
diff --git a/ext/readline/tests/readline_list_history_001.phpt b/ext/readline/tests/readline_list_history_001.phpt
index 2f6f9525d2..37e1b0af17 100644
--- a/ext/readline/tests/readline_list_history_001.phpt
+++ b/ext/readline/tests/readline_list_history_001.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt
index c463bb72c1..05825ba97e 100644
--- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt
index 5260e719a3..020ac6f7f5 100644
--- a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt
+++ b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
index 1eb084214b..424550f67a 100644
--- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_getParentClass.phpt b/ext/reflection/tests/ReflectionClass_getParentClass.phpt
index 382948d3d3..ef64de5ecb 100644
--- a/ext/reflection/tests/ReflectionClass_getParentClass.phpt
+++ b/ext/reflection/tests/ReflectionClass_getParentClass.phpt
@@ -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
index be50dbb730..0000000000
--- a/ext/reflection/tests/ReflectionClass_getParentClass_001.phpt
+++ /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
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
index 68522e097a..d9a2ebcd71 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
index 52fa378eb6..7c071e5ba0 100644
--- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
index 14c847401d..257d9aa9da 100644
--- a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
index 63fe8791fc..77f2865a31 100644
--- a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
index 753890394f..a1bbb9e73c 100644
--- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
index 91398867ec..b0deab33da 100644
--- a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
index 10a86d9136..af4ce9d2f4 100644
--- a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
index 368ea7d7ec..03d17e223e 100644
--- a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
index fb472681ca..6d3cf3a44f 100644
--- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionMethod_006.phpt b/ext/reflection/tests/ReflectionMethod_006.phpt
index 627dc96f32..81f8116d77 100644
--- a/ext/reflection/tests/ReflectionMethod_006.phpt
+++ b/ext/reflection/tests/ReflectionMethod_006.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
index d3b9ca3c81..d1e7ee68fb 100644
--- a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
@@ -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===
diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
index d1a19c7116..d867993599 100644
--- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
index 0c87a66153..156cc9db52 100644
--- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
index 0a2b15fb83..6711feb4ac 100644
--- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt
index 411299f0c7..4fa86eb363 100644
--- a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt
+++ b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt
@@ -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"
diff --git a/ext/reflection/tests/ReflectionObject_getName_basic.phpt b/ext/reflection/tests/ReflectionObject_getName_basic.phpt
index 68cea6a1cd..1885695cb1 100644
--- a/ext/reflection/tests/ReflectionObject_getName_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_getName_basic.phpt
@@ -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"
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
index f05197ebaf..a2484f9dc2 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
index 11994ed705..582bcffe65 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionProperty_error.phpt b/ext/reflection/tests/ReflectionProperty_error.phpt
index c8a2f11ee1..a7fdff5000 100644
--- a/ext/reflection/tests/ReflectionProperty_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_error.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionProperty_export_error.phpt b/ext/reflection/tests/ReflectionProperty_export_error.phpt
index ab09ed01f0..5acf9de6c3 100644
--- a/ext/reflection/tests/ReflectionProperty_export_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_export_error.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt b/ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt
index c7c9366471..7ee787a348 100644
--- a/ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
index 3bca85e4b6..52e9d1d2ef 100644
--- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt b/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt
index 2aa630d9d0..1472615178 100644
--- a/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt
+++ b/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt
@@ -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
diff --git a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
index 0bf223daa7..f58590b3ea 100644
--- a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
@@ -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
diff --git a/ext/reflection/tests/request38992.phpt b/ext/reflection/tests/request38992.phpt
index 8c0052fd85..e6eab83415 100644
--- a/ext/reflection/tests/request38992.phpt
+++ b/ext/reflection/tests/request38992.phpt
@@ -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
diff --git a/ext/session/tests/session_cache_limiter_error.phpt b/ext/session/tests/session_cache_limiter_error.phpt
index 42b2cb0694..284649e277 100644
--- a/ext/session/tests/session_cache_limiter_error.phpt
+++ b/ext/session/tests/session_cache_limiter_error.phpt
@@ -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
diff --git a/ext/session/tests/session_set_save_handler_class_012.phpt b/ext/session/tests/session_set_save_handler_class_012.phpt
index b7bcc3fca6..f0a9139ade 100644
--- a/ext/session/tests/session_set_save_handler_class_012.phpt
+++ b/ext/session/tests/session_set_save_handler_class_012.phpt
@@ -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
diff --git a/ext/session/tests/session_set_save_handler_class_013.phpt b/ext/session/tests/session_set_save_handler_class_013.phpt
index 28e49c9f98..79c732f30c 100644
--- a/ext/session/tests/session_set_save_handler_class_013.phpt
+++ b/ext/session/tests/session_set_save_handler_class_013.phpt
@@ -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
diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt
index bc9f801a5e..cf01d8badb 100644
--- a/ext/session/tests/session_set_save_handler_iface_002.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_002.phpt
@@ -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
diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt
index 3206f90776..a06f454445 100644
--- a/ext/shmop/tests/002.phpt
+++ b/ext/shmop/tests/002.phpt
@@ -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
index 8682cf818d..0000000000
--- a/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt
+++ /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
diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt
index 0af93deaf3..d20fbd5aca 100644
--- a/ext/simplexml/tests/bug37565.phpt
+++ b/ext/simplexml/tests/bug37565.phpt
@@ -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===
diff --git a/ext/soap/tests/bug77088.phpt b/ext/soap/tests/bug77088.phpt
index 413529bcaa..e6f5e7582e 100644
--- a/ext/soap/tests/bug77088.phpt
+++ b/ext/soap/tests/bug77088.phpt
@@ -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/"
}
diff --git a/ext/soap/tests/bugs/bug31422.phpt b/ext/soap/tests/bugs/bug31422.phpt
index 4889b10d8e..152781a4ec 100644
--- a/ext/soap/tests/bugs/bug31422.phpt
+++ b/ext/soap/tests/bugs/bug31422.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt
index 94c38de1cb..f1fdf55a81 100644
--- a/ext/sockets/tests/socket_connect_params.phpt
+++ b/ext/sockets/tests/socket_connect_params.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_create_listen_used.phpt b/ext/sockets/tests/socket_create_listen_used.phpt
index b41e2caefc..2dfec4fbf7 100644
--- a/ext/sockets/tests/socket_create_listen_used.phpt
+++ b/ext/sockets/tests/socket_create_listen_used.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
index 554819ac99..5cf054458a 100644
--- a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
+++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
index 856d2cdc52..41154620ad 100644
--- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt
+++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
@@ -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)
diff --git a/ext/sockets/tests/socket_export_stream-2.phpt b/ext/sockets/tests/socket_export_stream-2.phpt
index d3db5e36c8..fb89bd28d7 100644
--- a/ext/sockets/tests/socket_export_stream-2.phpt
+++ b/ext/sockets/tests/socket_export_stream-2.phpt
@@ -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)
diff --git a/ext/sockets/tests/socket_import_stream-2.phpt b/ext/sockets/tests/socket_import_stream-2.phpt
index e1fada608e..8464b46039 100644
--- a/ext/sockets/tests/socket_import_stream-2.phpt
+++ b/ext/sockets/tests/socket_import_stream-2.phpt
@@ -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)
diff --git a/ext/sockets/tests/socket_listen-wrongparams.phpt b/ext/sockets/tests/socket_listen-wrongparams.phpt
index 41d7ac1f10..b5715a5ff5 100644
--- a/ext/sockets/tests/socket_listen-wrongparams.phpt
+++ b/ext/sockets/tests/socket_listen-wrongparams.phpt
@@ -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--
diff --git a/ext/sockets/tests/socket_read_params.phpt b/ext/sockets/tests/socket_read_params.phpt
index acf1d2f35d..4d462ce3a7 100644
--- a/ext/sockets/tests/socket_read_params.phpt
+++ b/ext/sockets/tests/socket_read_params.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_select-wrongparams-2.phpt b/ext/sockets/tests/socket_select-wrongparams-2.phpt
index c149973e70..a7c423df1b 100644
--- a/ext/sockets/tests/socket_select-wrongparams-2.phpt
+++ b/ext/sockets/tests/socket_select-wrongparams-2.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt b/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
index 689421011e..0720b319b7 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
@@ -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>
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp-win32.phpt b/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp-win32.phpt
index 8754028f84..fbc4da3861 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp-win32.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp-win32.phpt
@@ -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>
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt b/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt
index bd07904277..ef44109b81 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt
@@ -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>
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
index e25bf4df1a..600cbea595 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
@@ -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--
diff --git a/ext/sockets/tests/socket_strerror.phpt b/ext/sockets/tests/socket_strerror.phpt
index aef56e5a84..4f1237e890 100644
--- a/ext/sockets/tests/socket_strerror.phpt
+++ b/ext/sockets/tests/socket_strerror.phpt
@@ -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"
diff --git a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
index 7443998013..db0186f218 100644
--- a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
+++ b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
@@ -7,7 +7,7 @@ $info = new SplFileInfo(__FILE__);
try {
$info->setFileClass('stdClass');
-} catch (UnexpectedValueException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
index a280a6e147..9a2e71defe 100644
--- a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
+++ b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
@@ -7,7 +7,7 @@ $info = new SplFileInfo(__FILE__);
try {
$info->setInfoClass('stdClass');
-} catch (UnexpectedValueException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/spl/tests/SplFileObject_seek_error_001.phpt b/ext/spl/tests/SplFileObject_seek_error_001.phpt
index 4de5bcdd4d..8741e3b788 100644
--- a/ext/spl/tests/SplFileObject_seek_error_001.phpt
+++ b/ext/spl/tests/SplFileObject_seek_error_001.phpt
@@ -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
diff --git a/ext/spl/tests/arrayObject_asort_basic1.phpt b/ext/spl/tests/arrayObject_asort_basic1.phpt
index 6c6fd2949f..094d825bb6 100644
--- a/ext/spl/tests/arrayObject_asort_basic1.phpt
+++ b/ext/spl/tests/arrayObject_asort_basic1.phpt
@@ -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) {
diff --git a/ext/spl/tests/arrayObject_count_basic1.phpt b/ext/spl/tests/arrayObject_count_basic1.phpt
index 41e1527f93..3271090d08 100644
--- a/ext/spl/tests/arrayObject_count_basic1.phpt
+++ b/ext/spl/tests/arrayObject_count_basic1.phpt
@@ -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
diff --git a/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt b/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt
index 823256edbc..c6759a31cf 100644
--- a/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt
+++ b/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt
@@ -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:
diff --git a/ext/spl/tests/arrayObject_ksort_basic1.phpt b/ext/spl/tests/arrayObject_ksort_basic1.phpt
index 1692a02ef1..aa1abbf239 100644
--- a/ext/spl/tests/arrayObject_ksort_basic1.phpt
+++ b/ext/spl/tests/arrayObject_ksort_basic1.phpt
@@ -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) {
diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
index 89efdb6a9f..d0910b3a0a 100644
--- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
+++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
@@ -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"
diff --git a/ext/spl/tests/bug46051.phpt b/ext/spl/tests/bug46051.phpt
index e993951ffa..d53f87bc47 100644
--- a/ext/spl/tests/bug46051.phpt
+++ b/ext/spl/tests/bug46051.phpt
@@ -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--
diff --git a/ext/spl/tests/bug65545.phpt b/ext/spl/tests/bug65545.phpt
index 76c29cbf48..bd5a7f06db 100644
--- a/ext/spl/tests/bug65545.phpt
+++ b/ext/spl/tests/bug65545.phpt
@@ -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)
diff --git a/ext/spl/tests/fileobject_005.phpt b/ext/spl/tests/fileobject_005.phpt
index 7b012e7710..672c806538 100644
--- a/ext/spl/tests/fileobject_005.phpt
+++ b/ext/spl/tests/fileobject_005.phpt
@@ -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==
diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt
index 1271ccaa64..66d03dc359 100644
--- a/ext/spl/tests/iterator_044.phpt
+++ b/ext/spl/tests/iterator_044.phpt
@@ -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) {
}
diff --git a/ext/spl/tests/iterator_045.phpt b/ext/spl/tests/iterator_045.phpt
index c8ffae77a5..fce7ab3655 100644
--- a/ext/spl/tests/iterator_045.phpt
+++ b/ext/spl/tests/iterator_045.phpt
@@ -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)
diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt
index c0dad0f422..944b40dd96 100644
--- a/ext/spl/tests/iterator_count.phpt
+++ b/ext/spl/tests/iterator_count.phpt
@@ -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')
diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt
index f36b99db23..a5a8e5a9b7 100644
--- a/ext/spl/tests/iterator_to_array.phpt
+++ b/ext/spl/tests/iterator_to_array.phpt
@@ -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')
diff --git a/ext/spl/tests/regexIterator_setMode_error.phpt b/ext/spl/tests/regexIterator_setMode_error.phpt
index 77732b058c..046086102b 100644
--- a/ext/spl/tests/regexIterator_setMode_error.phpt
+++ b/ext/spl/tests/regexIterator_setMode_error.phpt
@@ -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
diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt
index 60de68b82a..72458446e1 100644
--- a/ext/spl/tests/spl_004.phpt
+++ b/ext/spl/tests/spl_004.phpt
@@ -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===
diff --git a/ext/spl/tests/spl_heap_is_empty_basic.phpt b/ext/spl/tests/spl_heap_is_empty_basic.phpt
index 47d7ccce9a..4a90734ad4 100644
--- a/ext/spl/tests/spl_heap_is_empty_basic.phpt
+++ b/ext/spl/tests/spl_heap_is_empty_basic.phpt
@@ -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
diff --git a/ext/spl/tests/spl_object_id.phpt b/ext/spl/tests/spl_object_id.phpt
index ca13b03fee..a4e8518eaf 100644
--- a/ext/spl/tests/spl_object_id.phpt
+++ b/ext/spl/tests/spl_object_id.phpt
@@ -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)
diff --git a/ext/sqlite3/tests/sqlite3_33_reset.phpt b/ext/sqlite3/tests/sqlite3_33_reset.phpt
index 531874ceb6..48abc829c7 100644
--- a/ext/sqlite3/tests/sqlite3_33_reset.phpt
+++ b/ext/sqlite3/tests/sqlite3_33_reset.phpt
@@ -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
diff --git a/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt b/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt
index 767f9d0065..d921b99dd7 100644
--- a/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt
+++ b/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt
@@ -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
diff --git a/ext/standard/tests/array/005.phpt b/ext/standard/tests/array/005.phpt
index c82f5f7fd0..c51e98a67b 100644
--- a/ext/standard/tests/array/005.phpt
+++ b/ext/standard/tests/array/005.phpt
@@ -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 ***
diff --git a/ext/standard/tests/array/009.phpt b/ext/standard/tests/array/009.phpt
index 017456917e..c62be0d27c 100644
--- a/ext/standard/tests/array/009.phpt
+++ b/ext/standard/tests/array/009.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_change_key_case_variation.phpt b/ext/standard/tests/array/array_change_key_case_variation.phpt
index 3f8d502ffe..f2b185523f 100644
--- a/ext/standard/tests/array/array_change_key_case_variation.phpt
+++ b/ext/standard/tests/array/array_change_key_case_variation.phpt
@@ -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)
diff --git a/ext/standard/tests/array/array_column_error.phpt b/ext/standard/tests/array/array_column_error.phpt
index 26a09aff24..9223248520 100644
--- a/ext/standard/tests/array/array_column_error.phpt
+++ b/ext/standard/tests/array/array_column_error.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_diff_uassoc_error.phpt b/ext/standard/tests/array/array_diff_uassoc_error.phpt
index d90c80f20b..f6c6905780 100644
--- a/ext/standard/tests/array/array_diff_uassoc_error.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_error.phpt
@@ -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===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt
index 2f07428c05..e80f02629e 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation10.phpt
@@ -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===
diff --git a/ext/standard/tests/array/array_fill_error.phpt b/ext/standard/tests/array/array_fill_error.phpt
index 2fbdb850c3..386404a336 100644
--- a/ext/standard/tests/array/array_fill_error.phpt
+++ b/ext/standard/tests/array/array_fill_error.phpt
@@ -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)
diff --git a/ext/standard/tests/array/array_fill_keys.phpt b/ext/standard/tests/array/array_fill_keys.phpt
index 12adde72e7..fb222a414b 100644
--- a/ext/standard/tests/array/array_fill_keys.phpt
+++ b/ext/standard/tests/array/array_fill_keys.phpt
@@ -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) {
diff --git a/ext/standard/tests/array/array_fill_keys_variation3.phpt b/ext/standard/tests/array/array_fill_keys_variation3.phpt
index 84cc928cbc..b1abbcfe1b 100644
--- a/ext/standard/tests/array/array_fill_keys_variation3.phpt
+++ b/ext/standard/tests/array/array_fill_keys_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_filter.phpt b/ext/standard/tests/array/array_filter.phpt
index ba27a59c96..1488aedd09 100644
--- a/ext/standard/tests/array/array_filter.phpt
+++ b/ext/standard/tests/array/array_filter.phpt
@@ -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 ==
diff --git a/ext/standard/tests/array/array_filter_variation10.phpt b/ext/standard/tests/array/array_filter_variation10.phpt
index 4749fe8e45..a32fdadc05 100644
--- a/ext/standard/tests/array/array_filter_variation10.phpt
+++ b/ext/standard/tests/array/array_filter_variation10.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt
index ed89d13d35..1755a322b0 100644
--- a/ext/standard/tests/array/array_filter_variation9.phpt
+++ b/ext/standard/tests/array/array_filter_variation9.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
index 65432379d7..f4b91503bc 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
@@ -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===
diff --git a/ext/standard/tests/array/array_key_exists.phpt b/ext/standard/tests/array/array_key_exists.phpt
index 61faf0158d..e917815337 100644
--- a/ext/standard/tests/array/array_key_exists.phpt
+++ b/ext/standard/tests/array/array_key_exists.phpt
@@ -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)
diff --git a/ext/standard/tests/array/array_keys_error.phpt b/ext/standard/tests/array/array_keys_error.phpt
index 46a989b839..0febae29c7 100644
--- a/ext/standard/tests/array/array_keys_error.phpt
+++ b/ext/standard/tests/array/array_keys_error.phpt
@@ -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) {
diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt
index 56dd033521..d15f28425e 100644
--- a/ext/standard/tests/array/array_map_error.phpt
+++ b/ext/standard/tests/array/array_map_error.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt
index 944fc8c2c8..43cc4484e6 100644
--- a/ext/standard/tests/array/array_map_object1.phpt
+++ b/ext/standard/tests/array/array_map_object1.phpt
@@ -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) {
diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt
index 7cfb528bf2..e5218ccbe4 100644
--- a/ext/standard/tests/array/array_map_object2.phpt
+++ b/ext/standard/tests/array/array_map_object2.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt
index 114d1d3134..2f1536df5c 100644
--- a/ext/standard/tests/array/array_map_object3.phpt
+++ b/ext/standard/tests/array/array_map_object3.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt
index b258c2d31b..67abde0108 100644
--- a/ext/standard/tests/array/array_map_variation12.phpt
+++ b/ext/standard/tests/array/array_map_variation12.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt
index 771d3f949e..2764cb7374 100644
--- a/ext/standard/tests/array/array_map_variation14.phpt
+++ b/ext/standard/tests/array/array_map_variation14.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt
index b29af47713..f36d55bd5f 100644
--- a/ext/standard/tests/array/array_map_variation15.phpt
+++ b/ext/standard/tests/array/array_map_variation15.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt
index c4987cb385..0c80337c76 100644
--- a/ext/standard/tests/array/array_map_variation16.phpt
+++ b/ext/standard/tests/array/array_map_variation16.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt
index 1cfbdd7beb..4558dc999f 100644
--- a/ext/standard/tests/array/array_map_variation17.phpt
+++ b/ext/standard/tests/array/array_map_variation17.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_merge.phpt b/ext/standard/tests/array/array_merge.phpt
index e6a8096282..98cb3a318f 100644
--- a/ext/standard/tests/array/array_merge.phpt
+++ b/ext/standard/tests/array/array_merge.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_merge_recursive_error.phpt b/ext/standard/tests/array/array_merge_recursive_error.phpt
index ffa9cc998e..f741220837 100644
--- a/ext/standard/tests/array/array_merge_recursive_error.phpt
+++ b/ext/standard/tests/array/array_merge_recursive_error.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_multisort_error.phpt b/ext/standard/tests/array/array_multisort_error.phpt
index 3e78b78ac0..105662be07 100644
--- a/ext/standard/tests/array/array_multisort_error.phpt
+++ b/ext/standard/tests/array/array_multisort_error.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_pad.phpt b/ext/standard/tests/array/array_pad.phpt
index c267516730..fd5fa520b6 100644
--- a/ext/standard/tests/array/array_pad.phpt
+++ b/ext/standard/tests/array/array_pad.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_push.phpt b/ext/standard/tests/array/array_push.phpt
index 52e754f94d..227a520ac1 100644
--- a/ext/standard/tests/array/array_push.phpt
+++ b/ext/standard/tests/array/array_push.phpt
@@ -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)
diff --git a/ext/standard/tests/array/array_rand.phpt b/ext/standard/tests/array/array_rand.phpt
index db432dc9b4..72999eda5f 100644
--- a/ext/standard/tests/array/array_rand.phpt
+++ b/ext/standard/tests/array/array_rand.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_search1.phpt b/ext/standard/tests/array/array_search1.phpt
index 49563f9712..10c1672e54 100644
--- a/ext/standard/tests/array/array_search1.phpt
+++ b/ext/standard/tests/array/array_search1.phpt
@@ -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)
diff --git a/ext/standard/tests/array/array_search_variation3.phpt b/ext/standard/tests/array/array_search_variation3.phpt
index 41b0b5bb20..596c36f805 100644
--- a/ext/standard/tests/array/array_search_variation3.phpt
+++ b/ext/standard/tests/array/array_search_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_slice.phpt b/ext/standard/tests/array/array_slice.phpt
index 59d804350b..d19f5195d6 100644
--- a/ext/standard/tests/array/array_slice.phpt
+++ b/ext/standard/tests/array/array_slice.phpt
@@ -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 ***
diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt
index f0c30ba53d..46f33b9503 100644
--- a/ext/standard/tests/array/array_slice_variation1.phpt
+++ b/ext/standard/tests/array/array_slice_variation1.phpt
@@ -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"
diff --git a/ext/standard/tests/array/array_unshift.phpt b/ext/standard/tests/array/array_unshift.phpt
index 9b474277a9..9ebe83391e 100644
--- a/ext/standard/tests/array/array_unshift.phpt
+++ b/ext/standard/tests/array/array_unshift.phpt
@@ -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]=>
diff --git a/ext/standard/tests/array/array_walk.phpt b/ext/standard/tests/array/array_walk.phpt
index 7cd8a8cf7a..cf792bfa19 100644
--- a/ext/standard/tests/array/array_walk.phpt
+++ b/ext/standard/tests/array/array_walk.phpt
@@ -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"
diff --git a/ext/standard/tests/array/array_walk_closure.phpt b/ext/standard/tests/array/array_walk_closure.phpt
index 0a5d854582..7ac62d7484 100644
--- a/ext/standard/tests/array/array_walk_closure.phpt
+++ b/ext/standard/tests/array/array_walk_closure.phpt
@@ -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)
diff --git a/ext/standard/tests/array/array_walk_error2.phpt b/ext/standard/tests/array/array_walk_error2.phpt
index a4026180fb..73445892a6 100644
--- a/ext/standard/tests/array/array_walk_error2.phpt
+++ b/ext/standard/tests/array/array_walk_error2.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_objects.phpt b/ext/standard/tests/array/array_walk_objects.phpt
index fc04304fc5..9f3ac8c1cd 100644
--- a/ext/standard/tests/array/array_walk_objects.phpt
+++ b/ext/standard/tests/array/array_walk_objects.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_rec_objects.phpt b/ext/standard/tests/array/array_walk_rec_objects.phpt
index a83c227a3b..097143e8ec 100644
--- a/ext/standard/tests/array/array_walk_rec_objects.phpt
+++ b/ext/standard/tests/array/array_walk_rec_objects.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_recursive1.phpt b/ext/standard/tests/array/array_walk_recursive1.phpt
index 962f133e4c..f952b4410b 100644
--- a/ext/standard/tests/array/array_walk_recursive1.phpt
+++ b/ext/standard/tests/array/array_walk_recursive1.phpt
@@ -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"
diff --git a/ext/standard/tests/array/array_walk_recursive_error2.phpt b/ext/standard/tests/array/array_walk_recursive_error2.phpt
index b162a1c9dc..e9bd7ea175 100644
--- a/ext/standard/tests/array/array_walk_recursive_error2.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_error2.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_recursive_variation7.phpt b/ext/standard/tests/array/array_walk_recursive_variation7.phpt
index 06dc1aaa09..a0c159d71d 100644
--- a/ext/standard/tests/array/array_walk_recursive_variation7.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_variation7.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
index 2db8067fe0..51eba1e0e0 100644
--- a/ext/standard/tests/array/array_walk_recursive_variation8.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_variation7.phpt b/ext/standard/tests/array/array_walk_variation7.phpt
index 671ad44309..0354782eda 100644
--- a/ext/standard/tests/array/array_walk_variation7.phpt
+++ b/ext/standard/tests/array/array_walk_variation7.phpt
@@ -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
diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt
index 829baf1add..baa5f3914b 100644
--- a/ext/standard/tests/array/array_walk_variation8.phpt
+++ b/ext/standard/tests/array/array_walk_variation8.phpt
@@ -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
diff --git a/ext/standard/tests/array/bug35014.phpt b/ext/standard/tests/array/bug35014.phpt
index f858bf107b..b674590fd6 100644
--- a/ext/standard/tests/array/bug35014.phpt
+++ b/ext/standard/tests/array/bug35014.phpt
@@ -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)
diff --git a/ext/standard/tests/array/bug35014_64bit.phpt b/ext/standard/tests/array/bug35014_64bit.phpt
index 5caf48c6ee..3b3d29b5be 100644
--- a/ext/standard/tests/array/bug35014_64bit.phpt
+++ b/ext/standard/tests/array/bug35014_64bit.phpt
@@ -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)
diff --git a/ext/standard/tests/array/bug40191.phpt b/ext/standard/tests/array/bug40191.phpt
index f5e439821d..b94e709364 100644
--- a/ext/standard/tests/array/bug40191.phpt
+++ b/ext/standard/tests/array/bug40191.phpt
@@ -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
diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt
index 6d81c16621..1fd2e8e6ca 100644
--- a/ext/standard/tests/array/count_recursive.phpt
+++ b/ext/standard/tests/array/count_recursive.phpt
@@ -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
diff --git a/ext/standard/tests/array/end.phpt b/ext/standard/tests/array/end.phpt
index dc3f2eb75e..496b6c9566 100644
--- a/ext/standard/tests/array/end.phpt
+++ b/ext/standard/tests/array/end.phpt
@@ -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
diff --git a/ext/standard/tests/array/end_64bit.phpt b/ext/standard/tests/array/end_64bit.phpt
index 0af5064e82..55f0d2e53b 100644
--- a/ext/standard/tests/array/end_64bit.phpt
+++ b/ext/standard/tests/array/end_64bit.phpt
@@ -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
diff --git a/ext/standard/tests/array/extract_error.phpt b/ext/standard/tests/array/extract_error.phpt
index e8bcf8f5d8..08e1824b0f 100644
--- a/ext/standard/tests/array/extract_error.phpt
+++ b/ext/standard/tests/array/extract_error.phpt
@@ -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
diff --git a/ext/standard/tests/array/in_array_variation3.phpt b/ext/standard/tests/array/in_array_variation3.phpt
index f07d1dea89..0b58990041 100644
--- a/ext/standard/tests/array/in_array_variation3.phpt
+++ b/ext/standard/tests/array/in_array_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/array/max.phpt b/ext/standard/tests/array/max.phpt
index ae4f304eae..df471ef255 100644
--- a/ext/standard/tests/array/max.phpt
+++ b/ext/standard/tests/array/max.phpt
@@ -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)
diff --git a/ext/standard/tests/array/min.phpt b/ext/standard/tests/array/min.phpt
index cb8c7cfdca..031e9b2c96 100644
--- a/ext/standard/tests/array/min.phpt
+++ b/ext/standard/tests/array/min.phpt
@@ -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)
diff --git a/ext/standard/tests/array/range_errors.phpt b/ext/standard/tests/array/range_errors.phpt
index b63e9874bf..3a3b2bdf60 100644
--- a/ext/standard/tests/array/range_errors.phpt
+++ b/ext/standard/tests/array/range_errors.phpt
@@ -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)
diff --git a/ext/standard/tests/array/uasort_variation8.phpt b/ext/standard/tests/array/uasort_variation8.phpt
index 2bb2b46512..d27cd569c0 100644
--- a/ext/standard/tests/array/uasort_variation8.phpt
+++ b/ext/standard/tests/array/uasort_variation8.phpt
@@ -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
diff --git a/ext/standard/tests/array/usort_variation8.phpt b/ext/standard/tests/array/usort_variation8.phpt
index 3296c4a36a..98c303e083 100644
--- a/ext/standard/tests/array/usort_variation8.phpt
+++ b/ext/standard/tests/array/usort_variation8.phpt
@@ -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===
diff --git a/ext/standard/tests/assert/assert04.phpt b/ext/standard/tests/assert/assert04.phpt
index f20aaf8e2b..35f7668ce1 100644
--- a/ext/standard/tests/assert/assert04.phpt
+++ b/ext/standard/tests/assert/assert04.phpt
@@ -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
diff --git a/ext/standard/tests/class_object/property_exists_error.phpt b/ext/standard/tests/class_object/property_exists_error.phpt
index 217a5c61f9..7a2f4712da 100644
--- a/ext/standard/tests/class_object/property_exists_error.phpt
+++ b/ext/standard/tests/class_object/property_exists_error.phpt
@@ -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
index e5ca80b7d2..0000000000
--- a/ext/standard/tests/dir/closedir_error-win32-mb.phpt
+++ /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
index ffb0284d95..0000000000
--- a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt
+++ /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===
diff --git a/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt b/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
index cba61d3fbf..ed68c2a7d7 100644
--- a/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
+++ b/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
@@ -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
diff --git a/ext/standard/tests/directory/DirectoryClass_error_001.phpt b/ext/standard/tests/directory/DirectoryClass_error_001.phpt
index 5b2771eef6..0a693dd9b7 100644
--- a/ext/standard/tests/directory/DirectoryClass_error_001.phpt
+++ b/ext/standard/tests/directory/DirectoryClass_error_001.phpt
@@ -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
diff --git a/ext/standard/tests/file/005_error.phpt b/ext/standard/tests/file/005_error.phpt
index e3ce551b3d..bc2bf3f978 100644
--- a/ext/standard/tests/file/005_error.phpt
+++ b/ext/standard/tests/file/005_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt
index c35eba2128..e3bdda1b52 100644
--- a/ext/standard/tests/file/006_error.phpt
+++ b/ext/standard/tests/file/006_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt
index 19bbf60fe9..cf81a83ea0 100644
--- a/ext/standard/tests/file/006_variation2.phpt
+++ b/ext/standard/tests/file/006_variation2.phpt
@@ -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
index 93a6a23e5f..0000000000
--- a/ext/standard/tests/file/007_error.phpt
+++ /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)
diff --git a/ext/standard/tests/file/basename-win32.phpt b/ext/standard/tests/file/basename-win32.phpt
index 996b060cea..703861dec7 100644
--- a/ext/standard/tests/file/basename-win32.phpt
+++ b/ext/standard/tests/file/basename-win32.phpt
@@ -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
diff --git a/ext/standard/tests/file/basename.phpt b/ext/standard/tests/file/basename.phpt
index a9b4389b5a..8352f4da4b 100644
--- a/ext/standard/tests/file/basename.phpt
+++ b/ext/standard/tests/file/basename.phpt
Binary files differ
diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt
index 5460203e05..174e349b15 100644
--- a/ext/standard/tests/file/bug39863.phpt
+++ b/ext/standard/tests/file/bug39863.phpt
@@ -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
diff --git a/ext/standard/tests/file/chmod_error.phpt b/ext/standard/tests/file/chmod_error.phpt
index 3b234c741f..b7999aa03d 100644
--- a/ext/standard/tests/file/chmod_error.phpt
+++ b/ext/standard/tests/file/chmod_error.phpt
@@ -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===
diff --git a/ext/standard/tests/file/copy_error.phpt b/ext/standard/tests/file/copy_error.phpt
index 2d6395167b..36eb58fc2a 100644
--- a/ext/standard/tests/file/copy_error.phpt
+++ b/ext/standard/tests/file/copy_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt
index 3c3abea05a..8a2f8972fc 100644
--- a/ext/standard/tests/file/copy_variation4.phpt
+++ b/ext/standard/tests/file/copy_variation4.phpt
Binary files differ
diff --git a/ext/standard/tests/file/disk.phpt b/ext/standard/tests/file/disk.phpt
index a048af6ccb..fe415535ba 100644
--- a/ext/standard/tests/file/disk.phpt
+++ b/ext/standard/tests/file/disk.phpt
@@ -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)
diff --git a/ext/standard/tests/file/disk_free_space_error-win32.phpt b/ext/standard/tests/file/disk_free_space_error-win32.phpt
index acb0fdd717..35140d23fb 100644
--- a/ext/standard/tests/file/disk_free_space_error-win32.phpt
+++ b/ext/standard/tests/file/disk_free_space_error-win32.phpt
@@ -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)
diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt
index 6433cde702..00ec271f8d 100644
--- a/ext/standard/tests/file/disk_free_space_error.phpt
+++ b/ext/standard/tests/file/disk_free_space_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt
index 6c6575d896..912648f100 100644
--- a/ext/standard/tests/file/disk_free_space_variation.phpt
+++ b/ext/standard/tests/file/disk_free_space_variation.phpt
@@ -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 ---
diff --git a/ext/standard/tests/file/disk_total_space_error-win32.phpt b/ext/standard/tests/file/disk_total_space_error-win32.phpt
index 0d511b37a7..29462bb31c 100644
--- a/ext/standard/tests/file/disk_total_space_error-win32.phpt
+++ b/ext/standard/tests/file/disk_total_space_error-win32.phpt
@@ -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)
diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt
index 2c8a940117..b504727089 100644
--- a/ext/standard/tests/file/disk_total_space_error.phpt
+++ b/ext/standard/tests/file/disk_total_space_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt
index 071fa60749..89c47dcaba 100644
--- a/ext/standard/tests/file/disk_total_space_variation.phpt
+++ b/ext/standard/tests/file/disk_total_space_variation.phpt
@@ -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 ---
diff --git a/ext/standard/tests/file/fgetc_variation2.phpt b/ext/standard/tests/file/fgetc_variation2.phpt
index d444209af4..dd0dbb2096 100644
--- a/ext/standard/tests/file/fgetc_variation2.phpt
+++ b/ext/standard/tests/file/fgetc_variation2.phpt
@@ -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
diff --git a/ext/standard/tests/file/fgets_error.phpt b/ext/standard/tests/file/fgets_error.phpt
index 919343aa87..eed35b3001 100644
--- a/ext/standard/tests/file/fgets_error.phpt
+++ b/ext/standard/tests/file/fgets_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/fgets_variation2.phpt b/ext/standard/tests/file/fgets_variation2.phpt
index 0bbcf22039..aa8beb2d4d 100644
--- a/ext/standard/tests/file/fgets_variation2.phpt
+++ b/ext/standard/tests/file/fgets_variation2.phpt
@@ -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
diff --git a/ext/standard/tests/file/file_error.phpt b/ext/standard/tests/file/file_error.phpt
index 12148189e8..2efacd1b31 100644
--- a/ext/standard/tests/file/file_error.phpt
+++ b/ext/standard/tests/file/file_error.phpt
@@ -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) {
}
diff --git a/ext/standard/tests/file/file_get_contents_error.phpt b/ext/standard/tests/file/file_get_contents_error.phpt
index f06628f516..6677d78866 100644
--- a/ext/standard/tests/file/file_get_contents_error.phpt
+++ b/ext/standard/tests/file/file_get_contents_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
index b2a09798e3..23c33b60d3 100644
--- a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
+++ b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
index 4928404098..25060ea0cf 100644
--- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
@@ -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 --
diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt
index 97a3495d54..f826ad60c2 100644
--- a/ext/standard/tests/file/file_get_contents_variation8.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation8.phpt
@@ -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
diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
index 095980b536..4c03581c48 100644
--- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
@@ -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 --
diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt
index 4aef0644f9..76b7b6f5c6 100644
--- a/ext/standard/tests/file/file_put_contents_variation8.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8.phpt
Binary files differ
diff --git a/ext/standard/tests/file/filegroup_error.phpt b/ext/standard/tests/file/filegroup_error.phpt
index e32711cd5b..e602f3441f 100644
--- a/ext/standard/tests/file/filegroup_error.phpt
+++ b/ext/standard/tests/file/filegroup_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt
index 809d61ba73..46a3dc9f35 100644
--- a/ext/standard/tests/file/filegroup_variation2.phpt
+++ b/ext/standard/tests/file/filegroup_variation2.phpt
@@ -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)
diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt
index ebefeb7e3f..a0d4b2fdee 100644
--- a/ext/standard/tests/file/filegroup_variation3.phpt
+++ b/ext/standard/tests/file/filegroup_variation3.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/fileinode_error.phpt b/ext/standard/tests/file/fileinode_error.phpt
index 462ab62367..d080467f04 100644
--- a/ext/standard/tests/file/fileinode_error.phpt
+++ b/ext/standard/tests/file/fileinode_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt
index 90c7eb19e3..d6397d33b8 100644
--- a/ext/standard/tests/file/fileinode_variation2.phpt
+++ b/ext/standard/tests/file/fileinode_variation2.phpt
@@ -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)
diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt
index 2f51e8f595..e50fcfb767 100644
--- a/ext/standard/tests/file/fileinode_variation3.phpt
+++ b/ext/standard/tests/file/fileinode_variation3.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/fileowner_error.phpt b/ext/standard/tests/file/fileowner_error.phpt
index 967a541cc0..807c09f0f0 100644
--- a/ext/standard/tests/file/fileowner_error.phpt
+++ b/ext/standard/tests/file/fileowner_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt
index 131d43bfaa..f6741cb9ca 100644
--- a/ext/standard/tests/file/fileowner_variation2.phpt
+++ b/ext/standard/tests/file/fileowner_variation2.phpt
@@ -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)
diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt
index 5768f528f1..6a2953aa6c 100644
--- a/ext/standard/tests/file/fileowner_variation3.phpt
+++ b/ext/standard/tests/file/fileowner_variation3.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt
index 6b1778e74e..b2b8a19859 100644
--- a/ext/standard/tests/file/fileperms_variation2.phpt
+++ b/ext/standard/tests/file/fileperms_variation2.phpt
@@ -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)
diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt
index 6ae97d1601..5b1160019a 100644
--- a/ext/standard/tests/file/fileperms_variation3.phpt
+++ b/ext/standard/tests/file/fileperms_variation3.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/filesize_error.phpt b/ext/standard/tests/file/filesize_error.phpt
index 9f721ff921..5ad8ee99ca 100644
--- a/ext/standard/tests/file/filesize_error.phpt
+++ b/ext/standard/tests/file/filesize_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/filetype_error.phpt b/ext/standard/tests/file/filetype_error.phpt
index b49a5286c6..a34671d9b0 100644
--- a/ext/standard/tests/file/filetype_error.phpt
+++ b/ext/standard/tests/file/filetype_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt
index 2330270113..4c3cb45c06 100644
--- a/ext/standard/tests/file/flock.phpt
+++ b/ext/standard/tests/file/flock.phpt
@@ -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)
diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt
index ccb6274756..0e3f1d949c 100644
--- a/ext/standard/tests/file/flock_error.phpt
+++ b/ext/standard/tests/file/flock_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt
index b3607be58b..048eb1475c 100644
--- a/ext/standard/tests/file/fnmatch_variation.phpt
+++ b/ext/standard/tests/file/fnmatch_variation.phpt
@@ -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)
diff --git a/ext/standard/tests/file/fread_error.phpt b/ext/standard/tests/file/fread_error.phpt
index 1c4068cd97..f51f24c754 100644
--- a/ext/standard/tests/file/fread_error.phpt
+++ b/ext/standard/tests/file/fread_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/fscanf.phpt b/ext/standard/tests/file/fscanf.phpt
index 6d3d0a5b96..7e40d20b48 100644
--- a/ext/standard/tests/file/fscanf.phpt
+++ b/ext/standard/tests/file/fscanf.phpt
@@ -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)
diff --git a/ext/standard/tests/file/fscanf_error.phpt b/ext/standard/tests/file/fscanf_error.phpt
index 0da1fc69aa..d5b2ba73aa 100644
--- a/ext/standard/tests/file/fscanf_error.phpt
+++ b/ext/standard/tests/file/fscanf_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
index 9c1b3a822d..c39b3bcbe5 100644
--- a/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
+++ b/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
@@ -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
diff --git a/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
index 8835046f6c..87f70b8717 100644
--- a/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
+++ b/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
@@ -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
diff --git a/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt b/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
index 0b94bcffc7..edbb9e22f2 100644
--- a/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
+++ b/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
@@ -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
diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt
index 3cb6db27f8..ecbdeddf06 100644
--- a/ext/standard/tests/file/ftruncate_error.phpt
+++ b/ext/standard/tests/file/ftruncate_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/fwrite.phpt b/ext/standard/tests/file/fwrite.phpt
index 443710b99d..195d3afe77 100644
--- a/ext/standard/tests/file/fwrite.phpt
+++ b/ext/standard/tests/file/fwrite.phpt
@@ -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
diff --git a/ext/standard/tests/file/fwrite_error.phpt b/ext/standard/tests/file/fwrite_error.phpt
index f4f691be35..a52d2dd003 100644
--- a/ext/standard/tests/file/fwrite_error.phpt
+++ b/ext/standard/tests/file/fwrite_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/get_current_user.phpt b/ext/standard/tests/file/get_current_user.phpt
index f23d2fabef..04938e3d6b 100644
--- a/ext/standard/tests/file/get_current_user.phpt
+++ b/ext/standard/tests/file/get_current_user.phpt
@@ -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
diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt
index cba2e2b343..8d1ae00c34 100644
--- a/ext/standard/tests/file/glob_variation-win32-mb.phpt
+++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt
@@ -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) {
}
diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt
index 5027ac03e6..2706377d8c 100644
--- a/ext/standard/tests/file/glob_variation-win32.phpt
+++ b/ext/standard/tests/file/glob_variation-win32.phpt
@@ -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) {
}
diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt
index 9d3b879379..3c20a49b31 100644
--- a/ext/standard/tests/file/glob_variation.phpt
+++ b/ext/standard/tests/file/glob_variation.phpt
@@ -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) {
}
diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt
index c1664165eb..060739ff3d 100644
--- a/ext/standard/tests/file/is_dir_variation3.phpt
+++ b/ext/standard/tests/file/is_dir_variation3.phpt
@@ -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)
diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt
index 5c0be485c5..3c3d0852ef 100644
--- a/ext/standard/tests/file/is_dir_variation4.phpt
+++ b/ext/standard/tests/file/is_dir_variation4.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/is_executable_error.phpt b/ext/standard/tests/file/is_executable_error.phpt
index 4fb3dbaf5f..e4b43095e3 100644
--- a/ext/standard/tests/file/is_executable_error.phpt
+++ b/ext/standard/tests/file/is_executable_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt
index 1cd0a8d209..784685705b 100644
--- a/ext/standard/tests/file/is_executable_variation1.phpt
+++ b/ext/standard/tests/file/is_executable_variation1.phpt
@@ -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 --
diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt
index a804f66eb2..637bbacd67 100644
--- a/ext/standard/tests/file/is_executable_variation3.phpt
+++ b/ext/standard/tests/file/is_executable_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt
index ec70371417..1b94594faa 100644
--- a/ext/standard/tests/file/is_file_variation3.phpt
+++ b/ext/standard/tests/file/is_file_variation3.phpt
@@ -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)
diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt
index 505331d2c9..689ae1098f 100644
--- a/ext/standard/tests/file/is_file_variation4.phpt
+++ b/ext/standard/tests/file/is_file_variation4.phpt
@@ -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 ***
diff --git a/ext/standard/tests/file/is_readable_error.phpt b/ext/standard/tests/file/is_readable_error.phpt
index 9a734cd14d..8a4b507b6f 100644
--- a/ext/standard/tests/file/is_readable_error.phpt
+++ b/ext/standard/tests/file/is_readable_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt
index 0ba2324f9a..b6570fb911 100644
--- a/ext/standard/tests/file/is_readable_variation1.phpt
+++ b/ext/standard/tests/file/is_readable_variation1.phpt
@@ -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 --
diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt
index 74fc7af574..48b4e30386 100644
--- a/ext/standard/tests/file/is_readable_variation3.phpt
+++ b/ext/standard/tests/file/is_readable_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/file/is_uploaded_file_basic.phpt b/ext/standard/tests/file/is_uploaded_file_basic.phpt
index 1721935549..d053244a79 100644
--- a/ext/standard/tests/file/is_uploaded_file_basic.phpt
+++ b/ext/standard/tests/file/is_uploaded_file_basic.phpt
@@ -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
diff --git a/ext/standard/tests/file/is_writable_error.phpt b/ext/standard/tests/file/is_writable_error.phpt
index e3755bc748..e1641e0e9f 100644
--- a/ext/standard/tests/file/is_writable_error.phpt
+++ b/ext/standard/tests/file/is_writable_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt
index f5cdf6a8a0..ec9756fbf1 100644
--- a/ext/standard/tests/file/is_writable_variation1.phpt
+++ b/ext/standard/tests/file/is_writable_variation1.phpt
@@ -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)
diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt
index 3cc7a4da9d..d533a2745d 100644
--- a/ext/standard/tests/file/is_writable_variation3.phpt
+++ b/ext/standard/tests/file/is_writable_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/file/lchown_error.phpt b/ext/standard/tests/file/lchown_error.phpt
index f4b4f5089e..18e0407fdc 100644
--- a/ext/standard/tests/file/lchown_error.phpt
+++ b/ext/standard/tests/file/lchown_error.phpt
@@ -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===
diff --git a/ext/standard/tests/file/lstat_stat_error.phpt b/ext/standard/tests/file/lstat_stat_error.phpt
index 8f290a32e3..e6fccd5acc 100644
--- a/ext/standard/tests/file/lstat_stat_error.phpt
+++ b/ext/standard/tests/file/lstat_stat_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/mkdir_rmdir_error.phpt b/ext/standard/tests/file/mkdir_rmdir_error.phpt
index 17f908c3f6..be0b434c2c 100644
--- a/ext/standard/tests/file/mkdir_rmdir_error.phpt
+++ b/ext/standard/tests/file/mkdir_rmdir_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
index 24dfc96ac9..0af1055178 100644
--- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
+++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
@@ -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)
diff --git a/ext/standard/tests/file/move_uploaded_file_basic.phpt b/ext/standard/tests/file/move_uploaded_file_basic.phpt
index c6cfdd3203..7af8748fe2 100644
--- a/ext/standard/tests/file/move_uploaded_file_basic.phpt
+++ b/ext/standard/tests/file/move_uploaded_file_basic.phpt
@@ -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
diff --git a/ext/standard/tests/file/parse_ini_file_error.phpt b/ext/standard/tests/file/parse_ini_file_error.phpt
index 29e022fb13..5c812d7b9a 100644
--- a/ext/standard/tests/file/parse_ini_file_error.phpt
+++ b/ext/standard/tests/file/parse_ini_file_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/pathinfo_variaton.phpt b/ext/standard/tests/file/pathinfo_variaton.phpt
index 421f378e01..6f4492e375 100644
--- a/ext/standard/tests/file/pathinfo_variaton.phpt
+++ b/ext/standard/tests/file/pathinfo_variaton.phpt
@@ -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) "."
diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt
index 93ed5d946e..22fe309741 100644
--- a/ext/standard/tests/file/popen_pclose_error.phpt
+++ b/ext/standard/tests/file/popen_pclose_error.phpt
@@ -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 ---
diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt
index fcaa7f3946..c74b63d0d6 100644
--- a/ext/standard/tests/file/readfile_error.phpt
+++ b/ext/standard/tests/file/readfile_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt
index a240a826b9..04fdafca79 100644
--- a/ext/standard/tests/file/readfile_variation10-win32.phpt
+++ b/ext/standard/tests/file/readfile_variation10-win32.phpt
@@ -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 --
diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt
index 59b92ad365..5a0070c04f 100644
--- a/ext/standard/tests/file/readfile_variation10.phpt
+++ b/ext/standard/tests/file/readfile_variation10.phpt
Binary files differ
diff --git a/ext/standard/tests/file/readlink_realpath_error.phpt b/ext/standard/tests/file/readlink_realpath_error.phpt
index dc042bfff5..f7fd340aab 100644
--- a/ext/standard/tests/file/readlink_realpath_error.phpt
+++ b/ext/standard/tests/file/readlink_realpath_error.phpt
@@ -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
diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt
index c350a94c77..eef16630d2 100644
--- a/ext/standard/tests/file/readlink_variation1.phpt
+++ b/ext/standard/tests/file/readlink_variation1.phpt
@@ -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
index 2fd221e45a..0000000000
--- a/ext/standard/tests/file/realpath_error-win32.phpt
+++ /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
diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt
index 6319d4ad61..977746a21d 100644
--- a/ext/standard/tests/file/rename_variation13-win32.phpt
+++ b/ext/standard/tests/file/rename_variation13-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt
index 2686150f23..07ee8aa9d8 100644
--- a/ext/standard/tests/file/rename_variation13.phpt
+++ b/ext/standard/tests/file/rename_variation13.phpt
@@ -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
diff --git a/ext/standard/tests/file/stat_error-win32.phpt b/ext/standard/tests/file/stat_error-win32.phpt
index 20bffc79df..59c4fd6dee 100644
--- a/ext/standard/tests/file/stat_error-win32.phpt
+++ b/ext/standard/tests/file/stat_error-win32.phpt
@@ -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
diff --git a/ext/standard/tests/file/stream_002.phpt b/ext/standard/tests/file/stream_002.phpt
index b18dd85b31..84f3b78f06 100644
--- a/ext/standard/tests/file/stream_002.phpt
+++ b/ext/standard/tests/file/stream_002.phpt
@@ -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
diff --git a/ext/standard/tests/file/stream_rfc2397_002.phpt b/ext/standard/tests/file/stream_rfc2397_002.phpt
index 1dce5adf6c..6c58d0d7ad 100644
--- a/ext/standard/tests/file/stream_rfc2397_002.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_002.phpt
@@ -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"
diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt
index f6616a0c88..18d1c1b280 100644
--- a/ext/standard/tests/file/stream_rfc2397_006.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_006.phpt
@@ -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)
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
index 7e8b5b24cf..6a1d026a79 100644
--- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
+++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
@@ -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)
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
index fc891fde7b..00047cde5e 100644
--- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
+++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
@@ -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)
diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt
index 6d5071b5e5..d7602326d9 100644
--- a/ext/standard/tests/file/tempnam_variation3-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt
@@ -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 --
diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt
index 2d95cb0a43..ccbd35084f 100644
--- a/ext/standard/tests/file/tempnam_variation3.phpt
+++ b/ext/standard/tests/file/tempnam_variation3.phpt
@@ -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
diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt
index 5bacb5e876..f4b3cf016c 100644
--- a/ext/standard/tests/file/tempnam_variation7-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt
@@ -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
diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt
index 9ed84f974a..680e207718 100644
--- a/ext/standard/tests/file/tempnam_variation7.phpt
+++ b/ext/standard/tests/file/tempnam_variation7.phpt
@@ -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
diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt
index 42d1fad1e5..119ffd3204 100644
--- a/ext/standard/tests/file/touch.phpt
+++ b/ext/standard/tests/file/touch.phpt
@@ -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)
diff --git a/ext/standard/tests/file/touch_error.phpt b/ext/standard/tests/file/touch_error.phpt
index 0520055a90..9a4bd01e13 100644
--- a/ext/standard/tests/file/touch_error.phpt
+++ b/ext/standard/tests/file/touch_error.phpt
@@ -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)
diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt
index efd6ee8323..2c81e33b72 100644
--- a/ext/standard/tests/file/unlink_error-win32-mb.phpt
+++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt
@@ -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
diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt
index 8dde64cff0..fe165ec8c6 100644
--- a/ext/standard/tests/file/unlink_error-win32.phpt
+++ b/ext/standard/tests/file/unlink_error-win32.phpt
@@ -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
diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt
index f7f8f00847..87b189f3cf 100644
--- a/ext/standard/tests/file/unlink_error.phpt
+++ b/ext/standard/tests/file/unlink_error.phpt
@@ -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
diff --git a/ext/standard/tests/filters/001.phpt b/ext/standard/tests/filters/001.phpt
index fbfdda2385..53d9fc2b50 100644
--- a/ext/standard/tests/filters/001.phpt
+++ b/ext/standard/tests/filters/001.phpt
@@ -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
diff --git a/ext/standard/tests/filters/stream_filter_remove_error.phpt b/ext/standard/tests/filters/stream_filter_remove_error.phpt
index 37820a99c4..e389b20fd8 100644
--- a/ext/standard/tests/filters/stream_filter_remove_error.phpt
+++ b/ext/standard/tests/filters/stream_filter_remove_error.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/bug41970.phpt b/ext/standard/tests/general_functions/bug41970.phpt
index 6f05137afc..f43bf64380 100644
--- a/ext/standard/tests/general_functions/bug41970.phpt
+++ b/ext/standard/tests/general_functions/bug41970.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/callbacks_001.phpt b/ext/standard/tests/general_functions/callbacks_001.phpt
index a58f19d932..76d0e94c82 100644
--- a/ext/standard/tests/general_functions/callbacks_001.phpt
+++ b/ext/standard/tests/general_functions/callbacks_001.phpt
@@ -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===
diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt
index 22130c524a..0d44035e0e 100644
--- a/ext/standard/tests/general_functions/callbacks_002.phpt
+++ b/ext/standard/tests/general_functions/callbacks_002.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/error_get_last.phpt b/ext/standard/tests/general_functions/error_get_last.phpt
index 71f068f104..e6cea73f4d 100644
--- a/ext/standard/tests/general_functions/error_get_last.phpt
+++ b/ext/standard/tests/general_functions/error_get_last.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/floatval.phpt b/ext/standard/tests/general_functions/floatval.phpt
index 1bb4d1151c..2b681e631d 100644
--- a/ext/standard/tests/general_functions/floatval.phpt
+++ b/ext/standard/tests/general_functions/floatval.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt b/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
index 33d4af03d2..c74e4f71fe 100644
--- a/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
+++ b/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
@@ -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
index 44bd822d12..0000000000
--- a/ext/standard/tests/general_functions/get_extension_funcs_error.phpt
+++ /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===
diff --git a/ext/standard/tests/general_functions/get_include_path_basic.phpt b/ext/standard/tests/general_functions/get_include_path_basic.phpt
index 2017bf697a..5b45c86449 100644
--- a/ext/standard/tests/general_functions/get_include_path_basic.phpt
+++ b/ext/standard/tests/general_functions/get_include_path_basic.phpt
@@ -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===
diff --git a/ext/standard/tests/general_functions/get_included_files.phpt b/ext/standard/tests/general_functions/get_included_files.phpt
index e6d00a56a1..e4dfe0f974 100644
--- a/ext/standard/tests/general_functions/get_included_files.phpt
+++ b/ext/standard/tests/general_functions/get_included_files.phpt
@@ -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===
diff --git a/ext/standard/tests/general_functions/getrusage.phpt b/ext/standard/tests/general_functions/getrusage.phpt
index 4caca88e1b..8ec131809f 100644
--- a/ext/standard/tests/general_functions/getrusage.phpt
+++ b/ext/standard/tests/general_functions/getrusage.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/getservbyport_variation1.phpt b/ext/standard/tests/general_functions/getservbyport_variation1.phpt
index a876ac1fea..f387161bf4 100644
--- a/ext/standard/tests/general_functions/getservbyport_variation1.phpt
+++ b/ext/standard/tests/general_functions/getservbyport_variation1.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/gettype_settype_error.phpt b/ext/standard/tests/general_functions/gettype_settype_error.phpt
index 325e91e47f..e204c64d4c 100644
--- a/ext/standard/tests/general_functions/gettype_settype_error.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_error.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/include_path.phpt b/ext/standard/tests/general_functions/include_path.phpt
index 8b6626fbc8..de6aa278eb 100644
--- a/ext/standard/tests/general_functions/include_path.phpt
+++ b/ext/standard/tests/general_functions/include_path.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/intval.phpt b/ext/standard/tests/general_functions/intval.phpt
index 7f3d895fbe..00b2dc04ab 100644
--- a/ext/standard/tests/general_functions/intval.phpt
+++ b/ext/standard/tests/general_functions/intval.phpt
@@ -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 ---
diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt
index 223b732904..f3b0c75db3 100644
--- a/ext/standard/tests/general_functions/is_array.phpt
+++ b/ext/standard/tests/general_functions/is_array.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt
index a6c6111fa1..4f0ae4fff5 100644
--- a/ext/standard/tests/general_functions/is_bool.phpt
+++ b/ext/standard/tests/general_functions/is_bool.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_countable_with_variables.phpt b/ext/standard/tests/general_functions/is_countable_with_variables.phpt
index 700077ef17..0cb18769d6 100644
--- a/ext/standard/tests/general_functions/is_countable_with_variables.phpt
+++ b/ext/standard/tests/general_functions/is_countable_with_variables.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_float.phpt b/ext/standard/tests/general_functions/is_float.phpt
index b71a5283db..0ee1c60959 100644
--- a/ext/standard/tests/general_functions/is_float.phpt
+++ b/ext/standard/tests/general_functions/is_float.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_float_64bit.phpt b/ext/standard/tests/general_functions/is_float_64bit.phpt
index 9410a21fe2..76cbf0c5d2 100644
--- a/ext/standard/tests/general_functions/is_float_64bit.phpt
+++ b/ext/standard/tests/general_functions/is_float_64bit.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt
index d154b30748..2f452cd48b 100644
--- a/ext/standard/tests/general_functions/is_int.phpt
+++ b/ext/standard/tests/general_functions/is_int.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt
index 68ef75b35b..ac919ced16 100644
--- a/ext/standard/tests/general_functions/is_int_64bit.phpt
+++ b/ext/standard/tests/general_functions/is_int_64bit.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt
index fa7c87f791..5a3269a28a 100644
--- a/ext/standard/tests/general_functions/is_null.phpt
+++ b/ext/standard/tests/general_functions/is_null.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt
index 0019cf18d2..509ee7e686 100644
--- a/ext/standard/tests/general_functions/is_numeric.phpt
+++ b/ext/standard/tests/general_functions/is_numeric.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt
index 8abc766376..2b5d1ae475 100644
--- a/ext/standard/tests/general_functions/is_object.phpt
+++ b/ext/standard/tests/general_functions/is_object.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_scalar.phpt b/ext/standard/tests/general_functions/is_scalar.phpt
index 53620178c4..f7ef3f5317 100644
--- a/ext/standard/tests/general_functions/is_scalar.phpt
+++ b/ext/standard/tests/general_functions/is_scalar.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt
index 72a885a57a..d48fbd1729 100644
--- a/ext/standard/tests/general_functions/is_string.phpt
+++ b/ext/standard/tests/general_functions/is_string.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/ob_get_flush_error.phpt b/ext/standard/tests/general_functions/ob_get_flush_error.phpt
index 0664043eba..5603e3d238 100644
--- a/ext/standard/tests/general_functions/ob_get_flush_error.phpt
+++ b/ext/standard/tests/general_functions/ob_get_flush_error.phpt
@@ -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===
diff --git a/ext/standard/tests/general_functions/ob_get_length_basic.phpt b/ext/standard/tests/general_functions/ob_get_length_basic.phpt
index b3470bec55..75e22e7741 100644
--- a/ext/standard/tests/general_functions/ob_get_length_basic.phpt
+++ b/ext/standard/tests/general_functions/ob_get_length_basic.phpt
@@ -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===
diff --git a/ext/standard/tests/general_functions/parse_ini_file.phpt b/ext/standard/tests/general_functions/parse_ini_file.phpt
index ebc714455d..14c1fc18ef 100644
--- a/ext/standard/tests/general_functions/parse_ini_file.phpt
+++ b/ext/standard/tests/general_functions/parse_ini_file.phpt
@@ -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"]=>
diff --git a/ext/standard/tests/general_functions/parse_ini_string_002.phpt b/ext/standard/tests/general_functions/parse_ini_string_002.phpt
index 106cd0c842..384398cdb2 100644
--- a/ext/standard/tests/general_functions/parse_ini_string_002.phpt
+++ b/ext/standard/tests/general_functions/parse_ini_string_002.phpt
@@ -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) ""
diff --git a/ext/standard/tests/general_functions/php_uname_error.phpt b/ext/standard/tests/general_functions/php_uname_error.phpt
index 392e1c930e..ec5b2b5839 100644
--- a/ext/standard/tests/general_functions/php_uname_error.phpt
+++ b/ext/standard/tests/general_functions/php_uname_error.phpt
@@ -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===
diff --git a/ext/standard/tests/general_functions/phpcredits.phpt b/ext/standard/tests/general_functions/phpcredits.phpt
index 044232570e..dfcddc61f3 100644
--- a/ext/standard/tests/general_functions/phpcredits.phpt
+++ b/ext/standard/tests/general_functions/phpcredits.phpt
@@ -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)
diff --git a/ext/standard/tests/general_functions/phpcredits2.phpt b/ext/standard/tests/general_functions/phpcredits2.phpt
index 9966f23a96..6aa023e919 100644
--- a/ext/standard/tests/general_functions/phpcredits2.phpt
+++ b/ext/standard/tests/general_functions/phpcredits2.phpt
@@ -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)
diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt
index a805876aab..5f4d99ffba 100644
--- a/ext/standard/tests/general_functions/phpinfo.phpt
+++ b/ext/standard/tests/general_functions/phpinfo.phpt
@@ -5,9 +5,6 @@ phpinfo()
var_dump(phpinfo());
echo "--\n";
-var_dump(phpinfo(array()));
-
-echo "--\n";
var_dump(phpinfo(0));
echo "--\n";
@@ -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)
--
diff --git a/ext/standard/tests/general_functions/phpinfo2.phpt b/ext/standard/tests/general_functions/phpinfo2.phpt
index f422f923d9..5a36aa9d28 100644
--- a/ext/standard/tests/general_functions/phpinfo2.phpt
+++ b/ext/standard/tests/general_functions/phpinfo2.phpt
@@ -7,9 +7,6 @@ dummy=x
var_dump(phpinfo());
echo "--\n";
-var_dump(phpinfo(array()));
-
-echo "--\n";
var_dump(phpinfo(0));
echo "--\n";
@@ -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)
--
diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt
index de58dd1e1e..15155fe0d2 100644
--- a/ext/standard/tests/general_functions/print_r.phpt
+++ b/ext/standard/tests/general_functions/print_r.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt
index ff9c3c0b9c..db5b92bf84 100644
--- a/ext/standard/tests/general_functions/print_r_64bit.phpt
+++ b/ext/standard/tests/general_functions/print_r_64bit.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/rand.phpt b/ext/standard/tests/general_functions/rand.phpt
index e6639a71c7..73dec4eb75 100644
--- a/ext/standard/tests/general_functions/rand.phpt
+++ b/ext/standard/tests/general_functions/rand.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/sleep_error.phpt b/ext/standard/tests/general_functions/sleep_error.phpt
index c4f069a3d2..3b46a35e5d 100644
--- a/ext/standard/tests/general_functions/sleep_error.phpt
+++ b/ext/standard/tests/general_functions/sleep_error.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/strval.phpt b/ext/standard/tests/general_functions/strval.phpt
index b814733dd0..0e513a3c47 100644
--- a/ext/standard/tests/general_functions/strval.phpt
+++ b/ext/standard/tests/general_functions/strval.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/sys_getloadavg.phpt b/ext/standard/tests/general_functions/sys_getloadavg.phpt
index 5763084f70..1775978a12 100644
--- a/ext/standard/tests/general_functions/sys_getloadavg.phpt
+++ b/ext/standard/tests/general_functions/sys_getloadavg.phpt
@@ -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)
diff --git a/ext/standard/tests/general_functions/usleep_error.phpt b/ext/standard/tests/general_functions/usleep_error.phpt
index 474aab7d5d..283e7f30e5 100644
--- a/ext/standard/tests/general_functions/usleep_error.phpt
+++ b/ext/standard/tests/general_functions/usleep_error.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt
index 74f497da65..5de84c531e 100644
--- a/ext/standard/tests/general_functions/var_dump.phpt
+++ b/ext/standard/tests/general_functions/var_dump.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt
index 8440ffaf6e..0815c9d62f 100644
--- a/ext/standard/tests/general_functions/var_dump_64bit.phpt
+++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt
@@ -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
diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt
index e8939f1d0a..52896eb788 100644
--- a/ext/standard/tests/general_functions/var_export-locale.phpt
+++ b/ext/standard/tests/general_functions/var_export-locale.phpt
@@ -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
diff --git a/ext/standard/tests/image/image_type_to_extension.phpt b/ext/standard/tests/image/image_type_to_extension.phpt
index 8418a4b8c7..249df57943 100644
--- a/ext/standard/tests/image/image_type_to_extension.phpt
+++ b/ext/standard/tests/image/image_type_to_extension.phpt
@@ -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
diff --git a/ext/standard/tests/math/acos_variation.phpt b/ext/standard/tests/math/acos_variation.phpt
index 5575ec5796..4fe8437fd5 100644
--- a/ext/standard/tests/math/acos_variation.phpt
+++ b/ext/standard/tests/math/acos_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/acosh_variation.phpt b/ext/standard/tests/math/acosh_variation.phpt
index cc89ce3e76..12200e035c 100644
--- a/ext/standard/tests/math/acosh_variation.phpt
+++ b/ext/standard/tests/math/acosh_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/asin_variation.phpt b/ext/standard/tests/math/asin_variation.phpt
index c8063849fd..c5d170e8db 100644
--- a/ext/standard/tests/math/asin_variation.phpt
+++ b/ext/standard/tests/math/asin_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/asinh_variation.phpt b/ext/standard/tests/math/asinh_variation.phpt
index 5e41a45900..2470f7d401 100644
--- a/ext/standard/tests/math/asinh_variation.phpt
+++ b/ext/standard/tests/math/asinh_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/atan_variation.phpt b/ext/standard/tests/math/atan_variation.phpt
index b6a9a9ec32..625b6d0b83 100644
--- a/ext/standard/tests/math/atan_variation.phpt
+++ b/ext/standard/tests/math/atan_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/atanh_variation.phpt b/ext/standard/tests/math/atanh_variation.phpt
index 2b0a4b1085..f14406bb0d 100644
--- a/ext/standard/tests/math/atanh_variation.phpt
+++ b/ext/standard/tests/math/atanh_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/base_convert_error.phpt b/ext/standard/tests/math/base_convert_error.phpt
index f27d0a66cf..7e1a12c8bc 100644
--- a/ext/standard/tests/math/base_convert_error.phpt
+++ b/ext/standard/tests/math/base_convert_error.phpt
@@ -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
diff --git a/ext/standard/tests/math/cos_variation.phpt b/ext/standard/tests/math/cos_variation.phpt
index 6323042dc7..f9d1b26246 100644
--- a/ext/standard/tests/math/cos_variation.phpt
+++ b/ext/standard/tests/math/cos_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/cosh_variation.phpt b/ext/standard/tests/math/cosh_variation.phpt
index cd64670668..ec58c0151f 100644
--- a/ext/standard/tests/math/cosh_variation.phpt
+++ b/ext/standard/tests/math/cosh_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/deg2rad_variation.phpt b/ext/standard/tests/math/deg2rad_variation.phpt
index d5f6920ea7..eb3c7eae0e 100644
--- a/ext/standard/tests/math/deg2rad_variation.phpt
+++ b/ext/standard/tests/math/deg2rad_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/lcg_value_basic.phpt b/ext/standard/tests/math/lcg_value_basic.phpt
index 44304f2475..7660f67c24 100644
--- a/ext/standard/tests/math/lcg_value_basic.phpt
+++ b/ext/standard/tests/math/lcg_value_basic.phpt
@@ -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";
?>
@@ -45,12 +29,4 @@ 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
diff --git a/ext/standard/tests/math/log10_variation.phpt b/ext/standard/tests/math/log10_variation.phpt
index 5304325952..8dbea47a84 100644
--- a/ext/standard/tests/math/log10_variation.phpt
+++ b/ext/standard/tests/math/log10_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/log_error.phpt b/ext/standard/tests/math/log_error.phpt
index 48a23df3c0..7c305a4cba 100644
--- a/ext/standard/tests/math/log_error.phpt
+++ b/ext/standard/tests/math/log_error.phpt
@@ -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
diff --git a/ext/standard/tests/math/rad2deg_variation.phpt b/ext/standard/tests/math/rad2deg_variation.phpt
index 596a1940a4..6ea7d0c8a4 100644
--- a/ext/standard/tests/math/rad2deg_variation.phpt
+++ b/ext/standard/tests/math/rad2deg_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/sin_variation.phpt b/ext/standard/tests/math/sin_variation.phpt
index 5b635dfbdc..d044a16b40 100644
--- a/ext/standard/tests/math/sin_variation.phpt
+++ b/ext/standard/tests/math/sin_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/sinh_variation.phpt b/ext/standard/tests/math/sinh_variation.phpt
index e47e94d629..5e576f447f 100644
--- a/ext/standard/tests/math/sinh_variation.phpt
+++ b/ext/standard/tests/math/sinh_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/sqrt_variation.phpt b/ext/standard/tests/math/sqrt_variation.phpt
index 7369b98dfd..6e2304b437 100644
--- a/ext/standard/tests/math/sqrt_variation.phpt
+++ b/ext/standard/tests/math/sqrt_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/tan_variation.phpt b/ext/standard/tests/math/tan_variation.phpt
index 81546bbf6f..2c9ede4738 100644
--- a/ext/standard/tests/math/tan_variation.phpt
+++ b/ext/standard/tests/math/tan_variation.phpt
@@ -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
diff --git a/ext/standard/tests/math/tanh_variation.phpt b/ext/standard/tests/math/tanh_variation.phpt
index b1b477c150..907f802b8a 100644
--- a/ext/standard/tests/math/tanh_variation.phpt
+++ b/ext/standard/tests/math/tanh_variation.phpt
@@ -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
diff --git a/ext/standard/tests/misc/get_browser_error.phpt b/ext/standard/tests/misc/get_browser_error.phpt
index 049c8b9431..cf15e3c5ef 100644
--- a/ext/standard/tests/misc/get_browser_error.phpt
+++ b/ext/standard/tests/misc/get_browser_error.phpt
@@ -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===
diff --git a/ext/standard/tests/network/fsockopen_error.phpt b/ext/standard/tests/network/fsockopen_error.phpt
index 638412b47f..ea08335f2d 100644
--- a/ext/standard/tests/network/fsockopen_error.phpt
+++ b/ext/standard/tests/network/fsockopen_error.phpt
@@ -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
diff --git a/ext/standard/tests/network/gethostbyaddr_error.phpt b/ext/standard/tests/network/gethostbyaddr_error.phpt
index f7982d5ca4..a33a71185f 100644
--- a/ext/standard/tests/network/gethostbyaddr_error.phpt
+++ b/ext/standard/tests/network/gethostbyaddr_error.phpt
@@ -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+
diff --git a/ext/standard/tests/network/gethostname.phpt b/ext/standard/tests/network/gethostname.phpt
index e7caaf48eb..57f4c498d0 100644
--- a/ext/standard/tests/network/gethostname.phpt
+++ b/ext/standard/tests/network/gethostname.phpt
@@ -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"
diff --git a/ext/standard/tests/network/getprotobyname_error.phpt b/ext/standard/tests/network/getprotobyname_error.phpt
index 7ee366ac7a..52ef3b8ee0 100644
--- a/ext/standard/tests/network/getprotobyname_error.phpt
+++ b/ext/standard/tests/network/getprotobyname_error.phpt
@@ -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)
diff --git a/ext/standard/tests/network/getprotobynumber_error.phpt b/ext/standard/tests/network/getprotobynumber_error.phpt
index 7df12e864a..dda2661b5a 100644
--- a/ext/standard/tests/network/getprotobynumber_error.phpt
+++ b/ext/standard/tests/network/getprotobynumber_error.phpt
@@ -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)
diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt
index a1e70a0020..81db0016b5 100644
--- a/ext/standard/tests/network/inet.phpt
+++ b/ext/standard/tests/network/inet.phpt
@@ -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)
diff --git a/ext/standard/tests/network/ip.phpt b/ext/standard/tests/network/ip.phpt
index 5237c89776..831eee018a 100644
--- a/ext/standard/tests/network/ip.phpt
+++ b/ext/standard/tests/network/ip.phpt
@@ -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
diff --git a/ext/standard/tests/network/ip_x86_64.phpt b/ext/standard/tests/network/ip_x86_64.phpt
index 3c530b8371..06ed1549a6 100644
--- a/ext/standard/tests/network/ip_x86_64.phpt
+++ b/ext/standard/tests/network/ip_x86_64.phpt
@@ -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
diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt
index 89ca127bc4..04a8249ced 100644
--- a/ext/standard/tests/password/password_hash_error.phpt
+++ b/ext/standard/tests/password/password_hash_error.phpt
@@ -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
diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt
index 7180d11de7..f64723ee85 100644
--- a/ext/standard/tests/password/password_needs_rehash_error.phpt
+++ b/ext/standard/tests/password/password_needs_rehash_error.phpt
@@ -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!
diff --git a/ext/standard/tests/password/password_verify_error.phpt b/ext/standard/tests/password/password_verify_error.phpt
index 7f680af448..192a4ae288 100644
--- a/ext/standard/tests/password/password_verify_error.phpt
+++ b/ext/standard/tests/password/password_verify_error.phpt
@@ -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
diff --git a/ext/standard/tests/streams/bug46426.phpt b/ext/standard/tests/streams/bug46426.phpt
index 8c95ea456e..b69c6c557b 100644
--- a/ext/standard/tests/streams/bug46426.phpt
+++ b/ext/standard/tests/streams/bug46426.phpt
@@ -21,8 +21,6 @@ echo stream_get_contents($tmp, 1, 0);
echo "\n";
echo stream_get_contents($tmp, -1);
-@unlink($tmp);
-
?>
--EXPECT--
23
diff --git a/ext/standard/tests/streams/stream_get_contents_001.phpt b/ext/standard/tests/streams/stream_get_contents_001.phpt
index dc7fcb239c..6f5abcb782 100644
--- a/ext/standard/tests/streams/stream_get_contents_001.phpt
+++ b/ext/standard/tests/streams/stream_get_contents_001.phpt
@@ -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--
--
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
index bb98d7c6e7..5530322fec 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
@@ -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
diff --git a/ext/standard/tests/streams/stream_resolve_include_path.phpt b/ext/standard/tests/streams/stream_resolve_include_path.phpt
index 4109b5672e..f77c0730f3 100644
--- a/ext/standard/tests/streams/stream_resolve_include_path.phpt
+++ b/ext/standard/tests/streams/stream_resolve_include_path.phpt
@@ -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"
diff --git a/ext/standard/tests/streams/stream_set_chunk_size.phpt b/ext/standard/tests/streams/stream_set_chunk_size.phpt
index 8c2ae9865b..851fd2cfcf 100644
--- a/ext/standard/tests/streams/stream_set_chunk_size.phpt
+++ b/ext/standard/tests/streams/stream_set_chunk_size.phpt
@@ -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)
diff --git a/ext/standard/tests/streams/stream_set_timeout_error.phpt b/ext/standard/tests/streams/stream_set_timeout_error.phpt
index 0334b951e0..6c5b992dd5 100644
--- a/ext/standard/tests/streams/stream_set_timeout_error.phpt
+++ b/ext/standard/tests/streams/stream_set_timeout_error.phpt
@@ -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
diff --git a/ext/standard/tests/streams/stream_socket_sendto.phpt b/ext/standard/tests/streams/stream_socket_sendto.phpt
index 2812d30930..ab223f4314 100644
--- a/ext/standard/tests/streams/stream_socket_sendto.phpt
+++ b/ext/standard/tests/streams/stream_socket_sendto.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/addcslashes_001.phpt b/ext/standard/tests/strings/addcslashes_001.phpt
index 4080c7214d..5b60f6168d 100644
--- a/ext/standard/tests/strings/addcslashes_001.phpt
+++ b/ext/standard/tests/strings/addcslashes_001.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/bug54322.phpt b/ext/standard/tests/strings/bug54322.phpt
index 6b8d10daa7..f31f94fd84 100644
--- a/ext/standard/tests/strings/bug54322.phpt
+++ b/ext/standard/tests/strings/bug54322.phpt
@@ -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
diff --git a/ext/standard/tests/strings/chr_error.phpt b/ext/standard/tests/strings/chr_error.phpt
index d5fb974559..7f089ac5b5 100644
--- a/ext/standard/tests/strings/chr_error.phpt
+++ b/ext/standard/tests/strings/chr_error.phpt
@@ -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===
diff --git a/ext/standard/tests/strings/chr_ord.phpt b/ext/standard/tests/strings/chr_ord.phpt
index be0b1a32da..43e31a20f3 100644
--- a/ext/standard/tests/strings/chr_ord.phpt
+++ b/ext/standard/tests/strings/chr_ord.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt
index 8a5a8cd6bb..8650f2cb92 100644
--- a/ext/standard/tests/strings/chunk_split_variation5.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation5.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt
index bfafd1af0b..9804ee21e1 100644
--- a/ext/standard/tests/strings/chunk_split_variation8.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation8.phpt
@@ -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
diff --git a/ext/standard/tests/strings/convert_cyr_string.phpt b/ext/standard/tests/strings/convert_cyr_string.phpt
index af239543c5..a1473ad316 100644
--- a/ext/standard/tests/strings/convert_cyr_string.phpt
+++ b/ext/standard/tests/strings/convert_cyr_string.phpt
@@ -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) "[[[[[["
diff --git a/ext/standard/tests/strings/convert_cyr_string_error.phpt b/ext/standard/tests/strings/convert_cyr_string_error.phpt
index 66effea430..6ac438efaf 100644
--- a/ext/standard/tests/strings/convert_cyr_string_error.phpt
+++ b/ext/standard/tests/strings/convert_cyr_string_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/crypt.phpt b/ext/standard/tests/strings/crypt.phpt
index f64b61cb5f..270f0372d1 100644
--- a/ext/standard/tests/strings/crypt.phpt
+++ b/ext/standard/tests/strings/crypt.phpt
@@ -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
diff --git a/ext/standard/tests/strings/dirname_error.phpt b/ext/standard/tests/strings/dirname_error.phpt
index 98a9ea5b45..79fac30029 100644
--- a/ext/standard/tests/strings/dirname_error.phpt
+++ b/ext/standard/tests/strings/dirname_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/explode1.phpt b/ext/standard/tests/strings/explode1.phpt
index 6842947605..de3049a47b 100644
--- a/ext/standard/tests/strings/explode1.phpt
+++ b/ext/standard/tests/strings/explode1.phpt
@@ -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
diff --git a/ext/standard/tests/strings/fprintf_error.phpt b/ext/standard/tests/strings/fprintf_error.phpt
index ccc37407e8..1ffc188051 100644
--- a/ext/standard/tests/strings/fprintf_error.phpt
+++ b/ext/standard/tests/strings/fprintf_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/highlight_file.phpt b/ext/standard/tests/strings/highlight_file.phpt
index 65636908e6..10ea752291 100644
--- a/ext/standard/tests/strings/highlight_file.phpt
+++ b/ext/standard/tests/strings/highlight_file.phpt
@@ -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
diff --git a/ext/standard/tests/strings/htmlentities24.phpt b/ext/standard/tests/strings/htmlentities24.phpt
index 5a023df701..f2abfd5ba8 100644
--- a/ext/standard/tests/strings/htmlentities24.phpt
+++ b/ext/standard/tests/strings/htmlentities24.phpt
@@ -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
diff --git a/ext/standard/tests/strings/htmlspecialchars.phpt b/ext/standard/tests/strings/htmlspecialchars.phpt
index 8506c73e72..6e5c5fac36 100644
--- a/ext/standard/tests/strings/htmlspecialchars.phpt
+++ b/ext/standard/tests/strings/htmlspecialchars.phpt
@@ -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
diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt
index d5de391e96..9d9afc6f3c 100644
--- a/ext/standard/tests/strings/implode1.phpt
+++ b/ext/standard/tests/strings/implode1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/join_error.phpt b/ext/standard/tests/strings/join_error.phpt
index 36ee9d7ba6..832fb58c05 100644
--- a/ext/standard/tests/strings/join_error.phpt
+++ b/ext/standard/tests/strings/join_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/lcfirst.phpt b/ext/standard/tests/strings/lcfirst.phpt
index 97dfc4153b..38cb7e566f 100644
--- a/ext/standard/tests/strings/lcfirst.phpt
+++ b/ext/standard/tests/strings/lcfirst.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/levenshtein.phpt b/ext/standard/tests/strings/levenshtein.phpt
index 1ac05cf2ae..b4b7c03e7f 100644
--- a/ext/standard/tests/strings/levenshtein.phpt
+++ b/ext/standard/tests/strings/levenshtein.phpt
@@ -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
diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt
index 638c93557f..51287e04d7 100644
--- a/ext/standard/tests/strings/ltrim.phpt
+++ b/ext/standard/tests/strings/ltrim.phpt
@@ -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"
diff --git a/ext/standard/tests/strings/ltrim_error.phpt b/ext/standard/tests/strings/ltrim_error.phpt
index 694d9fea18..58324d7f3a 100644
--- a/ext/standard/tests/strings/ltrim_error.phpt
+++ b/ext/standard/tests/strings/ltrim_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/md5_file.phpt b/ext/standard/tests/strings/md5_file.phpt
index 45009669f4..e56987cd6a 100644
--- a/ext/standard/tests/strings/md5_file.phpt
+++ b/ext/standard/tests/strings/md5_file.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/metaphone.phpt b/ext/standard/tests/strings/metaphone.phpt
index ef1d23d89a..c70b4846a1 100644
--- a/ext/standard/tests/strings/metaphone.phpt
+++ b/ext/standard/tests/strings/metaphone.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/money_format_error.phpt b/ext/standard/tests/strings/money_format_error.phpt
index 454b593537..8a4366f1bb 100644
--- a/ext/standard/tests/strings/money_format_error.phpt
+++ b/ext/standard/tests/strings/money_format_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/pathinfo.phpt b/ext/standard/tests/strings/pathinfo.phpt
index a3d735069d..2bbea73588 100644
--- a/ext/standard/tests/strings/pathinfo.phpt
+++ b/ext/standard/tests/strings/pathinfo.phpt
@@ -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) ""
diff --git a/ext/standard/tests/strings/php_strip_whitespace.phpt b/ext/standard/tests/strings/php_strip_whitespace.phpt
index d9376b101a..caab3bc1d2 100644
--- a/ext/standard/tests/strings/php_strip_whitespace.phpt
+++ b/ext/standard/tests/strings/php_strip_whitespace.phpt
@@ -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 */"
diff --git a/ext/standard/tests/strings/printf.phpt b/ext/standard/tests/strings/printf.phpt
index eab44a4a65..89b1b9ace2 100644
--- a/ext/standard/tests/strings/printf.phpt
+++ b/ext/standard/tests/strings/printf.phpt
@@ -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 ***
diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt
index 1a90970371..0106f71445 100644
--- a/ext/standard/tests/strings/printf_64bit.phpt
+++ b/ext/standard/tests/strings/printf_64bit.phpt
@@ -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 ***
diff --git a/ext/standard/tests/strings/printf_error.phpt b/ext/standard/tests/strings/printf_error.phpt
index a88390bc04..aff95426e6 100644
--- a/ext/standard/tests/strings/printf_error.phpt
+++ b/ext/standard/tests/strings/printf_error.phpt
@@ -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 --
diff --git a/ext/standard/tests/strings/quoted_printable_encode_001.phpt b/ext/standard/tests/strings/quoted_printable_encode_001.phpt
index 1ce7d791dc..df26d5cf4b 100644
--- a/ext/standard/tests/strings/quoted_printable_encode_001.phpt
+++ b/ext/standard/tests/strings/quoted_printable_encode_001.phpt
@@ -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) ""
diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt
index 5f57b0e850..223a839f58 100644
--- a/ext/standard/tests/strings/rtrim.phpt
+++ b/ext/standard/tests/strings/rtrim.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/rtrim_error.phpt b/ext/standard/tests/strings/rtrim_error.phpt
index 108f96a1f0..210fb58c4e 100644
--- a/ext/standard/tests/strings/rtrim_error.phpt
+++ b/ext/standard/tests/strings/rtrim_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/setlocale_error.phpt b/ext/standard/tests/strings/setlocale_error.phpt
index 14bb7d7ed5..c2b18b1992 100644
--- a/ext/standard/tests/strings/setlocale_error.phpt
+++ b/ext/standard/tests/strings/setlocale_error.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/sha1_file.phpt b/ext/standard/tests/strings/sha1_file.phpt
index 102dab75ff..09e81be014 100644
--- a/ext/standard/tests/strings/sha1_file.phpt
+++ b/ext/standard/tests/strings/sha1_file.phpt
@@ -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"
diff --git a/ext/standard/tests/strings/soundex.phpt b/ext/standard/tests/strings/soundex.phpt
index 650236c2e5..744f71c17a 100644
--- a/ext/standard/tests/strings/soundex.phpt
+++ b/ext/standard/tests/strings/soundex.phpt
@@ -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"
diff --git a/ext/standard/tests/strings/sprintf_error.phpt b/ext/standard/tests/strings/sprintf_error.phpt
index 1c12cd3168..1b21b8b141 100644
--- a/ext/standard/tests/strings/sprintf_error.phpt
+++ b/ext/standard/tests/strings/sprintf_error.phpt
@@ -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 --
diff --git a/ext/standard/tests/strings/sscanf_error.phpt b/ext/standard/tests/strings/sscanf_error.phpt
index ca967758ab..3e54a42f1e 100644
--- a/ext/standard/tests/strings/sscanf_error.phpt
+++ b/ext/standard/tests/strings/sscanf_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/str_ireplace.phpt b/ext/standard/tests/strings/str_ireplace.phpt
index 526b8ac723..71a9d1e127 100644
--- a/ext/standard/tests/strings/str_ireplace.phpt
+++ b/ext/standard/tests/strings/str_ireplace.phpt
@@ -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"
diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt
index b44a9517ab..be4c9ed942 100644
--- a/ext/standard/tests/strings/str_pad.phpt
+++ b/ext/standard/tests/strings/str_pad.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt
index 306b7d381a..766bea1f9c 100644
--- a/ext/standard/tests/strings/str_repeat.phpt
+++ b/ext/standard/tests/strings/str_repeat.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_replace.phpt b/ext/standard/tests/strings/str_replace.phpt
index 7b411abac5..bef11f872a 100644
--- a/ext/standard/tests/strings/str_replace.phpt
+++ b/ext/standard/tests/strings/str_replace.phpt
@@ -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
diff --git a/ext/standard/tests/strings/str_split_variation6.phpt b/ext/standard/tests/strings/str_split_variation6.phpt
index a477800a26..1aea668026 100644
--- a/ext/standard/tests/strings/str_split_variation6.phpt
+++ b/ext/standard/tests/strings/str_split_variation6.phpt
@@ -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
diff --git a/ext/standard/tests/strings/str_split_variation7.phpt b/ext/standard/tests/strings/str_split_variation7.phpt
index 5082c7ba2f..1a2471a20a 100644
--- a/ext/standard/tests/strings/str_split_variation7.phpt
+++ b/ext/standard/tests/strings/str_split_variation7.phpt
@@ -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
diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt
index f88646370b..e8fa12aca6 100644
--- a/ext/standard/tests/strings/str_word_count.phpt
+++ b/ext/standard/tests/strings/str_word_count.phpt
@@ -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"
diff --git a/ext/standard/tests/strings/strcasecmp.phpt b/ext/standard/tests/strings/strcasecmp.phpt
index 3086c2be92..d9063cc9de 100644
--- a/ext/standard/tests/strings/strcasecmp.phpt
+++ b/ext/standard/tests/strings/strcasecmp.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strcmp.phpt b/ext/standard/tests/strings/strcmp.phpt
index 397e072c52..fd20e50195 100644
--- a/ext/standard/tests/strings/strcmp.phpt
+++ b/ext/standard/tests/strings/strcmp.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/stripos_error.phpt b/ext/standard/tests/strings/stripos_error.phpt
index 324014cf6d..0420bb090b 100644
--- a/ext/standard/tests/strings/stripos_error.phpt
+++ b/ext/standard/tests/strings/stripos_error.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt
index 81d3b35a20..6792b4d0b2 100644
--- a/ext/standard/tests/strings/stripos_variation10.phpt
+++ b/ext/standard/tests/strings/stripos_variation10.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/stripos_variation11.phpt b/ext/standard/tests/strings/stripos_variation11.phpt
index 1f79b61d1a..aab3181df3 100644
--- a/ext/standard/tests/strings/stripos_variation11.phpt
+++ b/ext/standard/tests/strings/stripos_variation11.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/stristr.phpt b/ext/standard/tests/strings/stristr.phpt
index a0f0cc3497..92cfa09eb1 100644
--- a/ext/standard/tests/strings/stristr.phpt
+++ b/ext/standard/tests/strings/stristr.phpt
@@ -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"
diff --git a/ext/standard/tests/strings/stristr_error.phpt b/ext/standard/tests/strings/stristr_error.phpt
index a0057574f9..a7b683d3b8 100644
--- a/ext/standard/tests/strings/stristr_error.phpt
+++ b/ext/standard/tests/strings/stristr_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt
index 8ca09db66c..fd842d1106 100644
--- a/ext/standard/tests/strings/stristr_variation2.phpt
+++ b/ext/standard/tests/strings/stristr_variation2.phpt
@@ -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
diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt
index a546bdb8d2..156038ed7b 100644
--- a/ext/standard/tests/strings/strlen.phpt
+++ b/ext/standard/tests/strings/strlen.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strncasecmp_error.phpt b/ext/standard/tests/strings/strncasecmp_error.phpt
index d443f8113b..00ddfaed9b 100644
--- a/ext/standard/tests/strings/strncasecmp_error.phpt
+++ b/ext/standard/tests/strings/strncasecmp_error.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/strncmp_error.phpt b/ext/standard/tests/strings/strncmp_error.phpt
index 4eb73eb318..13a4cb0350 100644
--- a/ext/standard/tests/strings/strncmp_error.phpt
+++ b/ext/standard/tests/strings/strncmp_error.phpt
@@ -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 ***
diff --git a/ext/standard/tests/strings/strpbrk_error.phpt b/ext/standard/tests/strings/strpbrk_error.phpt
index 658e2f429e..cce843c2f1 100644
--- a/ext/standard/tests/strings/strpbrk_error.phpt
+++ b/ext/standard/tests/strings/strpbrk_error.phpt
@@ -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===
diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt
index a4c3a9c781..4640b670f3 100644
--- a/ext/standard/tests/strings/strpos.phpt
+++ b/ext/standard/tests/strings/strpos.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt
index 478ac80300..1004a3d915 100644
--- a/ext/standard/tests/strings/strrchr_variation10.phpt
+++ b/ext/standard/tests/strings/strrchr_variation10.phpt
@@ -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 --
diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt
index 92a9c07eee..79ffe4c2ec 100644
--- a/ext/standard/tests/strings/strrchr_variation11.phpt
+++ b/ext/standard/tests/strings/strrchr_variation11.phpt
@@ -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 --
diff --git a/ext/standard/tests/strings/strripos.phpt b/ext/standard/tests/strings/strripos.phpt
index 291ff78cd7..fa15e2fcac 100644
--- a/ext/standard/tests/strings/strripos.phpt
+++ b/ext/standard/tests/strings/strripos.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/strripos_offset.phpt b/ext/standard/tests/strings/strripos_offset.phpt
index b5d09d7946..5981c9b6cb 100644
--- a/ext/standard/tests/strings/strripos_offset.phpt
+++ b/ext/standard/tests/strings/strripos_offset.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt
index 1399b60985..d1bbc856a3 100644
--- a/ext/standard/tests/strings/strrpos_offset.phpt
+++ b/ext/standard/tests/strings/strrpos_offset.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt
index b374e7f9f6..440605d430 100644
--- a/ext/standard/tests/strings/strrpos_variation10.phpt
+++ b/ext/standard/tests/strings/strrpos_variation10.phpt
@@ -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 --
diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt
index f628427f08..71201a1c21 100644
--- a/ext/standard/tests/strings/strrpos_variation11.phpt
+++ b/ext/standard/tests/strings/strrpos_variation11.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt
index cc3b7c5453..6bdc3feab1 100644
--- a/ext/standard/tests/strings/strstr.phpt
+++ b/ext/standard/tests/strings/strstr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtolower-win32.phpt b/ext/standard/tests/strings/strtolower-win32.phpt
index c0ad1d0115..ff631754df 100644
--- a/ext/standard/tests/strings/strtolower-win32.phpt
+++ b/ext/standard/tests/strings/strtolower-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt
index 47dfe09762..7c7e2bb4c7 100644
--- a/ext/standard/tests/strings/strtolower.phpt
+++ b/ext/standard/tests/strings/strtolower.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtoupper1-win32.phpt b/ext/standard/tests/strings/strtoupper1-win32.phpt
index 60701652e1..7240e5c021 100644
--- a/ext/standard/tests/strings/strtoupper1-win32.phpt
+++ b/ext/standard/tests/strings/strtoupper1-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt
index e0ebf42ea7..c243ff10c7 100644
--- a/ext/standard/tests/strings/strtoupper1.phpt
+++ b/ext/standard/tests/strings/strtoupper1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strval_error.phpt b/ext/standard/tests/strings/strval_error.phpt
index 37ecfd14d5..acf3cc623a 100644
--- a/ext/standard/tests/strings/strval_error.phpt
+++ b/ext/standard/tests/strings/strval_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt
index 0901d2082e..18e7cd1781 100644
--- a/ext/standard/tests/strings/substr.phpt
+++ b/ext/standard/tests/strings/substr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/substr_compare.phpt b/ext/standard/tests/strings/substr_compare.phpt
index 1fdf1b144f..2e3256631c 100644
--- a/ext/standard/tests/strings/substr_compare.phpt
+++ b/ext/standard/tests/strings/substr_compare.phpt
@@ -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
diff --git a/ext/standard/tests/strings/substr_count_error.phpt b/ext/standard/tests/strings/substr_count_error.phpt
index eecc251e6c..246963d13b 100644
--- a/ext/standard/tests/strings/substr_count_error.phpt
+++ b/ext/standard/tests/strings/substr_count_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/substr_count_variation_001.phpt b/ext/standard/tests/strings/substr_count_variation_001.phpt
index 71f2d223e1..19a9a0310d 100644
--- a/ext/standard/tests/strings/substr_count_variation_001.phpt
+++ b/ext/standard/tests/strings/substr_count_variation_001.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/substr_replace_error.phpt b/ext/standard/tests/strings/substr_replace_error.phpt
index ac945349fe..936d0fd1d5 100644
--- a/ext/standard/tests/strings/substr_replace_error.phpt
+++ b/ext/standard/tests/strings/substr_replace_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt
index d0e4070d80..1ad504c61d 100644
--- a/ext/standard/tests/strings/trim1.phpt
+++ b/ext/standard/tests/strings/trim1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/trim_error.phpt b/ext/standard/tests/strings/trim_error.phpt
index b845cee1ac..046a2b04f9 100644
--- a/ext/standard/tests/strings/trim_error.phpt
+++ b/ext/standard/tests/strings/trim_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt
index 0b177a8565..3508881d3c 100644
--- a/ext/standard/tests/strings/ucfirst.phpt
+++ b/ext/standard/tests/strings/ucfirst.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/unpack_error.phpt b/ext/standard/tests/strings/unpack_error.phpt
index f04e493772..b34be23267 100644
--- a/ext/standard/tests/strings/unpack_error.phpt
+++ b/ext/standard/tests/strings/unpack_error.phpt
@@ -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
diff --git a/ext/standard/tests/strings/uuencode.phpt b/ext/standard/tests/strings/uuencode.phpt
index 5a1f3d2a24..8199a2ed05 100644
--- a/ext/standard/tests/strings/uuencode.phpt
+++ b/ext/standard/tests/strings/uuencode.phpt
@@ -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:
diff --git a/ext/standard/tests/strings/vfprintf_error1.phpt b/ext/standard/tests/strings/vfprintf_error1.phpt
index c56631ecd7..b4548e8b49 100644
--- a/ext/standard/tests/strings/vfprintf_error1.phpt
+++ b/ext/standard/tests/strings/vfprintf_error1.phpt
@@ -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===
diff --git a/ext/standard/tests/strings/vfprintf_error4.phpt b/ext/standard/tests/strings/vfprintf_error4.phpt
index 2865d42a9e..e54e34f4cd 100644
--- a/ext/standard/tests/strings/vfprintf_error4.phpt
+++ b/ext/standard/tests/strings/vfprintf_error4.phpt
@@ -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)
diff --git a/ext/standard/tests/strings/vfprintf_variation1.phpt b/ext/standard/tests/strings/vfprintf_variation1.phpt
index 76422011c2..7c969ffff9 100644
--- a/ext/standard/tests/strings/vfprintf_variation1.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation1.phpt
@@ -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===
diff --git a/ext/standard/tests/strings/wordwrap_error.phpt b/ext/standard/tests/strings/wordwrap_error.phpt
index 41c5cbdb69..ad75461d3d 100644
--- a/ext/standard/tests/strings/wordwrap_error.phpt
+++ b/ext/standard/tests/strings/wordwrap_error.phpt
@@ -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"
diff --git a/ext/standard/tests/time/strptime_error.phpt b/ext/standard/tests/time/strptime_error.phpt
index f49025be44..3f7bbbdb82 100644
--- a/ext/standard/tests/time/strptime_error.phpt
+++ b/ext/standard/tests/time/strptime_error.phpt
@@ -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===
diff --git a/ext/sysvmsg/tests/005.phpt b/ext/sysvmsg/tests/005.phpt
index a2680c21c0..0016ab82c2 100644
--- a/ext/sysvmsg/tests/005.phpt
+++ b/ext/sysvmsg/tests/005.phpt
@@ -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
diff --git a/ext/sysvshm/tests/001.phpt b/ext/sysvshm/tests/001.phpt
index 55fd8eec1d..55d5444b98 100644
--- a/ext/sysvshm/tests/001.phpt
+++ b/ext/sysvshm/tests/001.phpt
@@ -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)
diff --git a/ext/sysvshm/tests/002.phpt b/ext/sysvshm/tests/002.phpt
index 3bfb28e5c6..d558623242 100644
--- a/ext/sysvshm/tests/002.phpt
+++ b/ext/sysvshm/tests/002.phpt
@@ -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)
diff --git a/ext/sysvshm/tests/003.phpt b/ext/sysvshm/tests/003.phpt
index 010ac83cd3..fd81c48a67 100644
--- a/ext/sysvshm/tests/003.phpt
+++ b/ext/sysvshm/tests/003.phpt
@@ -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
diff --git a/ext/sysvshm/tests/004.phpt b/ext/sysvshm/tests/004.phpt
index ee64491840..23496f5c1c 100644
--- a/ext/sysvshm/tests/004.phpt
+++ b/ext/sysvshm/tests/004.phpt
@@ -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
diff --git a/ext/sysvshm/tests/005.phpt b/ext/sysvshm/tests/005.phpt
index 0a3d3422e8..879be31c13 100644
--- a/ext/sysvshm/tests/005.phpt
+++ b/ext/sysvshm/tests/005.phpt
@@ -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) {
}
diff --git a/ext/sysvshm/tests/006.phpt b/ext/sysvshm/tests/006.phpt
index b38aee02a1..278838f063 100644
--- a/ext/sysvshm/tests/006.phpt
+++ b/ext/sysvshm/tests/006.phpt
@@ -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"
diff --git a/ext/sysvshm/tests/007.phpt b/ext/sysvshm/tests/007.phpt
index a165a8bfbf..747d401333 100644
--- a/ext/sysvshm/tests/007.phpt
+++ b/ext/sysvshm/tests/007.phpt
@@ -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
diff --git a/ext/tidy/tests/019.phpt b/ext/tidy/tests/019.phpt
index 188b8cd4e9..dae23127b5 100644
--- a/ext/tidy/tests/019.phpt
+++ b/ext/tidy/tests/019.phpt
@@ -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
diff --git a/ext/tokenizer/tests/001.phpt b/ext/tokenizer/tests/001.phpt
index 4c6295cdf8..8e58c81891 100644
--- a/ext/tokenizer/tests/001.phpt
+++ b/ext/tokenizer/tests/001.phpt
@@ -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
diff --git a/ext/tokenizer/tests/003.phpt b/ext/tokenizer/tests/003.phpt
index 3ba6d594df..6c3cc4c559 100644
--- a/ext/tokenizer/tests/003.phpt
+++ b/ext/tokenizer/tests/003.phpt
@@ -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) {
diff --git a/ext/xmlrpc/tests/001.phpt b/ext/xmlrpc/tests/001.phpt
index 49dfba8f10..af41530ab2 100644
--- a/ext/xmlrpc/tests/001.phpt
+++ b/ext/xmlrpc/tests/001.phpt
@@ -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>
diff --git a/ext/xmlrpc/tests/002.phpt b/ext/xmlrpc/tests/002.phpt
index cb4b4aa818..a791082337 100644
--- a/ext/xmlrpc/tests/002.phpt
+++ b/ext/xmlrpc/tests/002.phpt
@@ -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
diff --git a/ext/xmlwriter/tests/bug41326.phpt b/ext/xmlwriter/tests/bug41326.phpt
index c87af84722..886e149261 100644
--- a/ext/xmlwriter/tests/bug41326.phpt
+++ b/ext/xmlwriter/tests/bug41326.phpt
@@ -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/>
diff --git a/ext/zip/tests/oo_getcomment.phpt b/ext/zip/tests/oo_getcomment.phpt
index c6b505828d..b3da94e5f8 100644
--- a/ext/zip/tests/oo_getcomment.phpt
+++ b/ext/zip/tests/oo_getcomment.phpt
@@ -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
diff --git a/ext/zip/tests/zip_open_error.phpt b/ext/zip/tests/zip_open_error.phpt
index eaa1d9731e..068956b81f 100644
--- a/ext/zip/tests/zip_open_error.phpt
+++ b/ext/zip/tests/zip_open_error.phpt
@@ -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
diff --git a/ext/zlib/tests/004-mb.phpt b/ext/zlib/tests/004-mb.phpt
index 92f7db1b70..607228fd6f 100644
--- a/ext/zlib/tests/004-mb.phpt
+++ b/ext/zlib/tests/004-mb.phpt
@@ -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
diff --git a/ext/zlib/tests/004.phpt b/ext/zlib/tests/004.phpt
index b8d0f0eccd..4437ab154f 100644
--- a/ext/zlib/tests/004.phpt
+++ b/ext/zlib/tests/004.phpt
@@ -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
diff --git a/ext/zlib/tests/005.phpt b/ext/zlib/tests/005.phpt
index 6333612183..69fe8efe6a 100644
--- a/ext/zlib/tests/005.phpt
+++ b/ext/zlib/tests/005.phpt
@@ -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)
diff --git a/ext/zlib/tests/006.phpt b/ext/zlib/tests/006.phpt
index 0d082092ca..2c666390c8 100644
--- a/ext/zlib/tests/006.phpt
+++ b/ext/zlib/tests/006.phpt
@@ -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)
diff --git a/ext/zlib/tests/007.phpt b/ext/zlib/tests/007.phpt
index 6c42bf67db..6028104b9a 100644
--- a/ext/zlib/tests/007.phpt
+++ b/ext/zlib/tests/007.phpt
@@ -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)
diff --git a/ext/zlib/tests/gzcompress_error1.phpt b/ext/zlib/tests/gzcompress_error1.phpt
index 3f742a4dca..3601c61b53 100644
--- a/ext/zlib/tests/gzcompress_error1.phpt
+++ b/ext/zlib/tests/gzcompress_error1.phpt
@@ -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===
diff --git a/ext/zlib/tests/gzdeflate_error1.phpt b/ext/zlib/tests/gzdeflate_error1.phpt
index 93f8c03b4c..af74d1c771 100644
--- a/ext/zlib/tests/gzdeflate_error1.phpt
+++ b/ext/zlib/tests/gzdeflate_error1.phpt
@@ -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===
diff --git a/ext/zlib/tests/gzencode_error1.phpt b/ext/zlib/tests/gzencode_error1.phpt
index ac846866c5..15b70afb8a 100644
--- a/ext/zlib/tests/gzencode_error1.phpt
+++ b/ext/zlib/tests/gzencode_error1.phpt
@@ -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===
diff --git a/ext/zlib/tests/gzinflate_error1.phpt b/ext/zlib/tests/gzinflate_error1.phpt
index cbfe615511..5b8e40620c 100644
--- a/ext/zlib/tests/gzinflate_error1.phpt
+++ b/ext/zlib/tests/gzinflate_error1.phpt
@@ -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===
diff --git a/ext/zlib/tests/gzopen_variation4.phpt b/ext/zlib/tests/gzopen_variation4.phpt
index baa9c715ae..b02c7152a8 100644
--- a/ext/zlib/tests/gzopen_variation4.phpt
+++ b/ext/zlib/tests/gzopen_variation4.phpt
@@ -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
diff --git a/ext/zlib/tests/gzuncompress_error1.phpt b/ext/zlib/tests/gzuncompress_error1.phpt
index f200951d4c..8683a6c829 100644
--- a/ext/zlib/tests/gzuncompress_error1.phpt
+++ b/ext/zlib/tests/gzuncompress_error1.phpt
@@ -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===
diff --git a/ext/zlib/tests/inflate_init_error.phpt b/ext/zlib/tests/inflate_init_error.phpt
index 58773e61d3..504f795aec 100644
--- a/ext/zlib/tests/inflate_init_error.phpt
+++ b/ext/zlib/tests/inflate_init_error.phpt
@@ -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
index 004a07775a..0000000000
--- a/ext/zlib/tests/readgzfile_variation10.phpt
+++ /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===
diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt
index 6ce810c836..c69eaa458c 100644
--- a/tests/classes/abstract_user_call.phpt
+++ b/tests/classes/abstract_user_call.phpt
@@ -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===
diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt
index 4fc41c85f5..c5b32debae 100644
--- a/tests/classes/autoload_012.phpt
+++ b/tests/classes/autoload_012.phpt
@@ -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
diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt
index ba44806bfe..4e227a1075 100644
--- a/tests/classes/bug27504.phpt
+++ b/tests/classes/bug27504.phpt
@@ -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 ''
diff --git a/tests/lang/func_get_arg_variation.phpt b/tests/lang/func_get_arg_variation.phpt
index 741b6604c0..bd1fa5b4c5 100644
--- a/tests/lang/func_get_arg_variation.phpt
+++ b/tests/lang/func_get_arg_variation.phpt
@@ -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
diff --git a/tests/output/ob_014.phpt b/tests/output/ob_014.phpt
index 09534270f3..bc46f2ae58 100644
--- a/tests/output/ob_014.phpt
+++ b/tests/output/ob_014.phpt
@@ -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
diff --git a/tests/output/ob_015.phpt b/tests/output/ob_015.phpt
index 2acdb40d0a..2bc08687d7 100644
--- a/tests/output/ob_015.phpt
+++ b/tests/output/ob_015.phpt
@@ -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
diff --git a/tests/output/ob_start_error_001.phpt b/tests/output/ob_start_error_001.phpt
index 29288e2028..83b3a4186d 100644
--- a/tests/output/ob_start_error_001.phpt
+++ b/tests/output/ob_start_error_001.phpt
@@ -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
diff --git a/tests/output/stream_isatty.inc b/tests/output/stream_isatty.inc
index 4b7f39986f..9700fd98f1 100644
--- a/tests/output/stream_isatty.inc
+++ b/tests/output/stream_isatty.inc
@@ -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'),
diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt
index b071862c93..614d9205af 100644
--- a/tests/output/stream_isatty_err.phpt
+++ b/tests/output/stream_isatty_err.phpt
@@ -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)
diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt
index fac84efb57..1b3de7db8d 100644
--- a/tests/output/stream_isatty_in-err.phpt
+++ b/tests/output/stream_isatty_in-err.phpt
@@ -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)
diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt
index 56c49f70a8..b83c2d2199 100644
--- a/tests/output/stream_isatty_in-out-err.phpt
+++ b/tests/output/stream_isatty_in-out-err.phpt
@@ -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)
diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt
index 70f2c030f4..f047eff297 100644
--- a/tests/output/stream_isatty_in-out.phpt
+++ b/tests/output/stream_isatty_in-out.phpt
@@ -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)
diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt
index 4bd06d124d..c0003d8549 100644
--- a/tests/output/stream_isatty_out-err.phpt
+++ b/tests/output/stream_isatty_out-err.phpt
@@ -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)
diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt
index 14e1fb8607..442a603c30 100644
--- a/tests/output/stream_isatty_out.phpt
+++ b/tests/output/stream_isatty_out.phpt
@@ -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)