summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/curl/tests/curl_version_variation1.phpt159
-rw-r--r--ext/date/tests/DateTimeZone_construct_variation1.phpt192
-rw-r--r--ext/date/tests/DateTimeZone_getOffset_variation1.phpt252
-rw-r--r--ext/date/tests/DateTime_construct_variation1.phpt377
-rw-r--r--ext/date/tests/DateTime_construct_variation2.phpt231
-rw-r--r--ext/date/tests/DateTime_format_variation1.phpt208
-rw-r--r--ext/date/tests/DateTime_modify_variation1.phpt262
-rw-r--r--ext/date/tests/DateTime_setDate_variation1.phpt329
-rw-r--r--ext/date/tests/DateTime_setDate_variation2.phpt329
-rw-r--r--ext/date/tests/DateTime_setDate_variation3.phpt329
-rw-r--r--ext/date/tests/DateTime_setISODate_variation1.phpt329
-rw-r--r--ext/date/tests/DateTime_setISODate_variation2.phpt329
-rw-r--r--ext/date/tests/DateTime_setISODate_variation3.phpt329
-rw-r--r--ext/date/tests/DateTime_setTime_variation1.phpt329
-rw-r--r--ext/date/tests/DateTime_setTime_variation2.phpt329
-rw-r--r--ext/date/tests/DateTime_setTime_variation3.phpt329
-rw-r--r--ext/date/tests/DateTime_setTimezone_variation1.phpt252
-rw-r--r--ext/date/tests/checkdate_variation1.phpt201
-rw-r--r--ext/date/tests/checkdate_variation2.phpt201
-rw-r--r--ext/date/tests/checkdate_variation3.phpt201
-rw-r--r--ext/date/tests/date_create_variation1.phpt389
-rw-r--r--ext/date/tests/date_create_variation2.phpt272
-rw-r--r--ext/date/tests/date_date_set_variation1.phpt254
-rw-r--r--ext/date/tests/date_date_set_variation2.phpt329
-rw-r--r--ext/date/tests/date_date_set_variation3.phpt329
-rw-r--r--ext/date/tests/date_date_set_variation4.phpt329
-rw-r--r--ext/date/tests/date_default_timezone_set_variation1.phpt200
-rw-r--r--ext/date/tests/date_format_variation1.phpt252
-rw-r--r--ext/date/tests/date_format_variation2.phpt208
-rw-r--r--ext/date/tests/date_isodate_set_variation1.phpt254
-rw-r--r--ext/date/tests/date_isodate_set_variation2.phpt329
-rw-r--r--ext/date/tests/date_isodate_set_variation3.phpt329
-rw-r--r--ext/date/tests/date_isodate_set_variation4.phpt329
-rw-r--r--ext/date/tests/date_modify_variation1.phpt252
-rw-r--r--ext/date/tests/date_modify_variation2.phpt262
-rw-r--r--ext/date/tests/date_offset_get_variation1.phpt250
-rw-r--r--ext/date/tests/date_parse_variation1.phpt274
-rw-r--r--ext/date/tests/date_sun_info_variation1.phpt492
-rw-r--r--ext/date/tests/date_sun_info_variation2.phpt492
-rw-r--r--ext/date/tests/date_sun_info_variation3.phpt493
-rw-r--r--ext/date/tests/date_sunrise_variation1.phpt316
-rw-r--r--ext/date/tests/date_sunrise_variation2.phpt213
-rw-r--r--ext/date/tests/date_sunrise_variation3.phpt294
-rw-r--r--ext/date/tests/date_sunrise_variation4.phpt296
-rw-r--r--ext/date/tests/date_sunrise_variation5.phpt296
-rw-r--r--ext/date/tests/date_sunrise_variation6.phpt295
-rw-r--r--ext/date/tests/date_sunset_variation1.phpt316
-rw-r--r--ext/date/tests/date_sunset_variation2.phpt213
-rw-r--r--ext/date/tests/date_sunset_variation3.phpt297
-rw-r--r--ext/date/tests/date_sunset_variation4.phpt296
-rw-r--r--ext/date/tests/date_sunset_variation5.phpt296
-rw-r--r--ext/date/tests/date_sunset_variation6.phpt296
-rw-r--r--ext/date/tests/date_time_set_variation1.phpt254
-rw-r--r--ext/date/tests/date_time_set_variation2.phpt329
-rw-r--r--ext/date/tests/date_time_set_variation3.phpt329
-rw-r--r--ext/date/tests/date_time_set_variation4.phpt329
-rw-r--r--ext/date/tests/date_timezone_get_variation1.phpt250
-rw-r--r--ext/date/tests/date_timezone_set_variation1.phpt253
-rw-r--r--ext/date/tests/date_timezone_set_variation2.phpt252
-rw-r--r--ext/date/tests/date_variation1.phpt207
-rw-r--r--ext/date/tests/date_variation2.phpt221
-rw-r--r--ext/date/tests/getdate_variation1.phpt443
-rw-r--r--ext/date/tests/gettimeofday_variation1.phpt284
-rw-r--r--ext/date/tests/gmdate_variation1.phpt221
-rw-r--r--ext/date/tests/gmdate_variation2.phpt210
-rw-r--r--ext/date/tests/gmmktime_variation1.phpt194
-rw-r--r--ext/date/tests/gmmktime_variation2.phpt194
-rw-r--r--ext/date/tests/gmmktime_variation3.phpt194
-rw-r--r--ext/date/tests/gmmktime_variation4.phpt194
-rw-r--r--ext/date/tests/gmmktime_variation5.phpt194
-rw-r--r--ext/date/tests/gmmktime_variation6.phpt190
-rw-r--r--ext/date/tests/gmstrftime_variation1.phpt220
-rw-r--r--ext/date/tests/gmstrftime_variation2.phpt210
-rw-r--r--ext/date/tests/idate_variation1.phpt301
-rw-r--r--ext/date/tests/idate_variation2.phpt191
-rw-r--r--ext/date/tests/localtime_variation1.phpt658
-rw-r--r--ext/date/tests/localtime_variation2.phpt643
-rw-r--r--ext/date/tests/mktime_variation1.phpt224
-rw-r--r--ext/date/tests/mktime_variation2.phpt218
-rw-r--r--ext/date/tests/mktime_variation3.phpt219
-rw-r--r--ext/date/tests/mktime_variation4.phpt220
-rw-r--r--ext/date/tests/mktime_variation5.phpt221
-rw-r--r--ext/date/tests/mktime_variation6.phpt222
-rw-r--r--ext/date/tests/strftime_variation1.phpt222
-rw-r--r--ext/date/tests/strftime_variation2.phpt191
-rw-r--r--ext/date/tests/timezone_name_from_abbr_variation1.phpt205
-rw-r--r--ext/date/tests/timezone_name_from_abbr_variation2.phpt219
-rw-r--r--ext/date/tests/timezone_name_from_abbr_variation3.phpt219
-rw-r--r--ext/date/tests/timezone_offset_get_variation1.phpt200
-rw-r--r--ext/date/tests/timezone_offset_get_variation2.phpt200
-rw-r--r--ext/date/tests/timezone_open_variation1.phpt239
-rw-r--r--ext/date/tests/timezone_transitions_get_variation1.phpt250
-rw-r--r--ext/date/tests/timezone_transitions_get_variation2.phpt279
-rw-r--r--ext/date/tests/timezone_transitions_get_variation3.phpt279
-rw-r--r--ext/exif/tests/exif_imagetype_variation1.phpt214
-rw-r--r--ext/exif/tests/exif_tagname_variation1-64bit.phpt182
-rw-r--r--ext/exif/tests/exif_tagname_variation1.phpt174
-rw-r--r--ext/gd/tests/imagecolorallocate_variation1.phpt267
-rw-r--r--ext/gd/tests/imagecolorallocate_variation2.phpt215
-rw-r--r--ext/gd/tests/imagecolorallocate_variation3.phpt214
-rw-r--r--ext/gd/tests/imagecolorallocate_variation4.phpt214
-rw-r--r--ext/iconv/tests/iconv_get_encoding_error.phpt177
-rw-r--r--ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt218
-rw-r--r--ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt466
-rw-r--r--ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt469
-rw-r--r--ext/iconv/tests/iconv_mime_decode_variation1.phpt183
-rw-r--r--ext/iconv/tests/iconv_mime_decode_variation2.phpt198
-rw-r--r--ext/iconv/tests/iconv_mime_decode_variation3.phpt222
-rw-r--r--ext/iconv/tests/iconv_set_encoding_error.phpt177
-rw-r--r--ext/iconv/tests/iconv_set_encoding_variation.phpt309
-rw-r--r--ext/iconv/tests/iconv_strlen_variation1.phpt193
-rw-r--r--ext/iconv/tests/iconv_strlen_variation2.phpt203
-rw-r--r--ext/iconv/tests/iconv_strpos_variation1.phpt182
-rw-r--r--ext/iconv/tests/iconv_strpos_variation2.phpt182
-rw-r--r--ext/iconv/tests/iconv_strpos_variation3.phpt210
-rw-r--r--ext/iconv/tests/iconv_strpos_variation3_64bit.phpt208
-rw-r--r--ext/iconv/tests/iconv_strpos_variation4.phpt206
-rw-r--r--ext/iconv/tests/iconv_strrpos_variation1.phpt179
-rw-r--r--ext/iconv/tests/iconv_strrpos_variation2.phpt181
-rw-r--r--ext/iconv/tests/iconv_strrpos_variation3.phpt204
-rw-r--r--ext/imap/tests/imap_close_variation1.phpt214
-rw-r--r--ext/imap/tests/imap_close_variation2.phpt227
-rw-r--r--ext/imap/tests/imap_fetch_overview_variation1.phpt221
-rw-r--r--ext/imap/tests/imap_fetch_overview_variation2.phpt230
-rw-r--r--ext/imap/tests/imap_fetchbody_variation1.phpt219
-rw-r--r--ext/imap/tests/imap_fetchbody_variation2.phpt221
-rw-r--r--ext/imap/tests/imap_fetchbody_variation3.phpt217
-rw-r--r--ext/imap/tests/imap_fetchheader_variation1.phpt245
-rw-r--r--ext/imap/tests/imap_fetchheader_variation2.phpt274
-rw-r--r--ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt206
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt184
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt224
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt186
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt187
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt216
-rw-r--r--ext/mbstring/tests/mb_ereg_replace_variation2.phpt178
-rw-r--r--ext/mbstring/tests/mb_ereg_replace_variation3.phpt179
-rw-r--r--ext/mbstring/tests/mb_ereg_replace_variation4.phpt179
-rw-r--r--ext/mbstring/tests/mb_internal_encoding_variation1.phpt216
-rw-r--r--ext/mbstring/tests/mb_regex_encoding_variation1.phpt215
-rw-r--r--ext/mbstring/tests/mb_split_variation1.phpt246
-rw-r--r--ext/mbstring/tests/mb_split_variation2.phpt248
-rw-r--r--ext/mbstring/tests/mb_split_variation3.phpt332
-rw-r--r--ext/mbstring/tests/mb_stripos_variation1.phpt183
-rw-r--r--ext/mbstring/tests/mb_stripos_variation2.phpt199
-rw-r--r--ext/mbstring/tests/mb_stripos_variation3.phpt211
-rw-r--r--ext/mbstring/tests/mb_stripos_variation4.phpt222
-rw-r--r--ext/mbstring/tests/mb_stristr_variation1.phpt207
-rw-r--r--ext/mbstring/tests/mb_stristr_variation2.phpt215
-rw-r--r--ext/mbstring/tests/mb_stristr_variation3.phpt232
-rw-r--r--ext/mbstring/tests/mb_stristr_variation4.phpt227
-rw-r--r--ext/mbstring/tests/mb_strlen_variation1.phpt180
-rw-r--r--ext/mbstring/tests/mb_strlen_variation2.phpt219
-rw-r--r--ext/mbstring/tests/mb_strpos_variation1.phpt182
-rw-r--r--ext/mbstring/tests/mb_strpos_variation2.phpt198
-rw-r--r--ext/mbstring/tests/mb_strpos_variation3.phpt211
-rw-r--r--ext/mbstring/tests/mb_strpos_variation4.phpt221
-rw-r--r--ext/mbstring/tests/mb_strrchr_variation1.phpt207
-rw-r--r--ext/mbstring/tests/mb_strrchr_variation2.phpt207
-rw-r--r--ext/mbstring/tests/mb_strrchr_variation3.phpt232
-rw-r--r--ext/mbstring/tests/mb_strrchr_variation4.phpt227
-rw-r--r--ext/mbstring/tests/mb_strrichr_variation1.phpt207
-rw-r--r--ext/mbstring/tests/mb_strrichr_variation2.phpt207
-rw-r--r--ext/mbstring/tests/mb_strrichr_variation3.phpt232
-rw-r--r--ext/mbstring/tests/mb_strrichr_variation4.phpt227
-rw-r--r--ext/mbstring/tests/mb_strripos_variation1.phpt183
-rw-r--r--ext/mbstring/tests/mb_strripos_variation2.phpt183
-rw-r--r--ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt206
-rw-r--r--ext/mbstring/tests/mb_strripos_variation4.phpt222
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation1.phpt180
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation2.phpt182
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation3.phpt153
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation4.phpt221
-rw-r--r--ext/mbstring/tests/mb_strstr_variation1.phpt207
-rw-r--r--ext/mbstring/tests/mb_strstr_variation2.phpt215
-rw-r--r--ext/mbstring/tests/mb_strstr_variation3.phpt232
-rw-r--r--ext/mbstring/tests/mb_strstr_variation4.phpt227
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation1.phpt178
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation2.phpt217
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation1.phpt180
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation2.phpt217
-rw-r--r--ext/mbstring/tests/mb_substr_count_variation1.phpt182
-rw-r--r--ext/mbstring/tests/mb_substr_count_variation2.phpt196
-rw-r--r--ext/mbstring/tests/mb_substr_count_variation3.phpt220
-rw-r--r--ext/mbstring/tests/mb_substr_variation1.phpt180
-rw-r--r--ext/mbstring/tests/mb_substr_variation2.phpt226
-rw-r--r--ext/mbstring/tests/mb_substr_variation3.phpt445
-rw-r--r--ext/posix/tests/posix_getgrgid_variation.phpt188
-rw-r--r--ext/posix/tests/posix_getpgid_variation.phpt188
-rw-r--r--ext/posix/tests/posix_getpwuid_variation.phpt188
-rw-r--r--ext/posix/tests/posix_kill_variation1.phpt182
-rw-r--r--ext/posix/tests/posix_kill_variation2.phpt182
-rw-r--r--ext/posix/tests/posix_seteuid_variation3.phpt48
-rw-r--r--ext/posix/tests/posix_setgid_variation3.phpt48
-rw-r--r--ext/posix/tests/posix_setuid_variation3.phpt48
-rw-r--r--ext/posix/tests/posix_strerror_variation1.phpt181
-rw-r--r--ext/session/tests/session_commit_error.phpt217
-rw-r--r--ext/session/tests/session_decode_error.phpt223
-rw-r--r--ext/session/tests/session_encode_error.phpt219
-rw-r--r--ext/session/tests/session_get_cookie_params_error.phpt216
-rw-r--r--ext/session/tests/session_id_error.phpt171
-rw-r--r--ext/session/tests/session_module_name_error.phpt216
-rw-r--r--ext/session/tests/session_name_error.phpt236
-rw-r--r--ext/session/tests/session_regenerate_id_error.phpt217
-rw-r--r--ext/session/tests/session_save_path_error.phpt176
-rw-r--r--ext/session/tests/session_start_error.phpt290
-rw-r--r--ext/session/tests/session_unset_error.phpt217
-rw-r--r--ext/session/tests/session_write_close_error.phpt217
-rw-r--r--ext/spl/tests/class_implements_variation2.phpt259
-rw-r--r--ext/spl/tests/class_uses_variation2.phpt261
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation1.phpt223
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation2.phpt289
-rw-r--r--ext/standard/tests/array/array_chunk_variation1.phpt325
-rw-r--r--ext/standard/tests/array/array_chunk_variation2.phpt429
-rw-r--r--ext/standard/tests/array/array_chunk_variation3.phpt268
-rw-r--r--ext/standard/tests/array/array_combine_variation1.phpt198
-rw-r--r--ext/standard/tests/array/array_combine_variation2.phpt198
-rw-r--r--ext/standard/tests/array/array_fill_variation1.phpt244
-rw-r--r--ext/standard/tests/array/array_fill_variation1_64bit.phpt247
-rw-r--r--ext/standard/tests/array/array_fill_variation2.phpt198
-rw-r--r--ext/standard/tests/array/array_filter_variation1.phpt195
-rw-r--r--ext/standard/tests/array/array_filter_variation2.phpt184
-rw-r--r--ext/standard/tests/array/array_flip_variation1.phpt179
-rw-r--r--ext/standard/tests/array/array_key_exists_variation2.phpt224
-rw-r--r--ext/standard/tests/array/array_map_variation18.phpt205
-rw-r--r--ext/standard/tests/array/array_pad_variation1.phpt270
-rw-r--r--ext/standard/tests/array/array_pad_variation2.phpt258
-rw-r--r--ext/standard/tests/array/array_product_variation5.phpt223
-rw-r--r--ext/standard/tests/array/array_push_variation1.phpt225
-rw-r--r--ext/standard/tests/array/array_rand_variation1.phpt216
-rw-r--r--ext/standard/tests/array/array_rand_variation2.phpt216
-rw-r--r--ext/standard/tests/array/array_reverse_variation1.phpt340
-rw-r--r--ext/standard/tests/array/array_reverse_variation2.phpt414
-rw-r--r--ext/standard/tests/array/array_shift_variation1.phpt218
-rw-r--r--ext/standard/tests/array/array_slice_variation4.phpt326
-rw-r--r--ext/standard/tests/array/array_sum_variation1.phpt179
-rw-r--r--ext/standard/tests/array/array_unique_variation1.phpt195
-rw-r--r--ext/standard/tests/array/array_unshift_variation1.phpt338
-rw-r--r--ext/standard/tests/array/array_values_variation1.phpt223
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation1.phpt250
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation2.phpt268
-rw-r--r--ext/standard/tests/array/array_walk_variation1.phpt250
-rw-r--r--ext/standard/tests/array/array_walk_variation2.phpt268
-rw-r--r--ext/standard/tests/array/arsort_variation1.phpt399
-rw-r--r--ext/standard/tests/array/arsort_variation2.phpt308
-rw-r--r--ext/standard/tests/array/asort_variation1.phpt399
-rw-r--r--ext/standard/tests/array/asort_variation2.phpt308
-rw-r--r--ext/standard/tests/array/count_variation1.phpt218
-rw-r--r--ext/standard/tests/array/count_variation2.phpt189
-rw-r--r--ext/standard/tests/array/current_variation1.phpt217
-rw-r--r--ext/standard/tests/array/end_variation1.phpt220
-rw-r--r--ext/standard/tests/array/key_variation1.phpt220
-rw-r--r--ext/standard/tests/array/krsort_variation1.phpt397
-rw-r--r--ext/standard/tests/array/krsort_variation2.phpt307
-rw-r--r--ext/standard/tests/array/ksort_variation1.phpt397
-rw-r--r--ext/standard/tests/array/ksort_variation2.phpt307
-rw-r--r--ext/standard/tests/array/natcasesort_variation1.phpt222
-rw-r--r--ext/standard/tests/array/next_variation1.phpt219
-rw-r--r--ext/standard/tests/array/prev_variation1.phpt219
-rw-r--r--ext/standard/tests/array/reset_variation1.phpt219
-rw-r--r--ext/standard/tests/array/rsort_variation1.phpt513
-rw-r--r--ext/standard/tests/array/rsort_variation2.phpt485
-rw-r--r--ext/standard/tests/array/shuffle_variation1.phpt213
-rw-r--r--ext/standard/tests/array/sort_variation1.phpt398
-rw-r--r--ext/standard/tests/array/sort_variation2.phpt311
-rw-r--r--ext/standard/tests/array/uasort_variation1.phpt188
-rw-r--r--ext/standard/tests/array/uasort_variation2.phpt212
-rw-r--r--ext/standard/tests/array/uksort_variation1.phpt224
-rw-r--r--ext/standard/tests/array/uksort_variation2.phpt224
-rw-r--r--ext/standard/tests/array/usort_variation1.phpt236
-rw-r--r--ext/standard/tests/array/usort_variation2.phpt242
-rw-r--r--ext/standard/tests/class_object/class_exists_variation_001.phpt182
-rw-r--r--ext/standard/tests/class_object/class_exists_variation_002.phpt198
-rw-r--r--ext/standard/tests/class_object/get_object_vars_variation_003.phpt210
-rw-r--r--ext/standard/tests/class_object/interface_exists_variation1.phpt184
-rw-r--r--ext/standard/tests/class_object/interface_exists_variation2.phpt204
-rw-r--r--ext/standard/tests/class_object/is_a_variation_002.phpt173
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_variation_002.phpt176
-rw-r--r--ext/standard/tests/class_object/method_exists_variation_002.phpt176
-rw-r--r--ext/standard/tests/class_object/trait_exists_variation_001.phpt182
-rw-r--r--ext/standard/tests/class_object/trait_exists_variation_002.phpt198
-rw-r--r--ext/standard/tests/file/basename_variation3.phpt185
-rw-r--r--ext/standard/tests/file/basename_variation4.phpt188
-rw-r--r--ext/standard/tests/file/chmod_variation3.phpt208
-rw-r--r--ext/standard/tests/file/chmod_variation4.phpt202
-rw-r--r--ext/standard/tests/file/dirname_variation1.phpt189
-rw-r--r--ext/standard/tests/file/file_get_contents_variation3.phpt218
-rw-r--r--ext/standard/tests/file/file_get_contents_variation4.phpt251
-rw-r--r--ext/standard/tests/file/file_get_contents_variation5_32bit.phpt236
-rw-r--r--ext/standard/tests/file/file_get_contents_variation5_64bit.phpt235
-rw-r--r--ext/standard/tests/file/file_get_contents_variation6.phpt215
-rw-r--r--ext/standard/tests/file/file_variation2.phpt210
-rw-r--r--ext/standard/tests/file/file_variation3.phpt296
-rw-r--r--ext/standard/tests/file/file_variation4.phpt291
-rw-r--r--ext/standard/tests/file/fopen_variation3.phpt218
-rw-r--r--ext/standard/tests/file/fopen_variation4.phpt247
-rw-r--r--ext/standard/tests/file/fpassthru_variation1.phpt223
-rw-r--r--ext/standard/tests/file/fseek_variation1.phpt197
-rw-r--r--ext/standard/tests/file/fseek_variation2.phpt160
-rw-r--r--ext/standard/tests/file/fstat_variation3.phpt41
-rw-r--r--ext/standard/tests/file/mkdir_variation1-win32.phpt122
-rw-r--r--ext/standard/tests/file/mkdir_variation1.phpt121
-rw-r--r--ext/standard/tests/file/mkdir_variation2.phpt191
-rw-r--r--ext/standard/tests/file/mkdir_variation3.phpt208
-rw-r--r--ext/standard/tests/file/mkdir_variation4.phpt220
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation4.phpt210
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation5.phpt253
-rw-r--r--ext/standard/tests/file/pathinfo_variation1.phpt190
-rw-r--r--ext/standard/tests/file/pathinfo_variation2.phpt199
-rw-r--r--ext/standard/tests/file/pclose_variation1.phpt231
-rw-r--r--ext/standard/tests/file/readfile_variation4.phpt251
-rw-r--r--ext/standard/tests/file/readfile_variation5.phpt221
-rw-r--r--ext/standard/tests/file/rename_variation10.phpt249
-rw-r--r--ext/standard/tests/file/rmdir_variation1-win32.phpt127
-rw-r--r--ext/standard/tests/file/rmdir_variation1.phpt127
-rw-r--r--ext/standard/tests/file/touch_variation3-win32-mb.phpt199
-rw-r--r--ext/standard/tests/file/touch_variation3-win32.phpt199
-rw-r--r--ext/standard/tests/file/touch_variation3.phpt199
-rw-r--r--ext/standard/tests/file/touch_variation4-win32.phpt199
-rw-r--r--ext/standard/tests/file/touch_variation4.phpt199
-rw-r--r--ext/standard/tests/file/unlink_variation7.phpt242
-rw-r--r--ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt208
-rw-r--r--ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt210
-rw-r--r--ext/standard/tests/general_functions/get_extension_funcs_variation.phpt137
-rw-r--r--ext/standard/tests/general_functions/getrusage_variation1.phpt142
-rw-r--r--ext/standard/tests/general_functions/intval_variation2.phpt199
-rw-r--r--ext/standard/tests/general_functions/php_uname_variation1.phpt112
-rw-r--r--ext/standard/tests/general_functions/proc_nice_variation3.phpt48
-rw-r--r--ext/standard/tests/image/getimagesize_variation1.phpt185
-rw-r--r--ext/standard/tests/image/image_type_to_mime_type_variation1.phpt154
-rw-r--r--ext/standard/tests/mail/ezmlm_hash_variation1.phpt193
-rw-r--r--ext/standard/tests/math/atan2_variation1.phpt187
-rw-r--r--ext/standard/tests/math/atan2_variation2.phpt186
-rw-r--r--ext/standard/tests/math/base_convert_variation2.phpt193
-rw-r--r--ext/standard/tests/math/base_convert_variation3.phpt193
-rw-r--r--ext/standard/tests/math/exp_variation1.phpt187
-rw-r--r--ext/standard/tests/math/expm1_variation1.phpt199
-rw-r--r--ext/standard/tests/math/fmod_variation1.phpt184
-rw-r--r--ext/standard/tests/math/fmod_variation2.phpt184
-rw-r--r--ext/standard/tests/math/hypot_variation1.phpt185
-rw-r--r--ext/standard/tests/math/hypot_variation2.phpt185
-rw-r--r--ext/standard/tests/math/is_finite_variation1.phpt184
-rw-r--r--ext/standard/tests/math/is_infinite_variation1.phpt184
-rw-r--r--ext/standard/tests/math/is_nan_variation1.phpt184
-rw-r--r--ext/standard/tests/math/log1p_variation1.phpt191
-rw-r--r--ext/standard/tests/math/log_variation1.phpt184
-rw-r--r--ext/standard/tests/math/log_variation2.phpt202
-rw-r--r--ext/standard/tests/math/mt_rand_variation1.phpt184
-rw-r--r--ext/standard/tests/math/mt_rand_variation2.phpt188
-rw-r--r--ext/standard/tests/math/mt_srand_variation1.phpt188
-rw-r--r--ext/standard/tests/math/rand_variation1.phpt188
-rw-r--r--ext/standard/tests/math/rand_variation2.phpt188
-rw-r--r--ext/standard/tests/math/round_variation2.phpt187
-rw-r--r--ext/standard/tests/math/srand_variation1.phpt188
-rw-r--r--ext/standard/tests/network/ip2long_variation1.phpt199
-rw-r--r--ext/standard/tests/network/long2ip_variation1.phpt203
-rw-r--r--ext/standard/tests/strings/addslashes_variation1.phpt171
-rw-r--r--ext/standard/tests/strings/bin2hex_variation1.phpt128
-rw-r--r--ext/standard/tests/strings/chop_variation1.phpt214
-rw-r--r--ext/standard/tests/strings/chop_variation2.phpt175
-rw-r--r--ext/standard/tests/strings/chunk_split_variation1.phpt169
-rw-r--r--ext/standard/tests/strings/chunk_split_variation2.phpt185
-rw-r--r--ext/standard/tests/strings/chunk_split_variation3.phpt160
-rw-r--r--ext/standard/tests/strings/convert_cyr_string_variation1.phpt139
-rw-r--r--ext/standard/tests/strings/convert_uudecode_variation1.phpt161
-rw-r--r--ext/standard/tests/strings/convert_uuencode_variation1.phpt137
-rw-r--r--ext/standard/tests/strings/count_chars_variation1.phpt262
-rw-r--r--ext/standard/tests/strings/count_chars_variation2.phpt164
-rw-r--r--ext/standard/tests/strings/crc32_variation1.phpt196
-rw-r--r--ext/standard/tests/strings/explode_variation1.phpt193
-rw-r--r--ext/standard/tests/strings/explode_variation2.phpt195
-rw-r--r--ext/standard/tests/strings/explode_variation3.phpt238
-rw-r--r--ext/standard/tests/strings/get_html_translation_table_variation1.phpt316
-rw-r--r--ext/standard/tests/strings/get_html_translation_table_variation2.phpt209
-rw-r--r--ext/standard/tests/strings/hebrev_variation1.phpt182
-rw-r--r--ext/standard/tests/strings/hebrev_variation2.phpt283
-rw-r--r--ext/standard/tests/strings/hebrevc_variation1.phpt138
-rw-r--r--ext/standard/tests/strings/hebrevc_variation2.phpt414
-rw-r--r--ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt161
-rw-r--r--ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt193
-rw-r--r--ext/standard/tests/strings/ltrim_variation1.phpt138
-rw-r--r--ext/standard/tests/strings/ltrim_variation2.phpt138
-rw-r--r--ext/standard/tests/strings/money_format_variation1.phpt172
-rw-r--r--ext/standard/tests/strings/money_format_variation2.phpt182
-rw-r--r--ext/standard/tests/strings/nl2br_variation5.phpt152
-rw-r--r--ext/standard/tests/strings/ord_variation1.phpt136
-rw-r--r--ext/standard/tests/strings/quoted_printable_decode_variation1.phpt191
-rw-r--r--ext/standard/tests/strings/rtrim_variation1.phpt138
-rw-r--r--ext/standard/tests/strings/rtrim_variation2.phpt138
-rw-r--r--ext/standard/tests/strings/sha1_variation1.phpt157
-rw-r--r--ext/standard/tests/strings/sha1_variation2.phpt160
-rw-r--r--ext/standard/tests/strings/str_pad_variation1.phpt140
-rw-r--r--ext/standard/tests/strings/str_pad_variation2.phpt139
-rw-r--r--ext/standard/tests/strings/str_pad_variation3.phpt153
-rw-r--r--ext/standard/tests/strings/str_pad_variation4.phpt172
-rw-r--r--ext/standard/tests/strings/str_shuffle_variation1.phpt135
-rw-r--r--ext/standard/tests/strings/str_split_variation1.phpt241
-rw-r--r--ext/standard/tests/strings/str_split_variation2.phpt290
-rw-r--r--ext/standard/tests/strings/str_split_variation2_64bit.phpt291
-rw-r--r--ext/standard/tests/strings/strcspn_variation1.phpt273
-rw-r--r--ext/standard/tests/strings/strcspn_variation2.phpt272
-rw-r--r--ext/standard/tests/strings/strcspn_variation3.phpt243
-rw-r--r--ext/standard/tests/strings/strcspn_variation4.phpt198
-rw-r--r--ext/standard/tests/strings/strip_tags_variation1.phpt159
-rw-r--r--ext/standard/tests/strings/strip_tags_variation3.phpt159
-rw-r--r--ext/standard/tests/strings/stripcslashes_variation1.phpt173
-rw-r--r--ext/standard/tests/strings/stripos_variation14.phpt153
-rw-r--r--ext/standard/tests/strings/stripos_variation9.phpt184
-rw-r--r--ext/standard/tests/strings/stripslashes_variation1.phpt172
-rw-r--r--ext/standard/tests/strings/stristr_variation1.phpt133
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation10.phpt188
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation11.phpt189
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation4.phpt189
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation5.phpt165
-rw-r--r--ext/standard/tests/strings/strncmp_variation4.phpt192
-rw-r--r--ext/standard/tests/strings/strncmp_variation5.phpt179
-rw-r--r--ext/standard/tests/strings/strrchr_variation9.phpt198
-rw-r--r--ext/standard/tests/strings/strrev_variation4.phpt182
-rw-r--r--ext/standard/tests/strings/strrpos_variation14.phpt155
-rw-r--r--ext/standard/tests/strings/strrpos_variation9.phpt184
-rw-r--r--ext/standard/tests/strings/strspn_variation1.phpt273
-rw-r--r--ext/standard/tests/strings/strspn_variation2.phpt272
-rw-r--r--ext/standard/tests/strings/strspn_variation3.phpt243
-rw-r--r--ext/standard/tests/strings/strspn_variation4.phpt196
-rw-r--r--ext/standard/tests/strings/strtok_variation1.phpt174
-rw-r--r--ext/standard/tests/strings/strtok_variation2.phpt174
-rw-r--r--ext/standard/tests/strings/strtr_variation5.phpt139
-rw-r--r--ext/standard/tests/strings/strtr_variation7.phpt158
-rw-r--r--ext/standard/tests/strings/strtr_variation9.phpt225
-rw-r--r--ext/standard/tests/strings/trim_variation1.phpt138
-rw-r--r--ext/standard/tests/strings/trim_variation2.phpt138
-rw-r--r--ext/standard/tests/strings/ucwords_variation1.phpt201
-rw-r--r--ext/standard/tests/strings/utf8_decode_variation1.phpt169
-rw-r--r--ext/standard/tests/strings/utf8_encode_variation1.phpt169
-rw-r--r--ext/standard/tests/strings/wordwrap_variation1.phpt335
-rw-r--r--ext/standard/tests/strings/wordwrap_variation2.phpt340
-rw-r--r--ext/standard/tests/strings/wordwrap_variation3.phpt301
-rw-r--r--ext/standard/tests/strings/wordwrap_variation4.phpt144
-rw-r--r--ext/standard/tests/url/base64_decode_variation_001.phpt181
-rw-r--r--ext/standard/tests/url/base64_decode_variation_002.phpt175
-rw-r--r--ext/standard/tests/url/base64_encode_variation_001.phpt172
-rw-r--r--ext/standard/tests/url/parse_url_variation_001.phpt226
-rw-r--r--ext/standard/tests/url/parse_url_variation_002_32bit.phpt189
-rw-r--r--ext/standard/tests/url/parse_url_variation_002_64bit.phpt189
-rw-r--r--ext/standard/tests/url/rawurldecode_variation_001.phpt173
-rw-r--r--ext/standard/tests/url/rawurlencode_variation_001.phpt173
-rw-r--r--ext/standard/tests/url/urldecode_variation_001.phpt173
-rw-r--r--ext/standard/tests/url/urlencode_variation_001.phpt173
-rw-r--r--ext/tokenizer/tests/token_get_all_variation1.phpt287
-rw-r--r--ext/xml/tests/xml_error_string_variation1.phpt177
-rw-r--r--ext/xml/tests/xml_get_current_byte_index_variation1.phpt239
-rw-r--r--ext/xml/tests/xml_get_current_column_number_variation1.phpt240
-rw-r--r--ext/xml/tests/xml_get_current_line_number_variation1.phpt239
-rw-r--r--ext/xml/tests/xml_get_error_code_variation1.phpt239
-rw-r--r--ext/xml/tests/xml_parse_into_struct_variation1.phpt240
-rw-r--r--ext/xml/tests/xml_parse_variation1.phpt241
-rw-r--r--ext/xml/tests/xml_parser_create_ns_variation1.phpt245
-rw-r--r--ext/xml/tests/xml_parser_create_variation1.phpt245
-rw-r--r--ext/xml/tests/xml_parser_free_variation1.phpt239
-rw-r--r--ext/xml/tests/xml_parser_get_option_variation1.phpt240
-rw-r--r--ext/xml/tests/xml_parser_get_option_variation2.phpt225
-rw-r--r--ext/xml/tests/xml_parser_set_option_variation1.phpt240
-rw-r--r--ext/xml/tests/xml_parser_set_option_variation2.phpt215
-rw-r--r--ext/xml/tests/xml_set_character_data_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_default_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_element_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_object_variation1.phpt240
-rw-r--r--ext/xml/tests/xml_set_object_variation2.phpt229
-rw-r--r--ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt244
-rw-r--r--ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt244
-rw-r--r--ext/zlib/tests/gzopen_variation1.phpt227
-rw-r--r--ext/zlib/tests/gzopen_variation2.phpt227
-rw-r--r--ext/zlib/tests/gzopen_variation3.phpt219
477 files changed, 0 insertions, 107780 deletions
diff --git a/ext/curl/tests/curl_version_variation1.phpt b/ext/curl/tests/curl_version_variation1.phpt
deleted file mode 100644
index 3ffb248313..0000000000
--- a/ext/curl/tests/curl_version_variation1.phpt
+++ /dev/null
@@ -1,159 +0,0 @@
---TEST--
-Test curl_version() function : usage variations - test values for $ascii argument
---SKIPIF--
-<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded");
-if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
---FILE--
-<?php
-
-/* Prototype : array curl_version ([ int $age ] )
- * Description: Returns information about the cURL version.
- * Source code: ext/curl/interface.c
-*/
-
-echo "*** Testing curl_version() function: with unexpected inputs for 'age' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
- 0,
- 1,
- 255,
- 256,
- PHP_INT_MAX,
- -PHP_INT_MAX,
-
- // float values
- 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
- array(),
- array(0),
- array(1, 2),
-
- //string values
- "ABC",
- 'abc',
- "2abc",
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // null values
- NULL,
- null,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop through with each element of the $inputs array to test curl_version() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( is_array(curl_version($input)) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===Done===
---EXPECTF--
-*** Testing curl_version() function: with unexpected inputs for 'age' argument ***
--- Iteration 1 --
-bool(true)
--- Iteration 2 --
-bool(true)
--- Iteration 3 --
-bool(true)
--- Iteration 4 --
-bool(true)
--- Iteration 5 --
-bool(true)
--- Iteration 6 --
-bool(true)
--- Iteration 7 --
-bool(true)
--- Iteration 8 --
-bool(true)
--- Iteration 9 --
-bool(true)
--- Iteration 10 --
-
-Warning: curl_version() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: curl_version() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: curl_version() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: curl_version() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: curl_version() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-bool(true)
--- Iteration 16 --
-bool(true)
--- Iteration 17 --
-bool(true)
--- Iteration 18 --
-bool(true)
--- Iteration 19 --
-bool(true)
--- Iteration 20 --
-bool(true)
--- Iteration 21 --
-bool(true)
--- Iteration 22 --
-
-Warning: curl_version() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: curl_version() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
--- Iteration 24 --
-bool(true)
--- Iteration 25 --
-bool(true)
-===Done===
diff --git a/ext/date/tests/DateTimeZone_construct_variation1.phpt b/ext/date/tests/DateTimeZone_construct_variation1.phpt
deleted file mode 100644
index abc85bf0b8..0000000000
--- a/ext/date/tests/DateTimeZone_construct_variation1.phpt
+++ /dev/null
@@ -1,192 +0,0 @@
---TEST--
-Test DateTime::__construct() function : usage variation - Passing unexpected values to first argument $timezone.
---FILE--
-<?php
-/* Prototype : DateTimeZone::__construct ( string $timezone )
- * Description: Returns new DateTimeZone object
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing DateTime::__construct() : usage variation - unexpected values to first argument \$timezone***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-foreach($inputs as $variation =>$timezone) {
- echo "\n-- $variation --\n";
- try {
- var_dump( new DateTimezone($timezone) );
- } catch (Throwable $e) {
- $msg = $e->getMessage();
- echo "FAILED: " . $msg . "\n";
- }
-
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECT--
-*** Testing DateTime::__construct() : usage variation - unexpected values to first argument $timezone***
-
--- int 0 --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (0)
-
--- int 1 --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (1)
-
--- int 12345 --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (12345)
-
--- float 10.5 --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (10.5)
-
--- float .5 --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (0.5)
-
--- empty array --
-FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given
-
--- int indexed array --
-FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given
-
--- associative array --
-FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given
-
--- nested arrays --
-FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given
-
--- uppercase NULL --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- lowercase null --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- lowercase true --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (1)
-
--- lowercase false --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- uppercase TRUE --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (1)
-
--- uppercase FALSE --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- empty string DQ --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- empty string SQ --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- string DQ --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (string)
-
--- string SQ --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (string)
-
--- mixed case string --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (sTrInG)
-
--- heredoc --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (hello world)
-
--- instance of classWithToString --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone (Class A object)
-
--- instance of classWithoutToString --
-FAILED: DateTimeZone::__construct() expects parameter 1 to be string, object given
-
--- undefined var --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- unset var --
-FAILED: DateTimeZone::__construct(): Unknown or bad timezone ()
-
--- resource --
-FAILED: DateTimeZone::__construct() expects parameter 1 to be string, resource given
-===DONE===
diff --git a/ext/date/tests/DateTimeZone_getOffset_variation1.phpt b/ext/date/tests/DateTimeZone_getOffset_variation1.phpt
deleted file mode 100644
index 3270566b5a..0000000000
--- a/ext/date/tests/DateTimeZone_getOffset_variation1.phpt
+++ /dev/null
@@ -1,252 +0,0 @@
---TEST--
-Test DateTimeZone::getOffset() function : usage variation - Passing unexpected values to first argument $datetime.
---FILE--
-<?php
-/* Prototype : int DateTimeZone::getOffset ( DateTime $datetime )
- * Description: Returns the timezone offset from GMT
- * Source code: ext/date/php_date.c
- * Alias to functions: timezone_offset_get()
- */
-
-echo "*** Testing DateTimeZone::getOffset() : usage variation - unexpected values to first argument \$datetime***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$timezone = new DateTimezone("Europe/London");
-
-foreach($inputs as $variation =>$datetime) {
- echo "\n-- $variation --\n";
- var_dump( $timezone->getOffset($datetime) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTimeZone::getOffset() : usage variation - unexpected values to first argument $datetime***
-
--- int 0 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_construct_variation1.phpt b/ext/date/tests/DateTime_construct_variation1.phpt
deleted file mode 100644
index 964d0ffc69..0000000000
--- a/ext/date/tests/DateTime_construct_variation1.phpt
+++ /dev/null
@@ -1,377 +0,0 @@
---TEST--
-Test new DateTime() function : usage variation - Passing unexpected values to first argument $time.
---FILE--
-<?php
-/* Prototype : DateTime::__construct ([ string $time="now" [, DateTimeZone $timezone=NULL ]] )
- * Description: Returns new DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: date_create
- */
-
-echo "*** Testing new DateTime(): usage variation - unexpected values to first argument \$time***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$timezone = new DateTimeZone("Europe/London");
-
-foreach($inputs as $variation =>$time) {
- echo "\n-- $variation --\n";
-
- try {
- var_dump( new DateTime($time) );
- } catch (Throwable $e) {
- $msg = $e->getMessage();
- echo "FAILED: " . $msg . "\n";
- }
-
- try {
- var_dump( new DateTime($time, $timezone) );
- } catch (Throwable $e) {
- $msg = $e->getMessage();
- echo "FAILED: " . $msg . "\n";
- }
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing new DateTime(): usage variation - unexpected values to first argument $time***
-
--- int 0 --
-FAILED: DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character
-
--- int 1 --
-FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
-
--- int 12345 --
-FAILED: DateTime::__construct(): Failed to parse time string (12345) at position 4 (5): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (12345) at position 4 (5): Unexpected character
-
--- int -12345 --
-FAILED: DateTime::__construct(): Failed to parse time string (-12345) at position 5 (5): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (-12345) at position 5 (5): Unexpected character
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-
--- int indexed array --
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-
--- associative array --
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-
--- nested arrays --
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
-FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string SQ --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- string DQ --
-FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
-FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
-
--- string SQ --
-FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
-FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
-
--- mixed case string --
-FAILED: DateTime::__construct(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database
-FAILED: DateTime::__construct(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database
-
--- heredoc --
-FAILED: DateTime::__construct(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database
-FAILED: DateTime::__construct(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database
-
--- instance of classWithToString --
-FAILED: DateTime::__construct(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database
-FAILED: DateTime::__construct(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database
-
--- instance of classWithoutToString --
-FAILED: DateTime::__construct() expects parameter 1 to be string, object given
-FAILED: DateTime::__construct() expects parameter 1 to be string, object given
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-FAILED: DateTime::__construct() expects parameter 1 to be string, resource given
-FAILED: DateTime::__construct() expects parameter 1 to be string, resource given
-===DONE===
diff --git a/ext/date/tests/DateTime_construct_variation2.phpt b/ext/date/tests/DateTime_construct_variation2.phpt
deleted file mode 100644
index 2e39f32715..0000000000
--- a/ext/date/tests/DateTime_construct_variation2.phpt
+++ /dev/null
@@ -1,231 +0,0 @@
---TEST--
-Test new DateTime() function : usage variation - Passing unexpected values to second argument $timezone.
---FILE--
-<?php
-/* Prototype : DateTime::__construct ([ string $time="now" [, DateTimeZone $timezone=NULL ]] )
- * Description: Returns new DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: date_create
- */
-
-echo "*** Testing new DateTime() : usage variation - unexpected values to second argument \$timezone***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$time = "2005-07-14 22:30:41";
-
-foreach($inputs as $variation =>$timezone) {
- echo "\n-- $variation --\n";
-
- try {
- var_dump( new DateTime($time, $timezone) );
- } catch (Throwable $e) {
- $msg = $e->getMessage();
- echo "FAILED: " . $msg . "\n";
- }
-
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing new DateTime() : usage variation - unexpected values to second argument $timezone***
-
--- int 0 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given
-
--- int 1 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given
-
--- int 12345 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given
-
--- int -12345 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given
-
--- float 10.5 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, float given
-
--- float -10.5 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, float given
-
--- float .5 --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, float given
-
--- empty array --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given
-
--- int indexed array --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given
-
--- associative array --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given
-
--- nested arrays --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given
-
--- lowercase false --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given
-
--- uppercase TRUE --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given
-
--- uppercase FALSE --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given
-
--- empty string DQ --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given
-
--- empty string SQ --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given
-
--- string DQ --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given
-
--- string SQ --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given
-
--- mixed case string --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given
-
--- heredoc --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given
-
--- instance of classWithToString --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object given
-
--- instance of classWithoutToString --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object given
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, resource given
-===DONE===
diff --git a/ext/date/tests/DateTime_format_variation1.phpt b/ext/date/tests/DateTime_format_variation1.phpt
deleted file mode 100644
index 68bbd56caa..0000000000
--- a/ext/date/tests/DateTime_format_variation1.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test DateTime::format() function : usage variation - Passing unexpected values to first argument $format.
---FILE--
-<?php
-/* Prototype : public string DateTime::format ( string $format )
- * Description: Returns date formatted according to given format
- * Source code: ext/date/php_date.c
- * Alias to functions: date_format
- */
-
-echo "*** Testing DateTime::format() : usage variation - unexpected values to first argument \$format***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2005-07-14 22:30:41");
-
-foreach($inputs as $variation =>$format) {
- echo "\n-- $variation --\n";
- var_dump( $object->format($format) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::format() : usage variation - unexpected values to first argument $format***
-
--- int 0 --
-string(1) "0"
-
--- int 1 --
-string(1) "1"
-
--- int 12345 --
-string(5) "12345"
-
--- int -12345 --
-string(6) "-12345"
-
--- float 10.5 --
-string(4) "10.5"
-
--- float -10.5 --
-string(5) "-10.5"
-
--- float .5 --
-string(3) "0.5"
-
--- empty array --
-
-Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(0) ""
-
--- lowercase null --
-string(0) ""
-
--- lowercase true --
-string(1) "1"
-
--- lowercase false --
-string(0) ""
-
--- uppercase TRUE --
-string(1) "1"
-
--- uppercase FALSE --
-string(0) ""
-
--- empty string DQ --
-string(0) ""
-
--- empty string SQ --
-string(0) ""
-
--- string DQ --
-string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710"
-
--- string SQ --
-string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710"
-
--- mixed case string --
-string(40) "41BSTThu, 14 Jul 2005 22:30:41 +01001722"
-
--- heredoc --
-string(82) "10Europe/LondonThursdayThursday2005 42005Thu, 14 Jul 2005 22:30:41 +0100Thursday14"
-
--- instance of classWithToString --
-string(66) "CThursdaypm4141 PM 2005b14Europe/London2005-07-14T22:30:41+01:0031"
-
--- instance of classWithoutToString --
-
-Warning: DateTime::format() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(0) ""
-
--- unset var --
-string(0) ""
-
--- resource --
-
-Warning: DateTime::format() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_modify_variation1.phpt b/ext/date/tests/DateTime_modify_variation1.phpt
deleted file mode 100644
index d442243ead..0000000000
--- a/ext/date/tests/DateTime_modify_variation1.phpt
+++ /dev/null
@@ -1,262 +0,0 @@
---TEST--
-Test DateTime::modify() function : usage variation - Passing unexpected values to first argument $modify.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::modify ( string $modify )
- * Description: Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime().
- * Source code: ext/date/php_date.c
- * Alias to functions: public date_modify()
- */
-
-echo "*** Testing DateTime::modify() : usage variation - unexpected values to first argument \$modify***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-01-31 14:28:41");
-
-foreach($inputs as $variation =>$format) {
- echo "\n-- $variation --\n";
- var_dump( $object->modify($format) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::modify() : usage variation - unexpected values to first argument $modify***
-
--- int 0 --
-
-Warning: DateTime::modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- int 1 --
-
-Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- int 12345 --
-
-Warning: DateTime::modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- int -12345 --
-
-Warning: DateTime::modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- float 10.5 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-31 10:05:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-
-Warning: DateTime::modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- float .5 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-31 00:05:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- associative array --
-
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- uppercase NULL --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- lowercase null --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- lowercase true --
-
-Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- lowercase false --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- uppercase TRUE --
-
-Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- uppercase FALSE --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- empty string DQ --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::modify() expects parameter 1 to be string, object given in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- undefined var --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- unset var --
-
-Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99
-bool(false)
-
--- resource --
-
-Warning: DateTime::modify() expects parameter 1 to be string, resource given in %sDateTime_modify_variation1.php on line 99
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setDate_variation1.phpt b/ext/date/tests/DateTime_setDate_variation1.phpt
deleted file mode 100644
index a25bdee54f..0000000000
--- a/ext/date/tests/DateTime_setDate_variation1.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setDate() function : usage variation - Passing unexpected values to first argument $year.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setDate ( int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_date_set
- */
-
-echo "*** Testing DateTime::setDate() : usage variation - unexpected values to first argument \$year***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-02-27 08:34:10");
-$day = 2;
-$month = 7;
-
-foreach($inputs as $variation =>$year) {
- echo "\n-- $variation --\n";
- var_dump( $object->setDate($year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setDate() : usage variation - unexpected values to first argument $year***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "12345-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(28) "-12345-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0010-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "-0010-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setDate() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setDate_variation2.phpt b/ext/date/tests/DateTime_setDate_variation2.phpt
deleted file mode 100644
index b3fbf46f4f..0000000000
--- a/ext/date/tests/DateTime_setDate_variation2.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setDate() function : usage variation - Passing unexpected values to second argument $month.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setDate ( int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_date_set
- */
-
-echo "*** Testing DateTime::setDate() : usage variation - unexpected values to second argument \$month***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-02-27 08:34:10");
-$day = 2;
-$year = 1963;
-
-foreach($inputs as $variation =>$month) {
- echo "\n-- $variation --\n";
- var_dump( $object->setDate($year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setDate() : usage variation - unexpected values to second argument $month***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2991-09-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0934-03-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-10-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-02-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setDate() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setDate_variation3.phpt b/ext/date/tests/DateTime_setDate_variation3.phpt
deleted file mode 100644
index b1f7aab961..0000000000
--- a/ext/date/tests/DateTime_setDate_variation3.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setDate() function : usage variation - Passing unexpected values to third argument $day.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setDate ( int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_date_set
- */
-
-echo "*** Testing DateTime::setDate() : usage variation - unexpected values to third argument \$day***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-02-27 08:34:10");
-$month = 7;
-$year = 1963;
-
-foreach($inputs as $variation =>$day) {
- echo "\n-- $variation --\n";
- var_dump( $object->setDate($year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setDate() : usage variation - unexpected values to third argument $day***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1997-04-17 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1929-09-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-20 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setDate() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setISODate_variation1.phpt b/ext/date/tests/DateTime_setISODate_variation1.phpt
deleted file mode 100644
index 4d2a32b1f7..0000000000
--- a/ext/date/tests/DateTime_setISODate_variation1.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setISODate() function : usage variation - Passing unexpected values to first argument $year.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setISODate ( int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_isodate_set
- */
-
-echo "*** Testing DateTime::setISODate() : usage variation - unexpected values to first argument \$year***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-02-27 08:34:10");
-$day = 2;
-$month = 7;
-
-foreach($inputs as $variation =>$year) {
- echo "\n-- $variation --\n";
- var_dump( $object->setISODate($year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setISODate() : usage variation - unexpected values to first argument $year***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "12345-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(28) "-12345-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0010-02-16 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "-0010-02-14 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setISODate() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setISODate_variation2.phpt b/ext/date/tests/DateTime_setISODate_variation2.phpt
deleted file mode 100644
index 01c335991f..0000000000
--- a/ext/date/tests/DateTime_setISODate_variation2.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setISODate() function : usage variation - Passing unexpected values to second argument $week.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setISODate ( int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_isodate_set
- */
-
-echo "*** Testing DateTime::setISODate() : usage variation - unexpected values to second argument \$week***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$day = 2;
-$year = 1963;
-
-foreach($inputs as $variation =>$month) {
- echo "\n-- $variation --\n";
- var_dump( $object->setISODate($year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setISODate() : usage variation - unexpected values to second argument $week***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2199-07-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1726-05-21 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-03-05 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-10-16 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setISODate() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setISODate_variation3.phpt b/ext/date/tests/DateTime_setISODate_variation3.phpt
deleted file mode 100644
index 3f0b43d7ff..0000000000
--- a/ext/date/tests/DateTime_setISODate_variation3.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setISODate() function : usage variation - Passing unexpected values to third argument $day.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setISODate ( int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_isodate_set
- */
-
-echo "*** Testing DateTime::setISODate() : usage variation - unexpected values to third argument \$day***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$year = 1963;
-$month = 7;
-
-foreach($inputs as $variation =>$day) {
- echo "\n-- $variation --\n";
- var_dump( $object->setISODate($year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setISODate() : usage variation - unexpected values to third argument $day***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1996-11-28 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1929-04-24 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-20 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-31 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setISODate() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setTime_variation1.phpt b/ext/date/tests/DateTime_setTime_variation1.phpt
deleted file mode 100644
index dc067a48c3..0000000000
--- a/ext/date/tests/DateTime_setTime_variation1.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setTime() function : usage variation - Passing unexpected values to first argument $hour.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setTime ( int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_time_set
- */
-
-echo "*** Testing DateTime::setTime() : usage variation - unexpected values to first argument \$hour***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-01-31 15:14:10");
-$minute = 13;
-$sec = 45;
-
-foreach($inputs as $variation =>$hour) {
- echo "\n-- $variation --\n";
- var_dump( $object->setTime($hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setTime() : usage variation - unexpected values to first argument $hour***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 01:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2010-06-29 09:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 15:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 14:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 01:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 01:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setTime() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setTime_variation2.phpt b/ext/date/tests/DateTime_setTime_variation2.phpt
deleted file mode 100644
index f65966b014..0000000000
--- a/ext/date/tests/DateTime_setTime_variation2.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setTime() function : usage variation - Passing unexpected values to second argument $minute.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setTime ( int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_time_set
- */
-
-echo "*** Testing DateTime::setTime() : usage variation - unexpected values to second argument \$minute***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-01-31 15:14:10");
-$hour = 10;
-$sec = 45;
-
-foreach($inputs as $variation =>$minute) {
- echo "\n-- $variation --\n";
- var_dump( $object->setTime($hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setTime() : usage variation - unexpected values to second argument $minute***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:01:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-02-08 23:45:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 20:15:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:10:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 09:50:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:01:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:01:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setTime() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setTime_variation3.phpt b/ext/date/tests/DateTime_setTime_variation3.phpt
deleted file mode 100644
index a2cbff9f1b..0000000000
--- a/ext/date/tests/DateTime_setTime_variation3.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test DateTime::setTime() function : usage variation - Passing unexpected values to third argument $second.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setTime ( int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: date_time_set
- */
-
-echo "*** Testing DateTime::setTime() : usage variation - unexpected values to third argument \$second***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-01-31 15:14:10");
-$hour = 10;
-$minute = 13;
-
-foreach($inputs as $variation =>$sec) {
- echo "\n-- $variation --\n";
- var_dump( $object->setTime($hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setTime() : usage variation - unexpected values to third argument $second***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:01.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 13:38:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 06:47:15.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:12:50.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:01.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:01.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: DateTime::setTime() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/DateTime_setTimezone_variation1.phpt b/ext/date/tests/DateTime_setTimezone_variation1.phpt
deleted file mode 100644
index 6eace15116..0000000000
--- a/ext/date/tests/DateTime_setTimezone_variation1.phpt
+++ /dev/null
@@ -1,252 +0,0 @@
---TEST--
-Test DateTime::setTimezone() function : usage variation - Passing unexpected values to first argument $timezone.
---FILE--
-<?php
-/* Prototype : public DateTime DateTime::setTimezone ( DateTimeZone $timezone )
- * Description: Sets the time zone for the DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: date_timezone_set
- */
-
-echo "*** Testing DateTime::setTimezone() : usage variation - unexpected values to first argument \$timezone***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTime("2009-01-30 17:57:32");
-
-foreach($inputs as $variation =>$timezone) {
- echo "\n-- $variation --\n";
- var_dump( $object->setTimezone($timezone) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing DateTime::setTimezone() : usage variation - unexpected values to first argument $timezone***
-
--- int 0 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/checkdate_variation1.phpt b/ext/date/tests/checkdate_variation1.phpt
deleted file mode 100644
index 8913963de0..0000000000
--- a/ext/date/tests/checkdate_variation1.phpt
+++ /dev/null
@@ -1,201 +0,0 @@
---TEST--
-Test checkdate() function : usage variation - Passing unexpected values to first argument $month.
---FILE--
-<?php
-/* Prototype : bool checkdate ( int $month , int $day , int $year )
- * Description: Checks the validity of the date formed by the arguments.
- * A date is considered valid if each parameter is properly defined.
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing checkdate() : usage variation - unexpected values to first argument \$month***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$day = 2;
-$year = 1963;
-
-foreach($inputs as $variation =>$month) {
- echo "\n-- $variation --\n";
- var_dump( checkdate($month, $day, $year) );
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing checkdate() : usage variation - unexpected values to first argument $month***
-
--- float 10.5 --
-bool(true)
-
--- float -10.5 --
-bool(false)
-
--- float .5 --
-bool(false)
-
--- empty array --
-
-Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-bool(false)
-
--- lowercase null --
-bool(false)
-
--- lowercase true --
-bool(true)
-
--- lowercase false --
-bool(false)
-
--- uppercase TRUE --
-bool(true)
-
--- uppercase FALSE --
-bool(false)
-
--- empty string DQ --
-
-Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: checkdate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: checkdate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-bool(false)
-
--- unset var --
-bool(false)
-
--- resource --
-
-Warning: checkdate() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/checkdate_variation2.phpt b/ext/date/tests/checkdate_variation2.phpt
deleted file mode 100644
index 8f555314bd..0000000000
--- a/ext/date/tests/checkdate_variation2.phpt
+++ /dev/null
@@ -1,201 +0,0 @@
---TEST--
-Test checkdate() function : usage variation - Passing unexpected values to second argument $day.
---FILE--
-<?php
-/* Prototype : bool checkdate ( int $month , int $day , int $year )
- * Description: Checks the validity of the date formed by the arguments.
- * A date is considered valid if each parameter is properly defined.
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing checkdate() : usage variation - unexpected values to second argument \$day***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$month = 7;
-$year = 1963;
-
-foreach($inputs as $variation =>$day) {
- echo "\n-- $variation --\n";
- var_dump( checkdate($month, $day, $year) );
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing checkdate() : usage variation - unexpected values to second argument $day***
-
--- float 10.5 --
-bool(true)
-
--- float -10.5 --
-bool(false)
-
--- float .5 --
-bool(false)
-
--- empty array --
-
-Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-bool(false)
-
--- lowercase null --
-bool(false)
-
--- lowercase true --
-bool(true)
-
--- lowercase false --
-bool(false)
-
--- uppercase TRUE --
-bool(true)
-
--- uppercase FALSE --
-bool(false)
-
--- empty string DQ --
-
-Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: checkdate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: checkdate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-bool(false)
-
--- unset var --
-bool(false)
-
--- resource --
-
-Warning: checkdate() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/checkdate_variation3.phpt b/ext/date/tests/checkdate_variation3.phpt
deleted file mode 100644
index 87b7fdac63..0000000000
--- a/ext/date/tests/checkdate_variation3.phpt
+++ /dev/null
@@ -1,201 +0,0 @@
---TEST--
-Test checkdate() function : usage variation - Passing unexpected values to third argument $year.
---FILE--
-<?php
-/* Prototype : bool checkdate ( int $month , int $day , int $year )
- * Description: Checks the validity of the date formed by the arguments.
- * A date is considered valid if each parameter is properly defined.
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing checkdate() : usage variation - unexpected values to third argument \$year***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$day = 2;
-$month = 7;
-
-foreach($inputs as $variation =>$year) {
- echo "\n-- $variation --\n";
- var_dump( checkdate($month, $day, $year) );
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing checkdate() : usage variation - unexpected values to third argument $year***
-
--- float 10.5 --
-bool(true)
-
--- float -10.5 --
-bool(false)
-
--- float .5 --
-bool(false)
-
--- empty array --
-
-Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-bool(false)
-
--- lowercase null --
-bool(false)
-
--- lowercase true --
-bool(true)
-
--- lowercase false --
-bool(false)
-
--- uppercase TRUE --
-bool(true)
-
--- uppercase FALSE --
-bool(false)
-
--- empty string DQ --
-
-Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: checkdate() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: checkdate() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-bool(false)
-
--- unset var --
-bool(false)
-
--- resource --
-
-Warning: checkdate() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_create_variation1.phpt b/ext/date/tests/date_create_variation1.phpt
deleted file mode 100644
index 8166ffa019..0000000000
--- a/ext/date/tests/date_create_variation1.phpt
+++ /dev/null
@@ -1,389 +0,0 @@
---TEST--
-Test date_create() function : usage variation - Passing unexpected values to first argument $time.
---FILE--
-<?php
-/* Prototype : DateTime date_create ([ string $time [, DateTimeZone $timezone ]] )
- * Description: Returns new DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::__construct
- */
-
-echo "*** Testing date_create() : usage variation - unexpected values to first argument \$time***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$timezone = new DateTimeZone("Europe/London");
-
-foreach($inputs as $variation =>$time) {
- echo "\n-- $variation --\n";
- var_dump( date_create($time) );
- var_dump( date_create($time, $timezone) );
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_create() : usage variation - unexpected values to first argument $time***
-
--- int 0 --
-bool(false)
-bool(false)
-
--- int 1 --
-bool(false)
-bool(false)
-
--- int 12345 --
-bool(false)
-bool(false)
-
--- int -12345 --
-bool(false)
-bool(false)
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-bool(false)
-bool(false)
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-bool(false)
-bool(false)
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-bool(false)
-bool(false)
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string SQ --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- string DQ --
-bool(false)
-bool(false)
-
--- string SQ --
-bool(false)
-bool(false)
-
--- mixed case string --
-bool(false)
-bool(false)
-
--- heredoc --
-bool(false)
-bool(false)
-
--- instance of classWithToString --
-bool(false)
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_create() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
-Warning: date_create() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_create() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-
-Warning: date_create() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_create_variation2.phpt b/ext/date/tests/date_create_variation2.phpt
deleted file mode 100644
index 32495913b7..0000000000
--- a/ext/date/tests/date_create_variation2.phpt
+++ /dev/null
@@ -1,272 +0,0 @@
---TEST--
-Test date_create() function : usage variation - Passing unexpected values to second argument $timezone.
---FILE--
-<?php
-/* Prototype : DateTime date_create ([ string $time [, DateTimeZone $timezone ]] )
- * Description: Returns new DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::__construct
- */
-
-echo "*** Testing date_create() : usage variation - unexpected values to second argument \$timezone***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$time = "2005-07-14 22:30:41";
-
-foreach($inputs as $variation =>$timezone) {
- echo "\n-- $variation --\n";
- var_dump( date_create($time, $timezone) );
-};
-
-// closing the resource
-fclose( $file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_create() : usage variation - unexpected values to second argument $timezone***
-
--- int 0 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2005-07-14 22:30:41.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_create() expects parameter 2 to be DateTimeZone, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_date_set_variation1.phpt b/ext/date/tests/date_date_set_variation1.phpt
deleted file mode 100644
index cdfc56cfad..0000000000
--- a/ext/date/tests/date_date_set_variation1.phpt
+++ /dev/null
@@ -1,254 +0,0 @@
---TEST--
-Test date_date_set() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : DateTime date_date_set ( DateTime $object , int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setDate
- */
-
-echo "*** Testing date_date_set() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$day = 2;
-$month = 7;
-$year = 1963;
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_date_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_date_set() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_date_set() expects parameter 1 to be DateTime, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_date_set_variation2.phpt b/ext/date/tests/date_date_set_variation2.phpt
deleted file mode 100644
index 6522b7a7e8..0000000000
--- a/ext/date/tests/date_date_set_variation2.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_date_set() function : usage variation - Passing unexpected values to second argument $year.
---FILE--
-<?php
-/* Prototype : DateTime date_date_set ( DateTime $object , int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setDate
- */
-
-echo "*** Testing date_date_set() : usage variation - unexpected values to second argument \$year***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$day = 2;
-$month = 7;
-
-foreach($inputs as $variation =>$year) {
- echo "\n-- $variation --\n";
- var_dump( date_date_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_date_set() : usage variation - unexpected values to second argument $year***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "12345-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(28) "-12345-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0010-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "-0010-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-07-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_date_set() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_date_set() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(%d) "%s"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_date_set() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_date_set_variation3.phpt b/ext/date/tests/date_date_set_variation3.phpt
deleted file mode 100644
index c63a339cc7..0000000000
--- a/ext/date/tests/date_date_set_variation3.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_date_set() function : usage variation - Passing unexpected values to third argument $month.
---FILE--
-<?php
-/* Prototype : DateTime date_date_set ( DateTime $object , int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setDate
- */
-
-echo "*** Testing date_date_set() : usage variation - unexpected values to third argument \$month***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$day = 2;
-$year = 1963;
-
-foreach($inputs as $variation =>$month) {
- echo "\n-- $variation --\n";
- var_dump( date_date_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_date_set() : usage variation - unexpected values to third argument $month***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2991-09-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0934-03-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-10-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-02-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_date_set() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_date_set() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-02 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_date_set() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_date_set_variation4.phpt b/ext/date/tests/date_date_set_variation4.phpt
deleted file mode 100644
index de02a2a42c..0000000000
--- a/ext/date/tests/date_date_set_variation4.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_date_set() function : usage variation - Passing unexpected values to forth argument $day.
---FILE--
-<?php
-/* Prototype : DateTime date_date_set ( DateTime $object , int $year , int $month , int $day )
- * Description: Resets the current date of the DateTime object to a different date.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setDate
- */
-
-echo "*** Testing date_date_set() : usage variation - unexpected values to forth argument \$day***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$month = 7;
-$year = 1963;
-
-foreach($inputs as $variation =>$day) {
- echo "\n-- $variation --\n";
- var_dump( date_date_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_date_set() : usage variation - unexpected values to forth argument $day***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1997-04-17 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1929-09-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-20 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-07-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_date_set() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_date_set() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-06-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_date_set() expects parameter 4 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_default_timezone_set_variation1.phpt b/ext/date/tests/date_default_timezone_set_variation1.phpt
deleted file mode 100644
index ea6057b6ce..0000000000
--- a/ext/date/tests/date_default_timezone_set_variation1.phpt
+++ /dev/null
@@ -1,200 +0,0 @@
---TEST--
-Test date_default_timezone_set() function : usage variations - Passing unexpected values for time_zone identifier
---FILE--
-<?php
-/* Prototype : bool date_default_timezone_set ( string $timezone_identifier )
- * Description: Sets the default timezone used by all date/time functions in a script.
- * Source code: ext/standard/data/php_date.c
- */
-
-echo "*** Testing date_default_timezone_set() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$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*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of date_default_timezone_set()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(date_default_timezone_set($input));
- $iterator++;
-};
-?>
-===Done===
---EXPECTF--
-*** Testing date_default_timezone_set() : usage variations ***
-
--- Iteration 1 --
-
-Notice: date_default_timezone_set(): Timezone ID '0' is invalid in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: date_default_timezone_set(): Timezone ID '1' is invalid in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: date_default_timezone_set(): Timezone ID '12345' is invalid in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: date_default_timezone_set(): Timezone ID '-2345' is invalid in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: date_default_timezone_set(): Timezone ID '10.5' is invalid in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: date_default_timezone_set(): Timezone ID '-10.5' is invalid in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: date_default_timezone_set(): Timezone ID '123456789000' is invalid in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: date_default_timezone_set(): Timezone ID '1.23456789E-9' is invalid in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: date_default_timezone_set(): Timezone ID '0.5' is invalid in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Notice: date_default_timezone_set(): Timezone ID '1' is invalid in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Notice: date_default_timezone_set(): Timezone ID '1' is invalid in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: date_default_timezone_set() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Notice: date_default_timezone_set(): Timezone ID 'abcxyz' is invalid in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Notice: date_default_timezone_set(): Timezone ID 'abcxyz' is invalid in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Notice: date_default_timezone_set(): Timezone ID 'abc
-xyz' is invalid in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: date_default_timezone_set() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/date/tests/date_format_variation1.phpt b/ext/date/tests/date_format_variation1.phpt
deleted file mode 100644
index a4add9854b..0000000000
--- a/ext/date/tests/date_format_variation1.phpt
+++ /dev/null
@@ -1,252 +0,0 @@
---TEST--
-Test date_format() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : string date_format ( DateTimeInterface $object , string $format )
- * Description: Returns date formatted according to given format
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeInterface::format
- */
-
-echo "*** Testing date_format() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$format = 'H:m:s \m \i\s\ \m\o\n\t\h';
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_format($object, $format) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_format() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_format() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_format_variation2.phpt b/ext/date/tests/date_format_variation2.phpt
deleted file mode 100644
index 136d3d4558..0000000000
--- a/ext/date/tests/date_format_variation2.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test date_format() function : usage variation - Passing unexpected values to second argument $format.
---FILE--
-<?php
-/* Prototype : string date_format ( DateTime $object , string $format )
- * Description: Returns date formatted according to given format
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::format
- */
-
-echo "*** Testing date_format() : usage variation - unexpected values to second argument \$format***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2005-07-14 22:30:41");
-
-foreach($inputs as $variation =>$format) {
- echo "\n-- $variation --\n";
- var_dump( date_format($object, $format) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_format() : usage variation - unexpected values to second argument $format***
-
--- int 0 --
-string(1) "0"
-
--- int 1 --
-string(1) "1"
-
--- int 12345 --
-string(5) "12345"
-
--- int -12345 --
-string(6) "-12345"
-
--- float 10.5 --
-string(4) "10.5"
-
--- float -10.5 --
-string(5) "-10.5"
-
--- float .5 --
-string(3) "0.5"
-
--- empty array --
-
-Warning: date_format() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_format() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_format() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_format() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(0) ""
-
--- lowercase null --
-string(0) ""
-
--- lowercase true --
-string(1) "1"
-
--- lowercase false --
-string(0) ""
-
--- uppercase TRUE --
-string(1) "1"
-
--- uppercase FALSE --
-string(0) ""
-
--- empty string DQ --
-string(0) ""
-
--- empty string SQ --
-string(0) ""
-
--- string DQ --
-string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710"
-
--- string SQ --
-string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710"
-
--- mixed case string --
-string(40) "41BSTThu, 14 Jul 2005 22:30:41 +01001722"
-
--- heredoc --
-string(82) "10Europe/LondonThursdayThursday2005 42005Thu, 14 Jul 2005 22:30:41 +0100Thursday14"
-
--- instance of classWithToString --
-string(66) "CThursdaypm4141 PM 2005b14Europe/London2005-07-14T22:30:41+01:0031"
-
--- instance of classWithoutToString --
-
-Warning: date_format() expects parameter 2 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(0) ""
-
--- unset var --
-string(0) ""
-
--- resource --
-
-Warning: date_format() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_isodate_set_variation1.phpt b/ext/date/tests/date_isodate_set_variation1.phpt
deleted file mode 100644
index 42e94fe02f..0000000000
--- a/ext/date/tests/date_isodate_set_variation1.phpt
+++ /dev/null
@@ -1,254 +0,0 @@
---TEST--
-Test date_isodate_set() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : DateTime date_isodate_set ( DateTime $object , int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setISODate
- */
-
-echo "*** Testing date_isodate_set() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$day = 2;
-$month = 7;
-$year = 1963;
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_isodate_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_isodate_set() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_isodate_set() expects parameter 1 to be DateTime, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_isodate_set_variation2.phpt b/ext/date/tests/date_isodate_set_variation2.phpt
deleted file mode 100644
index adb4c5d34d..0000000000
--- a/ext/date/tests/date_isodate_set_variation2.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_isodate_set() function : usage variation - Passing unexpected values to second argument $year.
---FILE--
-<?php
-/* Prototype : DateTime date_isodate_set ( DateTime $object , int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setISODate
- */
-
-echo "*** Testing date_isodate_set() : usage variation - unexpected values to second argument \$year***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$day = 2;
-$month = 7;
-
-foreach($inputs as $variation =>$year) {
- echo "\n-- $variation --\n";
- var_dump( date_isodate_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_isodate_set() : usage variation - unexpected values to second argument $year***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "12345-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(28) "-12345-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0010-02-16 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(27) "-0010-02-14 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0001-02-13 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_isodate_set() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_isodate_set() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "0000-02-15 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_isodate_set() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_isodate_set_variation3.phpt b/ext/date/tests/date_isodate_set_variation3.phpt
deleted file mode 100644
index 61e973efc4..0000000000
--- a/ext/date/tests/date_isodate_set_variation3.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_isodate_set() function : usage variation - Passing unexpected values to third argument $week.
---FILE--
-<?php
-/* Prototype : DateTime date_isodate_set ( DateTime $object , int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setISODate
- */
-
-echo "*** Testing date_isodate_set() : usage variation - unexpected values to third argument \$week***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$day = 2;
-$year = 1963;
-
-foreach($inputs as $variation =>$month) {
- echo "\n-- $variation --\n";
- var_dump( date_isodate_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_isodate_set() : usage variation - unexpected values to third argument $week***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2199-07-30 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1726-05-21 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-03-05 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-10-16 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-01 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_isodate_set() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_isodate_set() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1962-12-25 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_isodate_set() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_isodate_set_variation4.phpt b/ext/date/tests/date_isodate_set_variation4.phpt
deleted file mode 100644
index 61de2be6cd..0000000000
--- a/ext/date/tests/date_isodate_set_variation4.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_isodate_set() function : usage variation - Passing unexpected values to forth argument $day.
---FILE--
-<?php
-/* Prototype : DateTime date_isodate_set ( DateTime $object , int $year , int $week [, int $day ] )
- * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setISODate
- */
-
-echo "*** Testing date_isodate_set() : usage variation - unexpected values to forth argument \$day***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-02-27 08:34:10");
-$year = 1963;
-$month = 7;
-
-foreach($inputs as $variation =>$day) {
- echo "\n-- $variation --\n";
- var_dump( date_isodate_set($object, $year, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_isodate_set() : usage variation - unexpected values to forth argument $day***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1996-11-28 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1929-04-24 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-20 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-01-31 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-11 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_isodate_set() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_isodate_set() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "1963-02-10 08:34:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_isodate_set() expects parameter 4 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_modify_variation1.phpt b/ext/date/tests/date_modify_variation1.phpt
deleted file mode 100644
index 79de83b34c..0000000000
--- a/ext/date/tests/date_modify_variation1.phpt
+++ /dev/null
@@ -1,252 +0,0 @@
---TEST--
-Test date_modify() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : DateTime date_modify ( DateTime $object , string $modify )
- * Description: Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime().
- * Source code: ext/date/php_date.c
- * Alias to functions: public DateTime DateTime::modify()
- */
-
-echo "*** Testing date_modify() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$format = "D, d M Y";
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_modify($object, $format) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_modify() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_modify() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_modify() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_modify() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_modify() expects parameter 1 to be DateTime, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_modify_variation2.phpt b/ext/date/tests/date_modify_variation2.phpt
deleted file mode 100644
index f2a87ce725..0000000000
--- a/ext/date/tests/date_modify_variation2.phpt
+++ /dev/null
@@ -1,262 +0,0 @@
---TEST--
-Test date_modify() function : usage variation - Passing unexpected values to second argument $format.
---FILE--
-<?php
-/* Prototype : DateTime date_modify ( DateTime $object , string $modify )
- * Description: Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime().
- * Source code: ext/date/php_date.c
- * Alias to functions: public DateTime DateTime::modify()
- */
-
-echo "*** Testing date_modify() : usage variation - unexpected values to second argument \$format***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-01-31 14:28:41");
-
-foreach($inputs as $variation =>$format) {
- echo "\n-- $variation --\n";
- var_dump( date_modify($object, $format) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_modify() : usage variation - unexpected values to second argument $format***
-
--- int 0 --
-
-Warning: date_modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- int 1 --
-
-Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- int 12345 --
-
-Warning: date_modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- int -12345 --
-
-Warning: date_modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:05:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-
-Warning: date_modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 00:05:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- int indexed array --
-
-Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- associative array --
-
-Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- nested arrays --
-
-Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- lowercase null --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- lowercase true --
-
-Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- lowercase false --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- empty string DQ --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- empty string SQ --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- string DQ --
-
-Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- string SQ --
-
-Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- mixed case string --
-
-Warning: date_modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- heredoc --
-
-Warning: date_modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_modify() expects parameter 2 to be string, object given in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- undefined var --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- unset var --
-
-Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99
-bool(false)
-
--- resource --
-
-Warning: date_modify() expects parameter 2 to be string, resource given in %sdate_modify_variation2.php on line 99
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_offset_get_variation1.phpt b/ext/date/tests/date_offset_get_variation1.phpt
deleted file mode 100644
index 6b4b9a682f..0000000000
--- a/ext/date/tests/date_offset_get_variation1.phpt
+++ /dev/null
@@ -1,250 +0,0 @@
---TEST--
-Test date_offset_get() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : int date_offset_get ( DateTimeInterface $object )
- * Description: Returns the daylight saving time offset
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeInterface::getOffset
- */
-
-echo "*** Testing date_offset_get() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_offset_get($object) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_offset_get() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_parse_variation1.phpt b/ext/date/tests/date_parse_variation1.phpt
deleted file mode 100644
index d40a75f8aa..0000000000
--- a/ext/date/tests/date_parse_variation1.phpt
+++ /dev/null
@@ -1,274 +0,0 @@
---TEST--
-Test date_parse() function : usage variation - Passing unexpected values to first argument $date.
---FILE--
-<?php
-/* Prototype : array date_parse ( string $date )
- * Description: Returns associative array with detailed info about given date.
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing date_parse() : usage variation - unexpected values to first argument \$date***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-foreach($inputs as $variation =>$date) {
- echo "\n-- $variation --\n";
- $result = date_parse($date);
- if (is_array($result)) {
- var_dump($result["errors"]);
- } else {
- var_dump($result);
- }
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_parse() : usage variation - unexpected values to first argument $date***
-
--- int 0 --
-array(1) {
- [0]=>
- string(20) "Unexpected character"
-}
-
--- int 1 --
-array(1) {
- [0]=>
- string(20) "Unexpected character"
-}
-
--- int 12345 --
-array(1) {
- [4]=>
- string(20) "Unexpected character"
-}
-
--- int -12345 --
-array(1) {
- [5]=>
- string(20) "Unexpected character"
-}
-
--- float 10.5 --
-array(0) {
-}
-
--- float -10.5 --
-array(1) {
- [4]=>
- string(20) "Unexpected character"
-}
-
--- float .5 --
-array(0) {
-}
-
--- empty array --
-
-Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- lowercase null --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- lowercase true --
-array(1) {
- [0]=>
- string(20) "Unexpected character"
-}
-
--- lowercase false --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- uppercase TRUE --
-array(1) {
- [0]=>
- string(20) "Unexpected character"
-}
-
--- uppercase FALSE --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- empty string DQ --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- empty string SQ --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- string DQ --
-array(1) {
- [0]=>
- string(47) "The timezone could not be found in the database"
-}
-
--- string SQ --
-array(1) {
- [0]=>
- string(47) "The timezone could not be found in the database"
-}
-
--- mixed case string --
-array(1) {
- [0]=>
- string(47) "The timezone could not be found in the database"
-}
-
--- heredoc --
-array(1) {
- [0]=>
- string(47) "The timezone could not be found in the database"
-}
-
--- instance of classWithToString --
-array(2) {
- [0]=>
- string(47) "The timezone could not be found in the database"
- [8]=>
- string(29) "Double timezone specification"
-}
-
--- instance of classWithoutToString --
-
-Warning: date_parse() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- unset var --
-array(1) {
- [0]=>
- string(12) "Empty string"
-}
-
--- resource --
-
-Warning: date_parse() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_sun_info_variation1.phpt b/ext/date/tests/date_sun_info_variation1.phpt
deleted file mode 100644
index 76ae077f73..0000000000
--- a/ext/date/tests/date_sun_info_variation1.phpt
+++ /dev/null
@@ -1,492 +0,0 @@
---TEST--
-Test date_sun_info() function : error variations - Pass unexpected values for time argument
---FILE--
-<?php
-/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
- * Description: Returns an array with information about sunset/sunrise and twilight begin/end.
- * Source code: ext/standard/data/php_date.c
- */
-
-date_default_timezone_set("UTC");
-
-echo "*** Testing date_sun_info() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e5,
- 12.3456789000E-5,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
- array(),
-
- // string data
-/*19*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of date_sun_info()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(date_sun_info($input, 31.7667, 35.2333));
- $iterator++;
-};
-
-?>
-===Done===
---EXPECTF--
-*** Testing date_sun_info() : usage variations ***
-
--- Iteration 1 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 2 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 3 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 4 --
-array(9) {
- ["sunrise"]=>
- int(-69672)
- ["sunset"]=>
- int(-33281)
- ["transit"]=>
- int(-51476)
- ["civil_twilight_begin"]=>
- int(-71277)
- ["civil_twilight_end"]=>
- int(-31675)
- ["nautical_twilight_begin"]=>
- int(-73100)
- ["nautical_twilight_end"]=>
- int(-29852)
- ["astronomical_twilight_begin"]=>
- int(-74883)
- ["astronomical_twilight_end"]=>
- int(-28069)
-}
-
--- Iteration 5 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 6 --
-array(9) {
- ["sunrise"]=>
- int(-69672)
- ["sunset"]=>
- int(-33281)
- ["transit"]=>
- int(-51476)
- ["civil_twilight_begin"]=>
- int(-71277)
- ["civil_twilight_end"]=>
- int(-31675)
- ["nautical_twilight_begin"]=>
- int(-73100)
- ["nautical_twilight_end"]=>
- int(-29852)
- ["astronomical_twilight_begin"]=>
- int(-74883)
- ["astronomical_twilight_end"]=>
- int(-28069)
-}
-
--- Iteration 7 --
-array(9) {
- ["sunrise"]=>
- int(1226368)
- ["sunset"]=>
- int(1263442)
- ["transit"]=>
- int(1244905)
- ["civil_twilight_begin"]=>
- int(1224792)
- ["civil_twilight_end"]=>
- int(1265019)
- ["nautical_twilight_begin"]=>
- int(1222996)
- ["nautical_twilight_end"]=>
- int(1266815)
- ["astronomical_twilight_begin"]=>
- int(1221234)
- ["astronomical_twilight_end"]=>
- int(1268576)
-}
-
--- Iteration 8 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 9 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 10 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 11 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 12 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 13 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 14 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 15 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 16 --
-
-Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: date_sun_info() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 23 --
-array(9) {
- ["sunrise"]=>
- int(16742)
- ["sunset"]=>
- int(53161)
- ["transit"]=>
- int(34951)
- ["civil_twilight_begin"]=>
- int(15138)
- ["civil_twilight_end"]=>
- int(54765)
- ["nautical_twilight_begin"]=>
- int(13316)
- ["nautical_twilight_end"]=>
- int(56587)
- ["astronomical_twilight_begin"]=>
- int(11534)
- ["astronomical_twilight_end"]=>
- int(58369)
-}
-
--- Iteration 24 --
-
-Warning: date_sun_info() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/date/tests/date_sun_info_variation2.phpt b/ext/date/tests/date_sun_info_variation2.phpt
deleted file mode 100644
index 42254d5586..0000000000
--- a/ext/date/tests/date_sun_info_variation2.phpt
+++ /dev/null
@@ -1,492 +0,0 @@
---TEST--
-Test date_sun_info() function : error variations - Pass unexpected values for latitude argument
---FILE--
-<?php
-/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
- * Description: Returns an array with information about sunset/sunrise and twilight begin/end.
- * Source code: ext/standard/data/php_date.c
- */
-
-date_default_timezone_set("UTC");
-
-echo "*** Testing date_sun_info() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$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*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of date_sun_info()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(date_sun_info(strtotime("2006-12-12"), $input, 35.2333));
- $iterator++;
-};
-
-?>
-===Done===
---EXPECTF--
-*** Testing date_sun_info() : usage variations ***
-
--- Iteration 1 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 2 --
-array(9) {
- ["sunrise"]=>
- int(1165894240)
- ["sunset"]=>
- int(1165937681)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892898)
- ["civil_twilight_end"]=>
- int(1165939024)
- ["nautical_twilight_begin"]=>
- int(1165891330)
- ["nautical_twilight_end"]=>
- int(1165940591)
- ["astronomical_twilight_begin"]=>
- int(1165889758)
- ["astronomical_twilight_end"]=>
- int(1165942164)
-}
-
--- Iteration 3 --
-array(9) {
- ["sunrise"]=>
- bool(true)
- ["sunset"]=>
- bool(true)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- bool(true)
- ["civil_twilight_end"]=>
- bool(true)
- ["nautical_twilight_begin"]=>
- int(1165883368)
- ["nautical_twilight_end"]=>
- int(1165948554)
- ["astronomical_twilight_begin"]=>
- int(1165890281)
- ["astronomical_twilight_end"]=>
- int(1165941641)
-}
-
--- Iteration 4 --
-array(9) {
- ["sunrise"]=>
- int(1165894072)
- ["sunset"]=>
- int(1165937850)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165895418)
- ["civil_twilight_end"]=>
- int(1165936504)
- ["nautical_twilight_begin"]=>
- int(1165896984)
- ["nautical_twilight_end"]=>
- int(1165934938)
- ["astronomical_twilight_begin"]=>
- int(1165898549)
- ["astronomical_twilight_end"]=>
- int(1165933372)
-}
-
--- Iteration 5 --
-array(9) {
- ["sunrise"]=>
- int(1165895221)
- ["sunset"]=>
- int(1165936701)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165893858)
- ["civil_twilight_end"]=>
- int(1165938064)
- ["nautical_twilight_begin"]=>
- int(1165892278)
- ["nautical_twilight_end"]=>
- int(1165939643)
- ["astronomical_twilight_begin"]=>
- int(1165890706)
- ["astronomical_twilight_end"]=>
- int(1165941215)
-}
-
--- Iteration 6 --
-array(9) {
- ["sunrise"]=>
- int(1165893046)
- ["sunset"]=>
- int(1165938875)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165891669)
- ["civil_twilight_end"]=>
- int(1165940253)
- ["nautical_twilight_begin"]=>
- int(1165890044)
- ["nautical_twilight_end"]=>
- int(1165941878)
- ["astronomical_twilight_begin"]=>
- int(1165888392)
- ["astronomical_twilight_end"]=>
- int(1165943530)
-}
-
--- Iteration 7 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 8 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 9 --
-array(9) {
- ["sunrise"]=>
- int(1165894189)
- ["sunset"]=>
- int(1165937733)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892846)
- ["civil_twilight_end"]=>
- int(1165939075)
- ["nautical_twilight_begin"]=>
- int(1165891278)
- ["nautical_twilight_end"]=>
- int(1165940643)
- ["astronomical_twilight_begin"]=>
- int(1165889704)
- ["astronomical_twilight_end"]=>
- int(1165942217)
-}
-
--- Iteration 10 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 11 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 12 --
-array(9) {
- ["sunrise"]=>
- int(1165894240)
- ["sunset"]=>
- int(1165937681)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892898)
- ["civil_twilight_end"]=>
- int(1165939024)
- ["nautical_twilight_begin"]=>
- int(1165891330)
- ["nautical_twilight_end"]=>
- int(1165940591)
- ["astronomical_twilight_begin"]=>
- int(1165889758)
- ["astronomical_twilight_end"]=>
- int(1165942164)
-}
-
--- Iteration 13 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 14 --
-array(9) {
- ["sunrise"]=>
- int(1165894240)
- ["sunset"]=>
- int(1165937681)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892898)
- ["civil_twilight_end"]=>
- int(1165939024)
- ["nautical_twilight_begin"]=>
- int(1165891330)
- ["nautical_twilight_end"]=>
- int(1165940591)
- ["astronomical_twilight_begin"]=>
- int(1165889758)
- ["astronomical_twilight_end"]=>
- int(1165942164)
-}
-
--- Iteration 15 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 16 --
-
-Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: date_sun_info() expects parameter 2 to be float, array given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 23 --
-array(9) {
- ["sunrise"]=>
- int(1165894138)
- ["sunset"]=>
- int(1165937784)
- ["transit"]=>
- int(1165915961)
- ["civil_twilight_begin"]=>
- int(1165892795)
- ["civil_twilight_end"]=>
- int(1165939127)
- ["nautical_twilight_begin"]=>
- int(1165891226)
- ["nautical_twilight_end"]=>
- int(1165940696)
- ["astronomical_twilight_begin"]=>
- int(1165889650)
- ["astronomical_twilight_end"]=>
- int(1165942271)
-}
-
--- Iteration 24 --
-
-Warning: date_sun_info() expects parameter 2 to be float, resource given in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/date/tests/date_sun_info_variation3.phpt b/ext/date/tests/date_sun_info_variation3.phpt
deleted file mode 100644
index 69396e4ee2..0000000000
--- a/ext/date/tests/date_sun_info_variation3.phpt
+++ /dev/null
@@ -1,493 +0,0 @@
---TEST--
-Test date_sun_info() function : usage variations - Pass unexpected values for longitude argument
---FILE--
-<?php
-/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
- * Description: Returns an array with information about sunset/sunrise and twilight begin/end.
- * Source code: ext/standard/data/php_date.c
- */
-
-date_default_timezone_set("UTC");
-
-echo "*** Testing date_sun_info() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$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*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of date_sun_info()
-$iterator = 1;
-
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(date_sun_info(strtotime("2006-12-12"), 31.7667, $input));
- $iterator++;
-};
-
-?>
-===Done===
---EXPECTF--
-*** Testing date_sun_info() : usage variations ***
-
--- Iteration 1 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 2 --
-array(9) {
- ["sunrise"]=>
- int(1165905981)
- ["sunset"]=>
- int(1165942378)
- ["transit"]=>
- int(1165924179)
- ["civil_twilight_begin"]=>
- int(1165904376)
- ["civil_twilight_end"]=>
- int(1165943983)
- ["nautical_twilight_begin"]=>
- int(1165902553)
- ["nautical_twilight_end"]=>
- int(1165945806)
- ["astronomical_twilight_begin"]=>
- int(1165900771)
- ["astronomical_twilight_end"]=>
- int(1165947588)
-}
-
--- Iteration 3 --
-array(9) {
- ["sunrise"]=>
- int(1165879309)
- ["sunset"]=>
- int(1165917937)
- ["transit"]=>
- int(1165898623)
- ["civil_twilight_begin"]=>
- int(1165877787)
- ["civil_twilight_end"]=>
- int(1165919460)
- ["nautical_twilight_begin"]=>
- int(1165876041)
- ["nautical_twilight_end"]=>
- int(1165921205)
- ["astronomical_twilight_begin"]=>
- int(1165874319)
- ["astronomical_twilight_end"]=>
- int(1165922928)
-}
-
--- Iteration 4 --
-array(9) {
- ["sunrise"]=>
- int(1165864467)
- ["sunset"]=>
- int(1165900749)
- ["transit"]=>
- int(1165882608)
- ["civil_twilight_begin"]=>
- int(1165862856)
- ["civil_twilight_end"]=>
- int(1165902359)
- ["nautical_twilight_begin"]=>
- int(1165861029)
- ["nautical_twilight_end"]=>
- int(1165904187)
- ["astronomical_twilight_begin"]=>
- int(1165859242)
- ["astronomical_twilight_end"]=>
- int(1165905973)
-}
-
--- Iteration 5 --
-array(9) {
- ["sunrise"]=>
- int(1165903700)
- ["sunset"]=>
- int(1165940097)
- ["transit"]=>
- int(1165921899)
- ["civil_twilight_begin"]=>
- int(1165902095)
- ["civil_twilight_end"]=>
- int(1165941702)
- ["nautical_twilight_begin"]=>
- int(1165900272)
- ["nautical_twilight_end"]=>
- int(1165943525)
- ["astronomical_twilight_begin"]=>
- int(1165898490)
- ["astronomical_twilight_end"]=>
- int(1165945308)
-}
-
--- Iteration 6 --
-array(9) {
- ["sunrise"]=>
- int(1165908743)
- ["sunset"]=>
- int(1165945138)
- ["transit"]=>
- int(1165926940)
- ["civil_twilight_begin"]=>
- int(1165907137)
- ["civil_twilight_end"]=>
- int(1165946743)
- ["nautical_twilight_begin"]=>
- int(1165905315)
- ["nautical_twilight_end"]=>
- int(1165948566)
- ["astronomical_twilight_begin"]=>
- int(1165903532)
- ["astronomical_twilight_end"]=>
- int(1165950349)
-}
-
--- Iteration 7 --
-array(9) {
- ["sunrise"]=>
- int(1165920008)
- ["sunset"]=>
- int(1165970177)
- ["transit"]=>
- int(1165945092)
- ["civil_twilight_begin"]=>
- int(1165918353)
- ["civil_twilight_end"]=>
- int(1165971832)
- ["nautical_twilight_begin"]=>
- int(1165916371)
- ["nautical_twilight_end"]=>
- int(1165973814)
- ["astronomical_twilight_begin"]=>
- int(1165914258)
- ["astronomical_twilight_end"]=>
- int(1165975927)
-}
-
--- Iteration 8 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 9 --
-array(9) {
- ["sunrise"]=>
- int(1165906101)
- ["sunset"]=>
- int(1165942498)
- ["transit"]=>
- int(1165924300)
- ["civil_twilight_begin"]=>
- int(1165904496)
- ["civil_twilight_end"]=>
- int(1165944103)
- ["nautical_twilight_begin"]=>
- int(1165902673)
- ["nautical_twilight_end"]=>
- int(1165945926)
- ["astronomical_twilight_begin"]=>
- int(1165900891)
- ["astronomical_twilight_end"]=>
- int(1165947708)
-}
-
--- Iteration 10 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 11 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 12 --
-array(9) {
- ["sunrise"]=>
- int(1165905981)
- ["sunset"]=>
- int(1165942378)
- ["transit"]=>
- int(1165924179)
- ["civil_twilight_begin"]=>
- int(1165904376)
- ["civil_twilight_end"]=>
- int(1165943983)
- ["nautical_twilight_begin"]=>
- int(1165902553)
- ["nautical_twilight_end"]=>
- int(1165945806)
- ["astronomical_twilight_begin"]=>
- int(1165900771)
- ["astronomical_twilight_end"]=>
- int(1165947588)
-}
-
--- Iteration 13 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 14 --
-array(9) {
- ["sunrise"]=>
- int(1165905981)
- ["sunset"]=>
- int(1165942378)
- ["transit"]=>
- int(1165924179)
- ["civil_twilight_begin"]=>
- int(1165904376)
- ["civil_twilight_end"]=>
- int(1165943983)
- ["nautical_twilight_begin"]=>
- int(1165902553)
- ["nautical_twilight_end"]=>
- int(1165945806)
- ["astronomical_twilight_begin"]=>
- int(1165900771)
- ["astronomical_twilight_end"]=>
- int(1165947588)
-}
-
--- Iteration 15 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 16 --
-
-Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: date_sun_info() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 23 --
-array(9) {
- ["sunrise"]=>
- int(1165906221)
- ["sunset"]=>
- int(1165942618)
- ["transit"]=>
- int(1165924420)
- ["civil_twilight_begin"]=>
- int(1165904616)
- ["civil_twilight_end"]=>
- int(1165944223)
- ["nautical_twilight_begin"]=>
- int(1165902793)
- ["nautical_twilight_end"]=>
- int(1165946046)
- ["astronomical_twilight_begin"]=>
- int(1165901011)
- ["astronomical_twilight_end"]=>
- int(1165947828)
-}
-
--- Iteration 24 --
-
-Warning: date_sun_info() expects parameter 3 to be float, resource given in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/date/tests/date_sunrise_variation1.phpt b/ext/date/tests/date_sunrise_variation1.phpt
deleted file mode 100644
index 7bb7be0c28..0000000000
--- a/ext/date/tests/date_sunrise_variation1.phpt
+++ /dev/null
@@ -1,316 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation - Passing unexpected values to first argument time.
---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
- */
-
-echo "*** Testing date_sunrise() : usage variation ***\n";
-
-//Initialise the variables
-$latitude = 38.4;
-$longitude = -9;
-$zenith = 90;
-$gmt_offset = 1;
-$format = SUNFUNCS_RET_STRING;
-date_default_timezone_set("Asia/Calcutta");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for time
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunrise($value, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunrise($value, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunrise($value, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
---int 0--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---int 1--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---int 12345--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---int -12345--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---float 10.5--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---float -10.5--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---float .5--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---empty array--
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---lowercase null--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---lowercase true--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---lowercase false--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---uppercase TRUE--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---uppercase FALSE--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---empty string DQ--
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-
---unset var--
-string(5) "08:56"
-float(8.943%d)
-int(28596)
-===DONE===
diff --git a/ext/date/tests/date_sunrise_variation2.phpt b/ext/date/tests/date_sunrise_variation2.phpt
deleted file mode 100644
index 27a5272b4b..0000000000
--- a/ext/date/tests/date_sunrise_variation2.phpt
+++ /dev/null
@@ -1,213 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation - Passing unexpected values to second argument format.
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$latitude = 38.4;
-$longitude = -9;
-$zenith = 90;
-$gmt_offset = 1;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for format
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunrise($time, $value, $latitude, $longitude, $zenith, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
---float 10.5--
-
-Warning: date_sunrise(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
-bool(false)
-
---float -10.5--
-
-Warning: date_sunrise(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
-bool(false)
-
---float 12.3456789000e10--
-
-Warning: date_sunrise() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
---float -12.3456789000e10--
-
-Warning: date_sunrise() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
---float .5--
-int(1218174468)
-
---empty array--
-
-Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1218174468)
-
---lowercase null--
-int(1218174468)
-
---lowercase true--
-string(5) "06:47"
-
---lowercase false--
-int(1218174468)
-
---uppercase TRUE--
-string(5) "06:47"
-
---uppercase FALSE--
-int(1218174468)
-
---empty string DQ--
-
-Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunrise() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunrise() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1218174468)
-
---unset var--
-int(1218174468)
-===DONE===
diff --git a/ext/date/tests/date_sunrise_variation3.phpt b/ext/date/tests/date_sunrise_variation3.phpt
deleted file mode 100644
index 32287db243..0000000000
--- a/ext/date/tests/date_sunrise_variation3.phpt
+++ /dev/null
@@ -1,294 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation - Passing unexpected values to third argument latitude.
---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
- */
-
-echo "*** Testing date_sunrise() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$longitude = -9;
-$zenith = 90;
-$gmt_offset = -5.5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for latitude
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $value, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $value, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $value, $longitude, $zenith, $gmt_offset) );
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
---int 0--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-
---int 1--
-string(5) "01:09"
-float(1.155%d)
-int(1218177560)
-
---int 12345--
-bool(false)
-bool(false)
-bool(false)
-
---int -12345--
-bool(false)
-bool(false)
-bool(false)
-
---empty array--
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-
---lowercase null--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-
---lowercase true--
-string(5) "01:09"
-float(1.155%d)
-int(1218177560)
-
---lowercase false--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-
---uppercase TRUE--
-string(5) "01:09"
-float(1.155%d)
-int(1218177560)
-
---uppercase FALSE--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-
---empty string DQ--
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-
---unset var--
-string(5) "01:10"
-float(1.174%d)
-int(1218177629)
-===DONE===
diff --git a/ext/date/tests/date_sunrise_variation4.phpt b/ext/date/tests/date_sunrise_variation4.phpt
deleted file mode 100644
index 00fb15837b..0000000000
--- a/ext/date/tests/date_sunrise_variation4.phpt
+++ /dev/null
@@ -1,296 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation - Passing unexpected values to fourth argument longitude.
---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";
-
-//Initialise the variables
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$latitude = 38.4;
-$zenith = 90;
-$gmt_offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for longitude
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $value, $zenith, $gmt_offset) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $value, $zenith, $gmt_offset) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $value, $zenith, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
---int 0--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-
---int 1--
-string(5) "05:07"
-float(5.129%d)
-int(1218172067)
-
---int 12345--
-string(5) "21:45"
-float(21.757%d)
-int(1218145525)
-
---int -12345--
-string(5) "12:41"
-float(12.694%d)
-int(1218199301)
-
---empty array--
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-
---lowercase null--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-
---lowercase true--
-string(5) "05:07"
-float(5.129%d)
-int(1218172067)
-
---lowercase false--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-
---uppercase TRUE--
-string(5) "05:07"
-float(5.129%d)
-int(1218172067)
-
---uppercase FALSE--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-
---empty string DQ--
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-
---unset var--
-string(5) "05:11"
-float(5.196%d)
-int(1218172307)
-===DONE===
diff --git a/ext/date/tests/date_sunrise_variation5.phpt b/ext/date/tests/date_sunrise_variation5.phpt
deleted file mode 100644
index 7e44590a7d..0000000000
--- a/ext/date/tests/date_sunrise_variation5.phpt
+++ /dev/null
@@ -1,296 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation - Passing unexpected values to fifth argument zenith
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$latitude = 38.4;
-$longitude = -9;
-$gmt_offset = 5.5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for zenith
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $value, $gmt_offset) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $value, $gmt_offset) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $value, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
---int 0--
-bool(false)
-bool(false)
-bool(false)
-
---int 1--
-bool(false)
-bool(false)
-bool(false)
-
---int 12345--
-string(5) "09:50"
-float(9.849%d)
-int(1218169259)
-
---int -12345--
-string(5) "09:54"
-float(9.904%d)
-int(1218169455)
-
---empty array--
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-bool(false)
-bool(false)
-bool(false)
-
---lowercase null--
-bool(false)
-bool(false)
-bool(false)
-
---lowercase true--
-bool(false)
-bool(false)
-bool(false)
-
---lowercase false--
-bool(false)
-bool(false)
-bool(false)
-
---uppercase TRUE--
-bool(false)
-bool(false)
-bool(false)
-
---uppercase FALSE--
-bool(false)
-bool(false)
-bool(false)
-
---empty string DQ--
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-bool(false)
-bool(false)
-bool(false)
-
---unset var--
-bool(false)
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_sunrise_variation6.phpt b/ext/date/tests/date_sunrise_variation6.phpt
deleted file mode 100644
index 0a9e776a61..0000000000
--- a/ext/date/tests/date_sunrise_variation6.phpt
+++ /dev/null
@@ -1,295 +0,0 @@
---TEST--
-Test date_sunrise() function : usage variation - Passing unexpected values to sixth argument gmt_offset.
---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";
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$latitude = 38.4;
-$longitude = -9;
-$zenith = 90;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for gmt_offset
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $value) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $value) );
- var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunrise() : usage variation ***
-
---int 0--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-
---int 1--
-string(5) "06:47"
-float(6.796%d)
-int(1218174468)
-
---int 12345--
-string(5) "14:47"
-float(14.796%d)
-int(1218174468)
-
---int -12345--
-string(5) "12:47"
-float(12.796%d)
-int(1218174468)
-
---empty array--
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-
---lowercase null--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-
---lowercase true--
-string(5) "06:47"
-float(6.796%d)
-int(1218174468)
-
---lowercase false--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-
---uppercase TRUE--
-string(5) "06:47"
-float(6.796%d)
-int(1218174468)
-
---uppercase FALSE--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-
---empty string DQ--
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-
---unset var--
-string(5) "05:47"
-float(5.796%d)
-int(1218174468)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation1.phpt b/ext/date/tests/date_sunset_variation1.phpt
deleted file mode 100644
index e128d1c404..0000000000
--- a/ext/date/tests/date_sunset_variation1.phpt
+++ /dev/null
@@ -1,316 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing unexpected values to first argument time.
---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";
-
-//Initialise the variables
-$latitude = 38.4;
-$longitude = -9;
-$zenith = 90;
-$gmt_offset = 1;
-date_default_timezone_set("Asia/Calcutta");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for time
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunset($value, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunset($value, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunset($value, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
---int 0--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---int 1--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---int 12345--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---int -12345--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---float 10.5--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---float -10.5--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---float .5--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---empty array--
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---lowercase null--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---lowercase true--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---lowercase false--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---uppercase TRUE--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---uppercase FALSE--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---empty string DQ--
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-
---unset var--
-string(5) "18:22"
-float(18.373%d)
-int(62545)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation2.phpt b/ext/date/tests/date_sunset_variation2.phpt
deleted file mode 100644
index 51ad39570e..0000000000
--- a/ext/date/tests/date_sunset_variation2.phpt
+++ /dev/null
@@ -1,213 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing unexpected values to second argument format.
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$latitude = 22.34;
-$longitude = 88.21;
-$zenith = 90;
-$gmt_offset = 5.5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for format
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunset($time, $value, $latitude, $longitude, $zenith, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
---float 10.5--
-
-Warning: date_sunset(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
-bool(false)
-
---float -10.5--
-
-Warning: date_sunset(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
-bool(false)
-
---float 12.3456789000e10--
-
-Warning: date_sunset() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
---float -12.3456789000e10--
-
-Warning: date_sunset() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
---float .5--
-int(1218199264)
-
---empty array--
-
-Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1218199264)
-
---lowercase null--
-int(1218199264)
-
---lowercase true--
-string(5) "18:11"
-
---lowercase false--
-int(1218199264)
-
---uppercase TRUE--
-string(5) "18:11"
-
---uppercase FALSE--
-int(1218199264)
-
---empty string DQ--
-
-Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunset() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunset() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1218199264)
-
---unset var--
-int(1218199264)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation3.phpt b/ext/date/tests/date_sunset_variation3.phpt
deleted file mode 100644
index ca91e639d0..0000000000
--- a/ext/date/tests/date_sunset_variation3.phpt
+++ /dev/null
@@ -1,297 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing unexpected values to third argument latitude.
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$longitude = 88.21;
-$zenith = 90;
-$gmt_offset = 5.5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for latitude
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $value, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $value, $longitude, $zenith, $gmt_offset) );
- var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $value, $longitude, $zenith, $gmt_offset) );
-
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
---int 0--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-
---int 1--
-string(5) "17:45"
-float(17.750%d)
-int(1218197701)
-
---int 12345--
-bool(false)
-bool(false)
-bool(false)
-
---int -12345--
-string(5) "17:35"
-float(17.598%d)
-int(1218197155)
-
---empty array--
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-
---lowercase null--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-
---lowercase true--
-string(5) "17:45"
-float(17.750%d)
-int(1218197701)
-
---lowercase false--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-
---uppercase TRUE--
-string(5) "17:45"
-float(17.750%d)
-int(1218197701)
-
---uppercase FALSE--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-
---empty string DQ--
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-
---unset var--
-string(5) "17:43"
-float(17.731%d)
-int(1218197632)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation4.phpt b/ext/date/tests/date_sunset_variation4.phpt
deleted file mode 100644
index 75fc64cc92..0000000000
--- a/ext/date/tests/date_sunset_variation4.phpt
+++ /dev/null
@@ -1,296 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing unexpected values to fourth argument longitude.
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$latitude = 22.34;
-$zenith = 90;
-$gmt_offset = 5.5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for longitude
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $value, $zenith, $gmt_offset) );
- var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $value, $zenith, $gmt_offset) );
- var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $value, $zenith, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
---int 0--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-
---int 1--
-string(5) "23:59"
-float(23.995%d)
-int(1218220185)
-
---int 12345--
-string(5) "17:15"
-float(17.259%d)
-int(1218195932)
-
---int -12345--
-string(5) "12:19"
-float(12.319%d)
-int(1218178151)
-
---empty array--
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-
---lowercase null--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-
---lowercase true--
-string(5) "23:59"
-float(23.995%d)
-int(1218220185)
-
---lowercase false--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-
---uppercase TRUE--
-string(5) "23:59"
-float(23.995%d)
-int(1218220185)
-
---uppercase FALSE--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-
---empty string DQ--
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-
---unset var--
-string(5) "00:03"
-float(0.062%d)
-int(1218220425)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation5.phpt b/ext/date/tests/date_sunset_variation5.phpt
deleted file mode 100644
index 54ea07a8c4..0000000000
--- a/ext/date/tests/date_sunset_variation5.phpt
+++ /dev/null
@@ -1,296 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing unexpected values to fifth argument zenith.
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$longitude = 88.21;
-$latitude = 22.34;
-$gmt_offset = 5.5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for zenith
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $value, $gmt_offset) );
- var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $value, $gmt_offset) );
- var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $value, $gmt_offset) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
---int 0--
-bool(false)
-bool(false)
-bool(false)
-
---int 1--
-bool(false)
-bool(false)
-bool(false)
-
---int 12345--
-string(5) "19:20"
-float(19.343%d)
-int(1218203437)
-
---int -12345--
-bool(false)
-bool(false)
-bool(false)
-
---empty array--
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-bool(false)
-bool(false)
-bool(false)
-
---lowercase null--
-bool(false)
-bool(false)
-bool(false)
-
---lowercase true--
-bool(false)
-bool(false)
-bool(false)
-
---lowercase false--
-bool(false)
-bool(false)
-bool(false)
-
---uppercase TRUE--
-bool(false)
-bool(false)
-bool(false)
-
---uppercase FALSE--
-bool(false)
-bool(false)
-bool(false)
-
---empty string DQ--
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-bool(false)
-bool(false)
-bool(false)
-
---unset var--
-bool(false)
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_sunset_variation6.phpt b/ext/date/tests/date_sunset_variation6.phpt
deleted file mode 100644
index 933f634036..0000000000
--- a/ext/date/tests/date_sunset_variation6.phpt
+++ /dev/null
@@ -1,296 +0,0 @@
---TEST--
-Test date_sunset() function : usage variation - Passing unexpected values to sixth argument gmt_offset.
---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";
-
-// Initialise function arguments not being substituted (if any)
-date_default_timezone_set("Asia/Calcutta");
-$time = mktime(8, 8, 8, 8, 8, 2008);
-$longitude = 88.21;
-$latitude = 22.34;
-$zenith = 90;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for gmt_offset
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $value) );
- var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $value) );
- var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_sunset() : usage variation ***
-
---int 0--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-
---int 1--
-string(5) "13:41"
-float(13.684%d)
-int(1218199264)
-
---int 12345--
-string(5) "21:41"
-float(21.684%d)
-int(1218199264)
-
---int -12345--
-string(5) "19:41"
-float(19.684%d)
-int(1218199264)
-
---empty array--
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-
---lowercase null--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-
---lowercase true--
-string(5) "13:41"
-float(13.684%d)
-int(1218199264)
-
---lowercase false--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-
---uppercase TRUE--
-string(5) "13:41"
-float(13.684%d)
-int(1218199264)
-
---uppercase FALSE--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-
---empty string DQ--
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
-Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-
---unset var--
-string(5) "12:41"
-float(12.684%d)
-int(1218199264)
-===DONE===
diff --git a/ext/date/tests/date_time_set_variation1.phpt b/ext/date/tests/date_time_set_variation1.phpt
deleted file mode 100644
index d3999207e9..0000000000
--- a/ext/date/tests/date_time_set_variation1.phpt
+++ /dev/null
@@ -1,254 +0,0 @@
---TEST--
-Test date_time_set() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : DateTime date_time_set ( DateTime $object , int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setTime
- */
-
-echo "*** Testing date_time_set() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-$minute = 13;
-$sec = 45;
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_time_set($object, $hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_time_set() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_time_set() expects parameter 1 to be DateTime, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_time_set_variation2.phpt b/ext/date/tests/date_time_set_variation2.phpt
deleted file mode 100644
index 6892a1b747..0000000000
--- a/ext/date/tests/date_time_set_variation2.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_time_set() function : usage variation - Passing unexpected values to second argument $hour.
---FILE--
-<?php
-/* Prototype : DateTime date_time_set ( DateTime $object , int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setTime
- */
-
-echo "*** Testing date_time_set() : usage variation - unexpected values to second argument \$hour***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-01-31 15:14:10");
-$minute = 13;
-$sec = 45;
-
-foreach($inputs as $variation =>$hour) {
- echo "\n-- $variation --\n";
- var_dump( date_time_set($object, $hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_time_set() : usage variation - unexpected values to second argument $hour***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 01:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2010-06-29 09:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 15:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 14:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_time_set() expects parameter 2 to be int, array given in %s
-bool(false)
-
--- int indexed array --
-
-Warning: date_time_set() expects parameter 2 to be int, array given in %s
-bool(false)
-
--- associative array --
-
-Warning: date_time_set() expects parameter 2 to be int, array given in %s
-bool(false)
-
--- nested arrays --
-
-Warning: date_time_set() expects parameter 2 to be int, array given in %s
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 01:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 01:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_time_set() expects parameter 2 to be int, string given in %s
-bool(false)
-
--- empty string SQ --
-
-Warning: date_time_set() expects parameter 2 to be int, string given in %s
-bool(false)
-
--- string DQ --
-
-Warning: date_time_set() expects parameter 2 to be int, string given in %s
-bool(false)
-
--- string SQ --
-
-Warning: date_time_set() expects parameter 2 to be int, string given in %s
-bool(false)
-
--- mixed case string --
-
-Warning: date_time_set() expects parameter 2 to be int, string given in %s
-bool(false)
-
--- heredoc --
-
-Warning: date_time_set() expects parameter 2 to be int, string given in %s
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_time_set() expects parameter 2 to be int, object given in %s
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_time_set() expects parameter 2 to be int, object given in %s
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-29 00:13:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_time_set() expects parameter 2 to be int, resource given in %s
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_time_set_variation3.phpt b/ext/date/tests/date_time_set_variation3.phpt
deleted file mode 100644
index 0d1315d8e3..0000000000
--- a/ext/date/tests/date_time_set_variation3.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_time_set() function : usage variation - Passing unexpected values to third argument $minute.
---FILE--
-<?php
-/* Prototype : DateTime date_time_set ( DateTime $object , int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setTime
- */
-
-echo "*** Testing date_time_set() : usage variation - unexpected values to third argument \$minute***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-01-31 15:14:10");
-$hour = 10;
-$sec = 45;
-
-foreach($inputs as $variation =>$minute) {
- echo "\n-- $variation --\n";
- var_dump( date_time_set($object, $hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_time_set() : usage variation - unexpected values to third argument $minute***
-
--- int 0 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-31 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-31 10:01:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-02-08 23:45:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-30 20:15:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-30 10:10:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-30 09:50:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#3 (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:01:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:01:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_time_set() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_time_set() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-30 10:00:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_time_set() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_time_set_variation4.phpt b/ext/date/tests/date_time_set_variation4.phpt
deleted file mode 100644
index 8f8fdd7de6..0000000000
--- a/ext/date/tests/date_time_set_variation4.phpt
+++ /dev/null
@@ -1,329 +0,0 @@
---TEST--
-Test date_time_set() function : usage variation - Passing unexpected values to forth argument $sec.
---FILE--
-<?php
-/* Prototype : DateTime date_time_set ( DateTime $object , int $hour , int $minute [, int $second ] )
- * Description: Resets the current time of the DateTime object to a different time.
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setTime
- */
-
-echo "*** Testing date_time_set() : usage variation - unexpected values to forth argument \$sec***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-01-31 15:14:10");
-$hour = 10;
-$minute = 13;
-
-foreach($inputs as $variation =>$sec) {
- echo "\n-- $variation --\n";
- var_dump( date_time_set($object, $hour, $minute, $sec) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_time_set() : usage variation - unexpected values to forth argument $sec***
-
--- int 0 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 1 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:01.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int 12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 13:38:45.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- int -12345 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 06:47:15.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float 10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:10.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float -10.5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:12:50.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- float .5 --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty array --
-
-Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase null --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase true --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:01.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- lowercase false --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase TRUE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:01.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- uppercase FALSE --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- empty string DQ --
-
-Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_time_set() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_time_set() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- unset var --
-object(DateTime)#%d (3) {
- ["date"]=>
- string(26) "2009-01-31 10:13:00.000000"
- ["timezone_type"]=>
- int(3)
- ["timezone"]=>
- string(13) "Europe/London"
-}
-
--- resource --
-
-Warning: date_time_set() expects parameter 4 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_timezone_get_variation1.phpt b/ext/date/tests/date_timezone_get_variation1.phpt
deleted file mode 100644
index a9e995fa78..0000000000
--- a/ext/date/tests/date_timezone_get_variation1.phpt
+++ /dev/null
@@ -1,250 +0,0 @@
---TEST--
-Test date_timezone_get() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : DateTimeZone date_timezone_get ( DateTimeInterface $object )
- * Description: Return time zone relative to given DateTimeInterface
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeInterface::getTimezone
- */
-
-echo "*** Testing date_timezone_get() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_timezone_get($object) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_timezone_get() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_timezone_set_variation1.phpt b/ext/date/tests/date_timezone_set_variation1.phpt
deleted file mode 100644
index 549993b532..0000000000
--- a/ext/date/tests/date_timezone_set_variation1.phpt
+++ /dev/null
@@ -1,253 +0,0 @@
---TEST--
-Test date_timezone_set() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : DateTime date_timezone_set ( DateTime $object , DateTimeZone $timezone )
- * Description: Sets the time zone for the DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setTimezone
- */
-
-echo "*** Testing date_timezone_set() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$timezone = timezone_open("America/Los_Angeles");
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( date_timezone_set($object, $timezone) );
-};
-
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_timezone_set() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_timezone_set() expects parameter 1 to be DateTime, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_timezone_set_variation2.phpt b/ext/date/tests/date_timezone_set_variation2.phpt
deleted file mode 100644
index 2c17c255b0..0000000000
--- a/ext/date/tests/date_timezone_set_variation2.phpt
+++ /dev/null
@@ -1,252 +0,0 @@
---TEST--
-Test date_timezone_set() function : usage variation - Passing unexpected values to second argument $timezone.
---FILE--
-<?php
-/* Prototype : DateTime date_timezone_set ( DateTime $object , DateTimeZone $timezone )
- * Description: Sets the time zone for the DateTime object
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::setTimezone
- */
-
-echo "*** Testing date_timezone_set() : usage variation - unexpected values to second argument \$timezone***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = date_create("2009-01-30 17:57:32");
-
-foreach($inputs as $variation =>$timezone) {
- echo "\n-- $variation --\n";
- var_dump( date_timezone_set($object, $timezone) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date_timezone_set() : usage variation - unexpected values to second argument $timezone***
-
--- int 0 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_variation1.phpt b/ext/date/tests/date_variation1.phpt
deleted file mode 100644
index 533d0d3d7c..0000000000
--- a/ext/date/tests/date_variation1.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test date() function : usage variation - Passing unexpected values to first argument $format.
---FILE--
-<?php
-/* Prototype : string date ( string $format [, int $timestamp ] )
- * Description: Format a local time/date.
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing date() : usage variation - unexpected values to first argument \$format***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$timestamp = mktime(10, 44, 30, 2, 27, 2009);
-
-foreach($inputs as $variation =>$format) {
- echo "\n-- $variation --\n";
- var_dump( date($format, $timestamp) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date() : usage variation - unexpected values to first argument $format***
-
--- int 0 --
-string(1) "0"
-
--- int 1 --
-string(1) "1"
-
--- int 12345 --
-string(5) "12345"
-
--- int -12345 --
-string(6) "-12345"
-
--- float 10.5 --
-string(4) "10.5"
-
--- float -10.5 --
-string(5) "-10.5"
-
--- float .5 --
-string(3) "0.5"
-
--- empty array --
-
-Warning: date() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(0) ""
-
--- lowercase null --
-string(0) ""
-
--- lowercase true --
-string(1) "1"
-
--- lowercase false --
-string(0) ""
-
--- uppercase TRUE --
-string(1) "1"
-
--- uppercase FALSE --
-string(0) ""
-
--- empty string DQ --
-string(0) ""
-
--- empty string SQ --
-string(0) ""
-
--- string DQ --
-string(40) "3028Fri, 27 Feb 2009 10:44:30 +000044210"
-
--- string SQ --
-string(40) "3028Fri, 27 Feb 2009 10:44:30 +000044210"
-
--- mixed case string --
-string(40) "30GMTFri, 27 Feb 2009 10:44:30 +00000210"
-
--- heredoc --
-string(76) "10Europe/LondonFridayFriday2009 52009Fri, 27 Feb 2009 10:44:30 +0000Friday27"
-
--- instance of classWithToString --
-string(64) "CFridayam3030 AM 2009b27Europe/London2009-02-27T10:44:30+00:0028"
-
--- instance of classWithoutToString --
-
-Warning: date() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(0) ""
-
--- unset var --
-string(0) ""
-
--- resource --
-
-Warning: date() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/date_variation2.phpt b/ext/date/tests/date_variation2.phpt
deleted file mode 100644
index 77dc822396..0000000000
--- a/ext/date/tests/date_variation2.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test date() function : usage variation - Passing unexpected values to second argument $timestamp.
---FILE--
-<?php
-/* Prototype : string date ( string $format [, int $timestamp ] )
- * Description: Format a local time/date.
- * Source code: ext/date/php_date.c
- */
-
-echo "*** Testing date() : usage variation - unexpected values to second argument \$timestamp***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$format = "F j, Y, g:i a";
-
-foreach($inputs as $variation =>$timestamp) {
- echo "\n-- $variation --\n";
- var_dump( date($format, $timestamp) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing date() : usage variation - unexpected values to second argument $timestamp***
-
--- int 0 --
-string(24) "January 1, 1970, 1:00 am"
-
--- int 1 --
-string(24) "January 1, 1970, 1:00 am"
-
--- int 12345 --
-string(24) "January 1, 1970, 4:25 am"
-
--- int -12345 --
-string(26) "December 31, 1969, 9:34 pm"
-
--- float 10.5 --
-string(24) "January 1, 1970, 1:00 am"
-
--- float -10.5 --
-string(25) "January 1, 1970, 12:59 am"
-
--- float .5 --
-string(24) "January 1, 1970, 1:00 am"
-
--- empty array --
-
-Warning: date() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: date() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: date() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: date() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(24) "January 1, 1970, 1:00 am"
-
--- lowercase null --
-string(24) "January 1, 1970, 1:00 am"
-
--- lowercase true --
-string(24) "January 1, 1970, 1:00 am"
-
--- lowercase false --
-string(24) "January 1, 1970, 1:00 am"
-
--- uppercase TRUE --
-string(24) "January 1, 1970, 1:00 am"
-
--- uppercase FALSE --
-string(24) "January 1, 1970, 1:00 am"
-
--- empty string DQ --
-
-Warning: date() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: date() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: date() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: date() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: date() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: date() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: date() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: date() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(24) "January 1, 1970, 1:00 am"
-
--- unset var --
-string(24) "January 1, 1970, 1:00 am"
-
--- resource --
-
-Warning: date() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/getdate_variation1.phpt b/ext/date/tests/getdate_variation1.phpt
deleted file mode 100644
index 87b43e14d6..0000000000
--- a/ext/date/tests/getdate_variation1.phpt
+++ /dev/null
@@ -1,443 +0,0 @@
---TEST--
-Test getdate() function : usage variation - Passing unexpected values to first argument timestamp.
---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";
-
-//Set the default time zone
-date_default_timezone_set("Asia/Calcutta");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for timestamp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( getdate($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing getdate() : usage variation ***
-
---float 10.5--
-array(11) {
- ["seconds"]=>
- int(10)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(10)
-}
-
---float -10.5--
-array(11) {
- ["seconds"]=>
- int(50)
- ["minutes"]=>
- int(29)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(-10)
-}
-
---float .5--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-
---empty array--
-
-Warning: getdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: getdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: getdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: getdate() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-
---lowercase null--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-
---lowercase true--
-array(11) {
- ["seconds"]=>
- int(1)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(1)
-}
-
---lowercase false--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-
---uppercase TRUE--
-array(11) {
- ["seconds"]=>
- int(1)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(1)
-}
-
---uppercase FALSE--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-
---empty string DQ--
-
-Warning: getdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: getdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: getdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: getdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: getdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: getdate() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: getdate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: getdate() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-
---unset var--
-array(11) {
- ["seconds"]=>
- int(0)
- ["minutes"]=>
- int(30)
- ["hours"]=>
- int(5)
- ["mday"]=>
- int(1)
- ["wday"]=>
- int(4)
- ["mon"]=>
- int(1)
- ["year"]=>
- int(1970)
- ["yday"]=>
- int(0)
- ["weekday"]=>
- string(8) "Thursday"
- ["month"]=>
- string(7) "January"
- [0]=>
- int(0)
-}
-===DONE===
diff --git a/ext/date/tests/gettimeofday_variation1.phpt b/ext/date/tests/gettimeofday_variation1.phpt
deleted file mode 100644
index c4f91aab0b..0000000000
--- a/ext/date/tests/gettimeofday_variation1.phpt
+++ /dev/null
@@ -1,284 +0,0 @@
---TEST--
-Test gettimeofday() function : usage variation - Passing unexpected values to get_as_float argument
---FILE--
-<?php
-/* Prototype : array gettimeofday([bool get_as_float])
- * Description: Returns the current time as array
- * Source code: ext/standard/microtime.c
- * Alias to functions:
- */
-
-echo "*** Testing gettimeofday() : usage variation ***\n";
-
-date_default_timezone_set("Asia/Calcutta");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for get_as_float
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gettimeofday($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gettimeofday() : usage variation ***
-
---int 0--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---int 1--
-float(%f)
-
---int 12345--
-float(%f)
-
---int -12345--
-float(%f)
-
---float 10.5--
-float(%f)
-
---float -10.5--
-float(%f)
-
---float 12.3456789000e10--
-float(%f)
-
---float -12.3456789000e10--
-float(%f)
-
---float .5--
-float(%f)
-
---empty array--
-
-Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d
-NULL
-
---int indexed array--
-
-Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d
-NULL
-
---associative array--
-
-Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d
-NULL
-
---nested arrays--
-
-Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d
-NULL
-
---uppercase NULL--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---lowercase null--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---lowercase true--
-float(%f)
-
---lowercase false--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---uppercase TRUE--
-float(%f)
-
---uppercase FALSE--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---empty string DQ--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---empty string SQ--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---string DQ--
-float(%f)
-
---string SQ--
-float(%f)
-
---mixed case string--
-float(%f)
-
---heredoc--
-float(%f)
-
---instance of classWithToString--
-
-Warning: gettimeofday() expects parameter 1 to be bool, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: gettimeofday() expects parameter 1 to be bool, object given in %s on line %d
-NULL
-
---undefined var--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-
---unset var--
-array(4) {
- ["sec"]=>
- int(%d)
- ["usec"]=>
- int(%d)
- ["minuteswest"]=>
- int(-330)
- ["dsttime"]=>
- int(0)
-}
-===DONE===
diff --git a/ext/date/tests/gmdate_variation1.phpt b/ext/date/tests/gmdate_variation1.phpt
deleted file mode 100644
index 88fb91d5fe..0000000000
--- a/ext/date/tests/gmdate_variation1.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test gmdate() function : usage variation - Passing unexpected values to format argument .
---FILE--
-<?php
-/* Prototype : string gmdate(string format [, long timestamp])
- * Description: Format a GMT date/time
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmdate() : usage variation ***\n";
-
-// Initialise all required variables
-date_default_timezone_set('UTC');
-$timestamp = mktime(8, 8, 8, 8, 8, 2008);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for format
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmdate($value, $timestamp) );
- var_dump( gmdate($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmdate() : usage variation ***
-
---int 0--
-string(1) "0"
-string(1) "0"
-
---int 1--
-string(1) "1"
-string(1) "1"
-
---int 12345--
-string(5) "12345"
-string(5) "12345"
-
---int -12345--
-string(6) "-12345"
-string(6) "-12345"
-
---float 10.5--
-string(4) "10.5"
-string(4) "10.5"
-
---float -10.5--
-string(5) "-10.5"
-string(5) "-10.5"
-
---float 12.3456789000e10--
-string(12) "123456789000"
-string(12) "123456789000"
-
---float -12.3456789000e10--
-string(13) "-123456789000"
-string(13) "-123456789000"
-
---float .5--
-string(3) "0.5"
-string(3) "0.5"
-
---empty array--
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(0) ""
-string(0) ""
-
---lowercase null--
-string(0) ""
-string(0) ""
-
---lowercase true--
-string(1) "1"
-string(1) "1"
-
---lowercase false--
-string(0) ""
-string(0) ""
-
---uppercase TRUE--
-string(1) "1"
-string(1) "1"
-
---uppercase FALSE--
-string(0) ""
-string(0) ""
-
---empty string DQ--
-string(0) ""
-string(0) ""
-
---empty string SQ--
-string(0) ""
-string(0) ""
-
---instance of classWithToString--
-string(53) "CFridayam0808 AM 2008b8UTC2008-08-08T08:08:08+00:0031"
-string(%d) "%s"
-
---instance of classWithoutToString--
-
-Warning: gmdate() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
-Warning: gmdate() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(0) ""
-string(0) ""
-
---unset var--
-string(0) ""
-string(0) ""
-===DONE===
diff --git a/ext/date/tests/gmdate_variation2.phpt b/ext/date/tests/gmdate_variation2.phpt
deleted file mode 100644
index 0d522e5bf2..0000000000
--- a/ext/date/tests/gmdate_variation2.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test gmdate() function : usage variation - Passing unexpected values to timestamp argument.
---FILE--
-<?php
-/* Prototype : string gmdate(string format [, long timestamp])
- * Description: Format a GMT date/time
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmdate() : usage variation ***\n";
-
-
-// Initialise all required variables
-date_default_timezone_set('UTC');
-$format = DATE_ISO8601;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for timestamp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmdate($format, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmdate() : usage variation ***
-
---int 0--
-string(24) "1970-01-01T00:00:00+0000"
-
---int 1--
-string(24) "1970-01-01T00:00:01+0000"
-
---int 12345--
-string(24) "1970-01-01T03:25:45+0000"
-
---int -12345--
-string(24) "1969-12-31T20:34:15+0000"
-
---float 10.5--
-string(24) "1970-01-01T00:00:10+0000"
-
---float -10.5--
-string(24) "1969-12-31T23:59:50+0000"
-
---float .5--
-string(24) "1970-01-01T00:00:00+0000"
-
---empty array--
-
-Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(24) "1970-01-01T00:00:00+0000"
-
---lowercase null--
-string(24) "1970-01-01T00:00:00+0000"
-
---lowercase true--
-string(24) "1970-01-01T00:00:01+0000"
-
---lowercase false--
-string(24) "1970-01-01T00:00:00+0000"
-
---uppercase TRUE--
-string(24) "1970-01-01T00:00:01+0000"
-
---uppercase FALSE--
-string(24) "1970-01-01T00:00:00+0000"
-
---empty string DQ--
-
-Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmdate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmdate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(24) "1970-01-01T00:00:00+0000"
-
---unset var--
-string(24) "1970-01-01T00:00:00+0000"
-===DONE===
diff --git a/ext/date/tests/gmmktime_variation1.phpt b/ext/date/tests/gmmktime_variation1.phpt
deleted file mode 100644
index 95150e174b..0000000000
--- a/ext/date/tests/gmmktime_variation1.phpt
+++ /dev/null
@@ -1,194 +0,0 @@
---TEST--
-Test gmmktime() function : usage variation - Passing unexpected values to first argument hour.
---FILE--
-<?php
-/* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
- * Description: Get UNIX timestamp for a GMT date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmmktime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$min = 8;
-$sec = 8;
-$mon = 8;
-$day = 8;
-$year = 2008;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for hour
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmmktime($value, $min, $sec, $mon, $day, $year) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmmktime() : usage variation ***
-
---float 10.5--
-int(1218190088)
-
---float -10.5--
-int(1218118088)
-
---float .5--
-int(1218154088)
-
---empty array--
-
-Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1218154088)
-
---lowercase null--
-int(1218154088)
-
---lowercase true--
-int(1218157688)
-
---lowercase false--
-int(1218154088)
-
---uppercase TRUE--
-int(1218157688)
-
---uppercase FALSE--
-int(1218154088)
-
---empty string DQ--
-
-Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmmktime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmmktime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1218154088)
-
---unset var--
-int(1218154088)
-===DONE===
diff --git a/ext/date/tests/gmmktime_variation2.phpt b/ext/date/tests/gmmktime_variation2.phpt
deleted file mode 100644
index 2022a08a5b..0000000000
--- a/ext/date/tests/gmmktime_variation2.phpt
+++ /dev/null
@@ -1,194 +0,0 @@
---TEST--
-Test gmmktime() function : usage variation - Passing unexpected values to second argument minute.
---FILE--
-<?php
-/* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
- * Description: Get UNIX timestamp for a GMT date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmmktime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$hour = 8;
-$sec = 8;
-$mon = 8;
-$day = 8;
-$year = 2008;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for min
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmmktime($hour, $value, $sec, $mon, $day, $year) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmmktime() : usage variation ***
-
---float 10.5--
-int(1218183008)
-
---float -10.5--
-int(1218181808)
-
---float .5--
-int(1218182408)
-
---empty array--
-
-Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1218182408)
-
---lowercase null--
-int(1218182408)
-
---lowercase true--
-int(1218182468)
-
---lowercase false--
-int(1218182408)
-
---uppercase TRUE--
-int(1218182468)
-
---uppercase FALSE--
-int(1218182408)
-
---empty string DQ--
-
-Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmmktime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmmktime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1218182408)
-
---unset var--
-int(1218182408)
-===DONE===
diff --git a/ext/date/tests/gmmktime_variation3.phpt b/ext/date/tests/gmmktime_variation3.phpt
deleted file mode 100644
index 409c08ab8a..0000000000
--- a/ext/date/tests/gmmktime_variation3.phpt
+++ /dev/null
@@ -1,194 +0,0 @@
---TEST--
-Test gmmktime() function : usage variation - Passing unexpected values to third argument seconds.
---FILE--
-<?php
-/* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
- * Description: Get UNIX timestamp for a GMT date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmmktime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$hour = 8;
-$min = 8;
-$mon = 8;
-$day = 8;
-$year = 2008;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for sec
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmmktime($hour, $min, $value, $mon, $day, $year) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmmktime() : usage variation ***
-
---float 10.5--
-int(1218182890)
-
---float -10.5--
-int(1218182870)
-
---float .5--
-int(1218182880)
-
---empty array--
-
-Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1218182880)
-
---lowercase null--
-int(1218182880)
-
---lowercase true--
-int(1218182881)
-
---lowercase false--
-int(1218182880)
-
---uppercase TRUE--
-int(1218182881)
-
---uppercase FALSE--
-int(1218182880)
-
---empty string DQ--
-
-Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmmktime() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmmktime() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1218182880)
-
---unset var--
-int(1218182880)
-===DONE===
diff --git a/ext/date/tests/gmmktime_variation4.phpt b/ext/date/tests/gmmktime_variation4.phpt
deleted file mode 100644
index fb51916e34..0000000000
--- a/ext/date/tests/gmmktime_variation4.phpt
+++ /dev/null
@@ -1,194 +0,0 @@
---TEST--
-Test gmmktime() function : usage variation - Passing unexpected values to fourth argument month.
---FILE--
-<?php
-/* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
- * Description: Get UNIX timestamp for a GMT date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmmktime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$hour = 8;
-$min = 8;
-$sec = 8;
-$day = 8;
-$year = 2008;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for mon
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmmktime($hour, $min, $sec, $value, $day, $year) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmmktime() : usage variation ***
-
---float 10.5--
-int(1223453288)
-
---float -10.5--
-int(1170922088)
-
---float .5--
-int(1197101288)
-
---empty array--
-
-Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1197101288)
-
---lowercase null--
-int(1197101288)
-
---lowercase true--
-int(1199779688)
-
---lowercase false--
-int(1197101288)
-
---uppercase TRUE--
-int(1199779688)
-
---uppercase FALSE--
-int(1197101288)
-
---empty string DQ--
-
-Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmmktime() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmmktime() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1197101288)
-
---unset var--
-int(1197101288)
-===DONE===
diff --git a/ext/date/tests/gmmktime_variation5.phpt b/ext/date/tests/gmmktime_variation5.phpt
deleted file mode 100644
index 1ebf1377b3..0000000000
--- a/ext/date/tests/gmmktime_variation5.phpt
+++ /dev/null
@@ -1,194 +0,0 @@
---TEST--
-Test gmmktime() function : usage variation - Passing unexpected values to fifth argument day.
---FILE--
-<?php
-/* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
- * Description: Get UNIX timestamp for a GMT date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmmktime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$hour = 8;
-$min = 8;
-$sec = 8;
-$mon = 8;
-$year = 2008;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for day
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmmktime($hour, $min, $sec, $mon, $value, $year) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmmktime() : usage variation ***
-
---float 10.5--
-int(1218355688)
-
---float -10.5--
-int(1216627688)
-
---float .5--
-int(1217491688)
-
---empty array--
-
-Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1217491688)
-
---lowercase null--
-int(1217491688)
-
---lowercase true--
-int(1217578088)
-
---lowercase false--
-int(1217491688)
-
---uppercase TRUE--
-int(1217578088)
-
---uppercase FALSE--
-int(1217491688)
-
---empty string DQ--
-
-Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmmktime() expects parameter 5 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmmktime() expects parameter 5 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1217491688)
-
---unset var--
-int(1217491688)
-===DONE===
diff --git a/ext/date/tests/gmmktime_variation6.phpt b/ext/date/tests/gmmktime_variation6.phpt
deleted file mode 100644
index e5e80282cb..0000000000
--- a/ext/date/tests/gmmktime_variation6.phpt
+++ /dev/null
@@ -1,190 +0,0 @@
---TEST--
-Test gmmktime() function : usage variation - Passing unexpected values to sixth argument year.
---FILE--
-<?php
-/* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
- * Description: Get UNIX timestamp for a GMT date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmmktime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$hour = 8;
-$min = 8;
-$sec = 8;
-$mon = 8;
-$day = 8;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for year
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmmktime($hour, $min, $sec, $mon, $day, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmmktime() : usage variation ***
-
---float 10.5--
-int(1281254888)
-
---float .5--
-int(965722088)
-
---empty array--
-
-Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(965722088)
-
---lowercase null--
-int(965722088)
-
---lowercase true--
-int(997258088)
-
---lowercase false--
-int(965722088)
-
---uppercase TRUE--
-int(997258088)
-
---uppercase FALSE--
-int(965722088)
-
---empty string DQ--
-
-Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmmktime() expects parameter 6 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmmktime() expects parameter 6 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(965722088)
-
---unset var--
-int(965722088)
-===DONE===
diff --git a/ext/date/tests/gmstrftime_variation1.phpt b/ext/date/tests/gmstrftime_variation1.phpt
deleted file mode 100644
index c8dcbe08e5..0000000000
--- a/ext/date/tests/gmstrftime_variation1.phpt
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test gmstrftime() function : usage variation - Passing unexpected values to first argument 'format'.
---FILE--
-<?php
-/* Prototype : string gmstrftime(string format [, int timestamp])
- * Description: Format a GMT/UCT time/date according to locale settings
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmstrftime() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for format
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmstrftime($value) );
- var_dump( gmstrftime($value, $timestamp) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmstrftime() : usage variation ***
-
---int 0--
-string(1) "0"
-string(1) "0"
-
---int 1--
-string(1) "1"
-string(1) "1"
-
---int 12345--
-string(5) "12345"
-string(5) "12345"
-
---int -12345--
-string(6) "-12345"
-string(6) "-12345"
-
---float 10.5--
-string(4) "10.5"
-string(4) "10.5"
-
---float -10.5--
-string(5) "-10.5"
-string(5) "-10.5"
-
---float 12.3456789000e10--
-string(12) "123456789000"
-string(12) "123456789000"
-
---float -12.3456789000e10--
-string(13) "-123456789000"
-string(13) "-123456789000"
-
---float .5--
-string(3) "0.5"
-string(3) "0.5"
-
---empty array--
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-bool(false)
-bool(false)
-
---lowercase null--
-bool(false)
-bool(false)
-
---lowercase true--
-string(1) "1"
-string(1) "1"
-
---lowercase false--
-bool(false)
-bool(false)
-
---uppercase TRUE--
-string(1) "1"
-string(1) "1"
-
---uppercase FALSE--
-bool(false)
-bool(false)
-
---empty string DQ--
-bool(false)
-bool(false)
-
---empty string SQ--
-bool(false)
-bool(false)
-
---instance of classWithToString--
-string(14) "Class A object"
-string(14) "Class A object"
-
---instance of classWithoutToString--
-
-Warning: gmstrftime() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
-Warning: gmstrftime() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
---undefined var--
-bool(false)
-bool(false)
-
---unset var--
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/date/tests/gmstrftime_variation2.phpt b/ext/date/tests/gmstrftime_variation2.phpt
deleted file mode 100644
index 89dc158661..0000000000
--- a/ext/date/tests/gmstrftime_variation2.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test gmstrftime() function : usage variation - Passing unexpected values to second argument 'timestamp'.
---SKIPIF--
-<?php
-if(PHP_INT_SIZE != 4 ) {
- die("skip Test is not valid for 64-bit");
-}
-?>
---FILE--
-<?php
-/* Prototype : string gmstrftime(string format [, int timestamp])
- * Description: Format a GMT/UCT time/date according to locale settings
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing gmstrftime() : usage variation ***\n";
-
-date_default_timezone_set("Asia/Calcutta");
-
-// Initialise function arguments not being substituted (if any)
-$format = '%b %d %Y %H:%M:%S';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for timestamp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gmstrftime($format, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gmstrftime() : usage variation ***
-
---float 10.5--
-string(20) "Jan 01 1970 00:00:10"
-
---float -10.5--
-string(20) "Dec 31 1969 23:59:50"
-
---float 12.3456789000e10--
-
-Warning: gmstrftime() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
---float -12.3456789000e10--
-
-Warning: gmstrftime() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
---float .5--
-string(20) "Jan 01 1970 00:00:00"
-
---empty array--
-
-Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(20) "Jan 01 1970 00:00:00"
-
---lowercase null--
-string(20) "Jan 01 1970 00:00:00"
-
---lowercase true--
-string(20) "Jan 01 1970 00:00:01"
-
---lowercase false--
-string(20) "Jan 01 1970 00:00:00"
-
---uppercase TRUE--
-string(20) "Jan 01 1970 00:00:01"
-
---uppercase FALSE--
-string(20) "Jan 01 1970 00:00:00"
-
---empty string DQ--
-
-Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: gmstrftime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: gmstrftime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(20) "Jan 01 1970 00:00:00"
-
---unset var--
-string(20) "Jan 01 1970 00:00:00"
-===DONE===
diff --git a/ext/date/tests/idate_variation1.phpt b/ext/date/tests/idate_variation1.phpt
deleted file mode 100644
index 8727b8133a..0000000000
--- a/ext/date/tests/idate_variation1.phpt
+++ /dev/null
@@ -1,301 +0,0 @@
---TEST--
-Test idate() function : usage variation - Passing unexpected values to first argument 'format'.
---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)
-date_default_timezone_set("Asia/Calcutta");
-$timestamp = mktime(8, 8, 8, 8, 8, 2008);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for format
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( idate($value) );
- var_dump( idate($value, $timestamp) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing idate() : usage variation ***
-
---int 0--
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
---int 1--
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
---int 12345--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---int -12345--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---float 10.5--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---float -10.5--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---float 12.3456789000e10--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---float -12.3456789000e10--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---float .5--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---empty array--
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: idate() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---lowercase null--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---lowercase true--
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
---lowercase false--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---uppercase TRUE--
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
-Warning: idate(): Unrecognized date format token. in %s on line %d
-bool(false)
-
---uppercase FALSE--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---empty string DQ--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: idate() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
-Warning: idate() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
---undefined var--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
---unset var--
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-
-Warning: idate(): idate format is one char in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/idate_variation2.phpt b/ext/date/tests/idate_variation2.phpt
deleted file mode 100644
index 5d6cc6b13f..0000000000
--- a/ext/date/tests/idate_variation2.phpt
+++ /dev/null
@@ -1,191 +0,0 @@
---TEST--
-Test idate() function : usage variation - Passing unexpected values to second optional argument 'timestamp'.
---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");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for timestamp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( idate($format, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing idate() : usage variation ***
-
---float 10.5--
-int(1970)
-
---float -10.5--
-int(1970)
-
---float .5--
-int(1970)
-
---empty array--
-
-Warning: idate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: idate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: idate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: idate() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-int(1970)
-
---lowercase null--
-int(1970)
-
---lowercase true--
-int(1970)
-
---lowercase false--
-int(1970)
-
---uppercase TRUE--
-int(1970)
-
---uppercase FALSE--
-int(1970)
-
---empty string DQ--
-
-Warning: idate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: idate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: idate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: idate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: idate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: idate() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: idate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: idate() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-int(1970)
-
---unset var--
-int(1970)
-===DONE===
diff --git a/ext/date/tests/localtime_variation1.phpt b/ext/date/tests/localtime_variation1.phpt
deleted file mode 100644
index 6dbff620d3..0000000000
--- a/ext/date/tests/localtime_variation1.phpt
+++ /dev/null
@@ -1,658 +0,0 @@
---TEST--
-Test localtime() function : usage variation - Passing unexpected values to first argument 'timestamp'.
---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;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for timestamp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( localtime($value) );
- var_dump( localtime($value, $is_associative) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing localtime() : usage variation ***
-
---float 10.5--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---float -10.5--
-array(9) {
- [0]=>
- int(50)
- [1]=>
- int(59)
- [2]=>
- int(23)
- [3]=>
- int(31)
- [4]=>
- int(11)
- [5]=>
- int(69)
- [6]=>
- int(3)
- [7]=>
- int(364)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(50)
- ["tm_min"]=>
- int(59)
- ["tm_hour"]=>
- int(23)
- ["tm_mday"]=>
- int(31)
- ["tm_mon"]=>
- int(11)
- ["tm_year"]=>
- int(69)
- ["tm_wday"]=>
- int(3)
- ["tm_yday"]=>
- int(364)
- ["tm_isdst"]=>
- int(0)
-}
-
---float .5--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---empty array--
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---lowercase null--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---lowercase true--
-array(9) {
- [0]=>
- int(1)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(1)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---lowercase false--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---uppercase TRUE--
-array(9) {
- [0]=>
- int(1)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(1)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---uppercase FALSE--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---empty string DQ--
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: localtime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: localtime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
-Warning: localtime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---unset var--
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-array(9) {
- ["tm_sec"]=>
- int(0)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-===DONE===
diff --git a/ext/date/tests/localtime_variation2.phpt b/ext/date/tests/localtime_variation2.phpt
deleted file mode 100644
index 315d956fcd..0000000000
--- a/ext/date/tests/localtime_variation2.phpt
+++ /dev/null
@@ -1,643 +0,0 @@
---TEST--
-Test localtime() function : usage variation - Passing unexpected values to second argument 'associative_array'.
---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)
-$timestamp = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for associative_array
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( localtime($timestamp, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing localtime() : usage variation ***
-
---int 0--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---int 1--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---int 12345--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---int -12345--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---float 10.5--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---float -10.5--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---float 12.3456789000e10--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---float -12.3456789000e10--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---float .5--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---empty array--
-
-Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---lowercase null--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---lowercase true--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---lowercase false--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---uppercase TRUE--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---uppercase FALSE--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---empty string DQ--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---empty string SQ--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---string DQ--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---string SQ--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---mixed case string--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---heredoc--
-array(9) {
- ["tm_sec"]=>
- int(10)
- ["tm_min"]=>
- int(0)
- ["tm_hour"]=>
- int(0)
- ["tm_mday"]=>
- int(1)
- ["tm_mon"]=>
- int(0)
- ["tm_year"]=>
- int(70)
- ["tm_wday"]=>
- int(4)
- ["tm_yday"]=>
- int(0)
- ["tm_isdst"]=>
- int(0)
-}
-
---instance of classWithToString--
-
-Warning: localtime() expects parameter 2 to be bool, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: localtime() expects parameter 2 to be bool, object given in %s on line %d
-bool(false)
-
---undefined var--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-
---unset var--
-array(9) {
- [0]=>
- int(10)
- [1]=>
- int(0)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(0)
- [5]=>
- int(70)
- [6]=>
- int(4)
- [7]=>
- int(0)
- [8]=>
- int(0)
-}
-===DONE===
diff --git a/ext/date/tests/mktime_variation1.phpt b/ext/date/tests/mktime_variation1.phpt
deleted file mode 100644
index da4dd1836a..0000000000
--- a/ext/date/tests/mktime_variation1.phpt
+++ /dev/null
@@ -1,224 +0,0 @@
---TEST--
-Test mktime() function : usage variation - Passing unexpected values to first argument $hour.
---FILE--
-<?php
-/* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
- * Description: Get Unix timestamp for a date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing mktime() : usage variation - unexpected values to first argument \$hour***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-$minute = 30;
-$sec = 45;
-$month = 7;
-$day = 2;
-$year = 1963;
-$is_dst = 0;
-
-foreach($inputs as $variation =>$hour) {
- echo "\n-- $variation --\n";
- var_dump( mktime($hour) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mktime() : usage variation - unexpected values to first argument $hour***
-
--- int 0 --
-int(%i)
-
--- int 12345 --
-int(%i)
-
--- int -12345 --
-int(%i)
-
--- float 10.5 --
-int(%i)
-
--- float -10.5 --
-int(%i)
-
--- float .5 --
-int(%i)
-
--- empty array --
-
-Warning: mktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: mktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: mktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: mktime() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-int(%i)
-
--- lowercase null --
-int(%i)
-
--- lowercase true --
-int(%i)
-
--- lowercase false --
-int(%i)
-
--- uppercase TRUE --
-int(%i)
-
--- uppercase FALSE --
-int(%i)
-
--- empty string DQ --
-
-Warning: mktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: mktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: mktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: mktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: mktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: mktime() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: mktime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: mktime() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-int(%i)
-
--- unset var --
-int(%i)
-
--- resource --
-
-Warning: mktime() expects parameter 1 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/mktime_variation2.phpt b/ext/date/tests/mktime_variation2.phpt
deleted file mode 100644
index dafb7a0aa0..0000000000
--- a/ext/date/tests/mktime_variation2.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test mktime() function : usage variation - Passing unexpected values to second argument $minute.
---FILE--
-<?php
-/* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
- * Description: Get Unix timestamp for a date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing mktime() : usage variation - unexpected values to second argument \$minute***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-
-foreach($inputs as $variation =>$minute) {
- echo "\n-- $variation --\n";
- var_dump( mktime($hour, $minute) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mktime() : usage variation - unexpected values to second argument $minute***
-
--- int 0 --
-int(%i)
-
--- int 12345 --
-int(%i)
-
--- int -12345 --
-int(%i)
-
--- float 10.5 --
-int(%i)
-
--- float -10.5 --
-int(%i)
-
--- float .5 --
-int(%i)
-
--- empty array --
-
-Warning: mktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: mktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: mktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: mktime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-int(%i)
-
--- lowercase null --
-int(%i)
-
--- lowercase true --
-int(%i)
-
--- lowercase false --
-int(%i)
-
--- uppercase TRUE --
-int(%i)
-
--- uppercase FALSE --
-int(%i)
-
--- empty string DQ --
-
-Warning: mktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: mktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: mktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: mktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: mktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: mktime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: mktime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: mktime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-int(%i)
-
--- unset var --
-int(%i)
-
--- resource --
-
-Warning: mktime() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/mktime_variation3.phpt b/ext/date/tests/mktime_variation3.phpt
deleted file mode 100644
index e610a13b3c..0000000000
--- a/ext/date/tests/mktime_variation3.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test mktime() function : usage variation - Passing unexpected values to third argument $second.
---FILE--
-<?php
-/* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
- * Description: Get Unix timestamp for a date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing mktime() : usage variation - unexpected values to third argument \$second***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-$minute = 30;
-
-foreach($inputs as $variation =>$second) {
- echo "\n-- $variation --\n";
- var_dump( mktime($hour, $minute, $second) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mktime() : usage variation - unexpected values to third argument $second***
-
--- int 0 --
-int(%i)
-
--- int 12345 --
-int(%i)
-
--- int -12345 --
-int(%i)
-
--- float 10.5 --
-int(%i)
-
--- float -10.5 --
-int(%i)
-
--- float .5 --
-int(%i)
-
--- empty array --
-
-Warning: mktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: mktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: mktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: mktime() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-int(%i)
-
--- lowercase null --
-int(%i)
-
--- lowercase true --
-int(%i)
-
--- lowercase false --
-int(%i)
-
--- uppercase TRUE --
-int(%i)
-
--- uppercase FALSE --
-int(%i)
-
--- empty string DQ --
-
-Warning: mktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: mktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: mktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: mktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: mktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: mktime() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: mktime() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: mktime() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-int(%i)
-
--- unset var --
-int(%i)
-
--- resource --
-
-Warning: mktime() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/mktime_variation4.phpt b/ext/date/tests/mktime_variation4.phpt
deleted file mode 100644
index 5cd39dd0ec..0000000000
--- a/ext/date/tests/mktime_variation4.phpt
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test mktime() function : usage variation - Passing unexpected values to forth argument $month.
---FILE--
-<?php
-/* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
- * Description: Get Unix timestamp for a date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing mktime() : usage variation - unexpected values to forth argument \$month***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-$minute = 30;
-$second = 45;
-
-foreach($inputs as $variation =>$month) {
- echo "\n-- $variation --\n";
- var_dump( mktime($hour, $minute, $second, $month) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mktime() : usage variation - unexpected values to forth argument $month***
-
--- int 0 --
-int(%i)
-
--- int 12345 --
-%rint\(-?[1-9][0-9]*\)|bool\(false\)%r
-
--- int -12345 --
-%rint\(-?[1-9][0-9]*\)|bool\(false\)%r
-
--- float 10.5 --
-int(%i)
-
--- float -10.5 --
-int(%i)
-
--- float .5 --
-int(%i)
-
--- empty array --
-
-Warning: mktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: mktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: mktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: mktime() expects parameter 4 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-int(%i)
-
--- lowercase null --
-int(%i)
-
--- lowercase true --
-int(%i)
-
--- lowercase false --
-int(%i)
-
--- uppercase TRUE --
-int(%i)
-
--- uppercase FALSE --
-int(%i)
-
--- empty string DQ --
-
-Warning: mktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: mktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: mktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: mktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: mktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: mktime() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: mktime() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: mktime() expects parameter 4 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-int(%i)
-
--- unset var --
-int(%i)
-
--- resource --
-
-Warning: mktime() expects parameter 4 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/mktime_variation5.phpt b/ext/date/tests/mktime_variation5.phpt
deleted file mode 100644
index 526d74d896..0000000000
--- a/ext/date/tests/mktime_variation5.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test mktime() function : usage variation - Passing unexpected values to fifth argument $day.
---FILE--
-<?php
-/* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
- * Description: Get Unix timestamp for a date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing mktime() : usage variation - unexpected values to fifth argument \$day***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-$minute = 30;
-$second = 45;
-$month = 7;
-
-foreach($inputs as $variation =>$day) {
- echo "\n-- $variation --\n";
- var_dump( mktime($hour, $minute, $second, $month, $day) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mktime() : usage variation - unexpected values to fifth argument $day***
-
--- int 0 --
-int(%i)
-
--- int 12345 --
-%rint\(-?[1-9][0-9]*\)|bool\(false\)%r
-
--- int -12345 --
-int(%i)
-
--- float 10.5 --
-int(%i)
-
--- float -10.5 --
-int(%i)
-
--- float .5 --
-int(%i)
-
--- empty array --
-
-Warning: mktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: mktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: mktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: mktime() expects parameter 5 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-int(%i)
-
--- lowercase null --
-int(%i)
-
--- lowercase true --
-int(%i)
-
--- lowercase false --
-int(%i)
-
--- uppercase TRUE --
-int(%i)
-
--- uppercase FALSE --
-int(%i)
-
--- empty string DQ --
-
-Warning: mktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: mktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: mktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: mktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: mktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: mktime() expects parameter 5 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: mktime() expects parameter 5 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: mktime() expects parameter 5 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-int(%i)
-
--- unset var --
-int(%i)
-
--- resource --
-
-Warning: mktime() expects parameter 5 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/mktime_variation6.phpt b/ext/date/tests/mktime_variation6.phpt
deleted file mode 100644
index 82f42634a1..0000000000
--- a/ext/date/tests/mktime_variation6.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test mktime() function : usage variation - Passing unexpected values to sixth argument $year.
---FILE--
-<?php
-/* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
- * Description: Get Unix timestamp for a date
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing mktime() : usage variation - unexpected values to sixth argument \$year***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$hour = 10;
-$minute = 30;
-$second = 45;
-$month = 7;
-$day = 2;
-
-foreach($inputs as $variation =>$year) {
- echo "\n-- $variation --\n";
- var_dump( mktime($hour, $minute, $second, $month, $day, $year) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mktime() : usage variation - unexpected values to sixth argument $year***
-
--- int 0 --
-int(%i)
-
--- int 12345 --
-%rint\(-?[1-9][0-9]*\)|bool\(false\)%r
-
--- int -12345 --
-%rint\(-?[1-9][0-9]*\)|bool\(false\)%r
-
--- float 10.5 --
-int(%i)
-
--- float -10.5 --
-%rint\(-?[1-9][0-9]*\)|bool\(false\)%r
-
--- float .5 --
-int(%i)
-
--- empty array --
-
-Warning: mktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: mktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: mktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: mktime() expects parameter 6 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-int(%i)
-
--- lowercase null --
-int(%i)
-
--- lowercase true --
-int(%i)
-
--- lowercase false --
-int(%i)
-
--- uppercase TRUE --
-int(%i)
-
--- uppercase FALSE --
-int(%i)
-
--- empty string DQ --
-
-Warning: mktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: mktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: mktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: mktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: mktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: mktime() expects parameter 6 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: mktime() expects parameter 6 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: mktime() expects parameter 6 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-int(%i)
-
--- unset var --
-int(%i)
-
--- resource --
-
-Warning: mktime() expects parameter 6 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/strftime_variation1.phpt b/ext/date/tests/strftime_variation1.phpt
deleted file mode 100644
index c75661dcb4..0000000000
--- a/ext/date/tests/strftime_variation1.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test strftime() function : usage variation - Passing unexpected values to first argument 'format'.
---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";
-
-date_default_timezone_set("Asia/Calcutta");
-
-// Initialise function arguments not being substituted (if any)
-$timestamp = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for format
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( strftime($value) );
- var_dump( strftime($value, $timestamp) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strftime() : usage variation ***
-
---int 0--
-string(1) "0"
-string(1) "0"
-
---int 1--
-string(1) "1"
-string(1) "1"
-
---int 12345--
-string(5) "12345"
-string(5) "12345"
-
---int -12345--
-string(6) "-12345"
-string(6) "-12345"
-
---float 10.5--
-string(4) "10.5"
-string(4) "10.5"
-
---float -10.5--
-string(5) "-10.5"
-string(5) "-10.5"
-
---float 12.3456789000e10--
-string(12) "123456789000"
-string(12) "123456789000"
-
---float -12.3456789000e10--
-string(13) "-123456789000"
-string(13) "-123456789000"
-
---float .5--
-string(3) "0.5"
-string(3) "0.5"
-
---empty array--
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strftime() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-bool(false)
-bool(false)
-
---lowercase null--
-bool(false)
-bool(false)
-
---lowercase true--
-string(1) "1"
-string(1) "1"
-
---lowercase false--
-bool(false)
-bool(false)
-
---uppercase TRUE--
-string(1) "1"
-string(1) "1"
-
---uppercase FALSE--
-bool(false)
-bool(false)
-
---empty string DQ--
-bool(false)
-bool(false)
-
---empty string SQ--
-bool(false)
-bool(false)
-
---instance of classWithToString--
-string(14) "Class A object"
-string(14) "Class A object"
-
---instance of classWithoutToString--
-
-Warning: strftime() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
-Warning: strftime() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
---undefined var--
-bool(false)
-bool(false)
-
---unset var--
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/date/tests/strftime_variation2.phpt b/ext/date/tests/strftime_variation2.phpt
deleted file mode 100644
index 3b54896370..0000000000
--- a/ext/date/tests/strftime_variation2.phpt
+++ /dev/null
@@ -1,191 +0,0 @@
---TEST--
-Test strftime() function : usage variation - Passing unexpected values to second argument 'timestamp'.
---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";
-
-date_default_timezone_set("Asia/Calcutta");
-// Initialise all required variables
-$format = '%b %d %Y %H:%M:%S';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for timestamp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( strftime($format, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strftime() : usage variation ***
-
---float 10.5--
-string(20) "Jan 01 1970 05:30:10"
-
---float -10.5--
-string(20) "Jan 01 1970 05:29:50"
-
---float .5--
-string(20) "Jan 01 1970 05:30:00"
-
---empty array--
-
-Warning: strftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---int indexed array--
-
-Warning: strftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---associative array--
-
-Warning: strftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---nested arrays--
-
-Warning: strftime() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
---uppercase NULL--
-string(20) "Jan 01 1970 05:30:00"
-
---lowercase null--
-string(20) "Jan 01 1970 05:30:00"
-
---lowercase true--
-string(20) "Jan 01 1970 05:30:01"
-
---lowercase false--
-string(20) "Jan 01 1970 05:30:00"
-
---uppercase TRUE--
-string(20) "Jan 01 1970 05:30:01"
-
---uppercase FALSE--
-string(20) "Jan 01 1970 05:30:00"
-
---empty string DQ--
-
-Warning: strftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---empty string SQ--
-
-Warning: strftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string DQ--
-
-Warning: strftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---string SQ--
-
-Warning: strftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---mixed case string--
-
-Warning: strftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---heredoc--
-
-Warning: strftime() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
---instance of classWithToString--
-
-Warning: strftime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: strftime() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
---undefined var--
-string(20) "Jan 01 1970 05:30:00"
-
---unset var--
-string(20) "Jan 01 1970 05:30:00"
-===DONE===
diff --git a/ext/date/tests/timezone_name_from_abbr_variation1.phpt b/ext/date/tests/timezone_name_from_abbr_variation1.phpt
deleted file mode 100644
index f2702fe2c9..0000000000
--- a/ext/date/tests/timezone_name_from_abbr_variation1.phpt
+++ /dev/null
@@ -1,205 +0,0 @@
---TEST--
-Test timezone_name_from_abbr() function : usage variation - Passing unexpected values to first argument $abbr.
---FILE--
-<?php
-/* Prototype : string timezone_name_from_abbr ( string $abbr [, int $gmtOffset= -1 [, int $isdst= -1 ]] )
- * Description: Returns the timezone name from abbrevation
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing timezone_name_from_abbr() : usage variation - unexpected values to first argument \$abbr***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$gmtOffset= 3600;
-$isdst = 1;
-
-foreach($inputs as $variation =>$abbr) {
- echo "\n-- $variation --\n";
- var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_name_from_abbr() : usage variation - unexpected values to first argument $abbr***
-
--- int 0 --
-string(13) "Europe/London"
-
--- int 12345 --
-string(13) "Europe/London"
-
--- int -12345 --
-string(13) "Europe/London"
-
--- float 10.5 --
-string(13) "Europe/London"
-
--- float -10.5 --
-string(13) "Europe/London"
-
--- float .5 --
-string(13) "Europe/London"
-
--- empty array --
-
-Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(13) "Europe/London"
-
--- lowercase null --
-string(13) "Europe/London"
-
--- lowercase true --
-string(13) "Europe/London"
-
--- lowercase false --
-string(13) "Europe/London"
-
--- uppercase TRUE --
-string(13) "Europe/London"
-
--- uppercase FALSE --
-string(13) "Europe/London"
-
--- empty string DQ --
-string(13) "Europe/London"
-
--- empty string SQ --
-string(13) "Europe/London"
-
--- string DQ --
-string(13) "Europe/London"
-
--- string SQ --
-string(13) "Europe/London"
-
--- mixed case string --
-string(13) "Europe/London"
-
--- heredoc --
-string(13) "Europe/London"
-
--- instance of classWithToString --
-string(13) "Europe/London"
-
--- instance of classWithoutToString --
-
-Warning: timezone_name_from_abbr() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(13) "Europe/London"
-
--- unset var --
-string(13) "Europe/London"
-
--- resource --
-
-Warning: timezone_name_from_abbr() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/timezone_name_from_abbr_variation2.phpt b/ext/date/tests/timezone_name_from_abbr_variation2.phpt
deleted file mode 100644
index 952dc0008a..0000000000
--- a/ext/date/tests/timezone_name_from_abbr_variation2.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test timezone_name_from_abbr() function : usage variation - Passing unexpected values to second argument $gmtOffset.
---FILE--
-<?php
-/* Prototype : string timezone_name_from_abbr ( string $abbr [, int $gmtOffset= -1 [, int $isdst= -1 ]] )
- * Description: Returns the timezone name from abbrevation
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing timezone_name_from_abbr() : usage variation - unexpected values to second argument \$gmtOffset***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$abbr= "GMT";
-$isdst = 1;
-
-foreach($inputs as $variation =>$gmtOffset) {
- echo "\n-- $variation --\n";
- var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_name_from_abbr() : usage variation - unexpected values to second argument $gmtOffset***
-
--- int 0 --
-string(3) "UTC"
-
--- int 12345 --
-string(3) "UTC"
-
--- int -12345 --
-string(3) "UTC"
-
--- float 10.5 --
-string(3) "UTC"
-
--- float -10.5 --
-string(3) "UTC"
-
--- float .5 --
-string(3) "UTC"
-
--- empty array --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(3) "UTC"
-
--- lowercase null --
-string(3) "UTC"
-
--- lowercase true --
-string(3) "UTC"
-
--- lowercase false --
-string(3) "UTC"
-
--- uppercase TRUE --
-string(3) "UTC"
-
--- uppercase FALSE --
-string(3) "UTC"
-
--- empty string DQ --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(3) "UTC"
-
--- unset var --
-string(3) "UTC"
-
--- resource --
-
-Warning: timezone_name_from_abbr() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/timezone_name_from_abbr_variation3.phpt b/ext/date/tests/timezone_name_from_abbr_variation3.phpt
deleted file mode 100644
index 901ff8cbf7..0000000000
--- a/ext/date/tests/timezone_name_from_abbr_variation3.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test timezone_name_from_abbr() function : usage variation - Passing unexpected values to third argument $isdst.
---FILE--
-<?php
-/* Prototype : string timezone_name_from_abbr ( string $abbr [, int $gmtOffset= -1 [, int $isdst= -1 ]] )
- * Description: Returns the timezone name from abbrevation
- * Source code: ext/date/php_date.c
- * Alias to functions:
- */
-
-echo "*** Testing timezone_name_from_abbr() : usage variation - unexpected values to third argument \$isdst***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$abbr= "GMT";
-$gmtOffset = 3600;
-
-foreach($inputs as $variation =>$isdst) {
- echo "\n-- $variation --\n";
- var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_name_from_abbr() : usage variation - unexpected values to third argument $isdst***
-
--- int 0 --
-string(3) "UTC"
-
--- int 12345 --
-string(3) "UTC"
-
--- int -12345 --
-string(3) "UTC"
-
--- float 10.5 --
-string(3) "UTC"
-
--- float -10.5 --
-string(3) "UTC"
-
--- float .5 --
-string(3) "UTC"
-
--- empty array --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-string(3) "UTC"
-
--- lowercase null --
-string(3) "UTC"
-
--- lowercase true --
-string(3) "UTC"
-
--- lowercase false --
-string(3) "UTC"
-
--- uppercase TRUE --
-string(3) "UTC"
-
--- uppercase FALSE --
-string(3) "UTC"
-
--- empty string DQ --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- undefined var --
-string(3) "UTC"
-
--- unset var --
-string(3) "UTC"
-
--- resource --
-
-Warning: timezone_name_from_abbr() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/timezone_offset_get_variation1.phpt b/ext/date/tests/timezone_offset_get_variation1.phpt
deleted file mode 100644
index 8d60af600d..0000000000
--- a/ext/date/tests/timezone_offset_get_variation1.phpt
+++ /dev/null
@@ -1,200 +0,0 @@
---TEST--
-Test timezone_offset_get() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : int timezone_offset_get ( DateTimeZone $object , DateTime $datetime )
- * Description: Returns the timezone offset from GMT
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeZone::getOffset()
- */
-
-echo "*** Testing timezone_offset_get() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$datetime = new DateTime("2009-01-31 15:14:10");
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- try {
- var_dump( timezone_offset_get($object, $datetime) );
- } catch (Error $ex) {
- echo $ex->getMessage()."\n";
- }
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECT--
-*** Testing timezone_offset_get() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given
-
--- int 1 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given
-
--- int 12345 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given
-
--- int -12345 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given
-
--- float 10.5 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given
-
--- float -10.5 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given
-
--- float .5 --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given
-
--- empty array --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given
-
--- int indexed array --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given
-
--- associative array --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given
-
--- nested arrays --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given
-
--- uppercase NULL --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given
-
--- lowercase null --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given
-
--- lowercase true --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given
-
--- lowercase false --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given
-
--- uppercase TRUE --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given
-
--- uppercase FALSE --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given
-
--- empty string DQ --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given
-
--- empty string SQ --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given
-
--- string DQ --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given
-
--- string SQ --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given
-
--- mixed case string --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given
-
--- heredoc --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given
-
--- instance of classWithToString --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of classWithToString given
-
--- instance of classWithoutToString --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of classWithoutToString given
-
--- undefined var --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given
-
--- unset var --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given
-
--- resource --
-Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, resource given
-===DONE===
diff --git a/ext/date/tests/timezone_offset_get_variation2.phpt b/ext/date/tests/timezone_offset_get_variation2.phpt
deleted file mode 100644
index e116e0570c..0000000000
--- a/ext/date/tests/timezone_offset_get_variation2.phpt
+++ /dev/null
@@ -1,200 +0,0 @@
---TEST--
-Test timezone_offset_get() function : usage variation - Passing unexpected values to second argument $datetime.
---FILE--
-<?php
-/* Prototype : int timezone_offset_get ( DateTimeZone $object , DateTime $datetime )
- * Description: Returns the timezone offset from GMT
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeZone::getOffset()
- */
-
-echo "*** Testing timezone_offset_get() : usage variation - unexpected values to second argument \$datetime***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$object = new DateTimezone("Europe/London");
-
-foreach($inputs as $variation =>$datetime) {
- echo "\n-- $variation --\n";
- try {
- var_dump( timezone_offset_get($object, $datetime) );
- } catch (Error $ex) {
- echo $ex->getMessage()."\n";
- }
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECT--
-*** Testing timezone_offset_get() : usage variation - unexpected values to second argument $datetime***
-
--- int 0 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given
-
--- int 1 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given
-
--- int 12345 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given
-
--- int -12345 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given
-
--- float 10.5 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, float given
-
--- float -10.5 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, float given
-
--- float .5 --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, float given
-
--- empty array --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given
-
--- int indexed array --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given
-
--- associative array --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given
-
--- nested arrays --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given
-
--- uppercase NULL --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given
-
--- lowercase null --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given
-
--- lowercase true --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given
-
--- lowercase false --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given
-
--- uppercase TRUE --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given
-
--- uppercase FALSE --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given
-
--- empty string DQ --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given
-
--- empty string SQ --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given
-
--- string DQ --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given
-
--- string SQ --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given
-
--- mixed case string --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given
-
--- heredoc --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given
-
--- instance of classWithToString --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, instance of classWithToString given
-
--- instance of classWithoutToString --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, instance of classWithoutToString given
-
--- undefined var --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given
-
--- unset var --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given
-
--- resource --
-Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, resource given
-===DONE===
diff --git a/ext/date/tests/timezone_open_variation1.phpt b/ext/date/tests/timezone_open_variation1.phpt
deleted file mode 100644
index d9afa4700d..0000000000
--- a/ext/date/tests/timezone_open_variation1.phpt
+++ /dev/null
@@ -1,239 +0,0 @@
---TEST--
-Test timezone_open function : usage variation - Passing unexpected values to first argument $timezone.
---FILE--
-<?php
-/* Prototype : DateTimeZone timezone_open ( string $timezone )
- * Description: Returns new DateTimeZone object
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTime::__construct()
- */
-
-echo "*** Testing timezone_open() : usage variation - unexpected values to first argument \$timezone***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-foreach($inputs as $variation =>$timezone) {
- echo "\n-- $variation --\n";
- var_dump( timezone_open($timezone) );
-
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_open() : usage variation - unexpected values to first argument $timezone***
-
--- int 0 --
-
-Warning: timezone_open(): Unknown or bad timezone (0) in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: timezone_open(): Unknown or bad timezone (1) in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: timezone_open(): Unknown or bad timezone (12345) in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: timezone_open(): Unknown or bad timezone (10.5) in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: timezone_open(): Unknown or bad timezone (0.5) in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: timezone_open(): Unknown or bad timezone (1) in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: timezone_open(): Unknown or bad timezone (1) in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: timezone_open(): Unknown or bad timezone (string) in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: timezone_open(): Unknown or bad timezone (string) in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: timezone_open(): Unknown or bad timezone (sTrInG) in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: timezone_open(): Unknown or bad timezone (hello world) in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: timezone_open(): Unknown or bad timezone (Class A object) in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: timezone_open() expects parameter 1 to be string, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: timezone_open(): Unknown or bad timezone () in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: timezone_open() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/timezone_transitions_get_variation1.phpt b/ext/date/tests/timezone_transitions_get_variation1.phpt
deleted file mode 100644
index 615b02692a..0000000000
--- a/ext/date/tests/timezone_transitions_get_variation1.phpt
+++ /dev/null
@@ -1,250 +0,0 @@
---TEST--
-Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $object.
---FILE--
-<?php
-/* Prototype : array timezone_transitions_get ( DateTimeZone $object, [ int $timestamp_begin [, int $timestamp_end ]] )
- * Description: Returns all transitions for the timezone
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeZone::getTransitions()
- */
-
-echo "*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument \$object***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-foreach($inputs as $variation =>$object) {
- echo "\n-- $variation --\n";
- var_dump( timezone_transitions_get($object) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument $object***
-
--- int 0 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 1 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int 12345 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- int -12345 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d
-bool(false)
-
--- float 10.5 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float -10.5 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- float .5 --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, float given in %s on line %d
-bool(false)
-
--- empty array --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- int indexed array --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- associative array --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- nested arrays --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d
-bool(false)
-
--- uppercase NULL --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- lowercase null --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- lowercase true --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- lowercase false --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase TRUE --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- uppercase FALSE --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d
-bool(false)
-
--- empty string DQ --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- empty string SQ --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string DQ --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- string SQ --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- mixed case string --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- heredoc --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-bool(false)
-
--- instance of classWithToString --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- instance of classWithoutToString --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, object given in %s on line %d
-bool(false)
-
--- undefined var --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- unset var --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
--- resource --
-
-Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/date/tests/timezone_transitions_get_variation2.phpt b/ext/date/tests/timezone_transitions_get_variation2.phpt
deleted file mode 100644
index a3d6db912f..0000000000
--- a/ext/date/tests/timezone_transitions_get_variation2.phpt
+++ /dev/null
@@ -1,279 +0,0 @@
---TEST--
-Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $timestamp_begin.
---FILE--
-<?php
-/* Prototype : array timezone_transitions_get ( DateTimeZone $object, [ int $timestamp_begin [, int $timestamp_end ]] )
- * Description: Returns all transitions for the timezone
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeZone::getTransitions()
- */
-
-echo "*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument \$timestamp_begin ***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$tz = timezone_open("Europe/London");
-$timestamp_end = mktime(0, 0, 0, 1, 1, 1975);
-
-foreach($inputs as $variation =>$timestamp_begin) {
- echo "\n-- $variation --\n";
- $tran = timezone_transitions_get($tz, $timestamp_begin, $timestamp_end);
- var_dump( gettype($tran) );
- var_dump( count($tran) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument $timestamp_begin ***
-
--- int 0 --
-string(5) "array"
-int(8)
-
--- int 1 --
-string(5) "array"
-int(8)
-
--- int 12345 --
-string(5) "array"
-int(8)
-
--- int -12345 --
-string(5) "array"
-int(8)
-
--- float 10.5 --
-string(5) "array"
-int(8)
-
--- float -10.5 --
-string(5) "array"
-int(8)
-
--- float .5 --
-string(5) "array"
-int(8)
-
--- empty array --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- int indexed array --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- associative array --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- nested arrays --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- uppercase NULL --
-string(5) "array"
-int(8)
-
--- lowercase null --
-string(5) "array"
-int(8)
-
--- lowercase true --
-string(5) "array"
-int(8)
-
--- lowercase false --
-string(5) "array"
-int(8)
-
--- uppercase TRUE --
-string(5) "array"
-int(8)
-
--- uppercase FALSE --
-string(5) "array"
-int(8)
-
--- empty string DQ --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- empty string SQ --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- string DQ --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- string SQ --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- mixed case string --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- heredoc --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- instance of classWithToString --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, object given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- instance of classWithoutToString --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, object given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- undefined var --
-string(5) "array"
-int(8)
-
--- unset var --
-string(5) "array"
-int(8)
-
--- resource --
-
-Warning: timezone_transitions_get() expects parameter 2 to be int, resource given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-===DONE===
diff --git a/ext/date/tests/timezone_transitions_get_variation3.phpt b/ext/date/tests/timezone_transitions_get_variation3.phpt
deleted file mode 100644
index 5d793acdfc..0000000000
--- a/ext/date/tests/timezone_transitions_get_variation3.phpt
+++ /dev/null
@@ -1,279 +0,0 @@
---TEST--
-Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $timestamp_env.
---FILE--
-<?php
-/* Prototype : array timezone_transitions_get ( DateTimeZone $object, [ int $timestamp_begin [, int $timestamp_end ]] )
- * Description: Returns all transitions for the timezone
- * Source code: ext/date/php_date.c
- * Alias to functions: DateTimeZone::getTransitions()
- */
-
-echo "*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument \$timestamp_end ***\n";
-
-//Set the default time zone
-date_default_timezone_set("Europe/London");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $file_handle
-);
-
-$tz = timezone_open("Europe/London");
-$timestamp_begin = mktime(0, 0, 0, 1, 1, 1975);
-
-foreach($inputs as $variation =>$timestamp_end) {
- echo "\n-- $variation --\n";
- $tran = timezone_transitions_get($tz, $timestamp_begin, $timestamp_end);
- var_dump( gettype($tran) );
- var_dump( count($tran) );
-};
-
-// closing the resource
-fclose( $file_handle );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument $timestamp_end ***
-
--- int 0 --
-string(5) "array"
-int(1)
-
--- int 1 --
-string(5) "array"
-int(1)
-
--- int 12345 --
-string(5) "array"
-int(1)
-
--- int -12345 --
-string(5) "array"
-int(1)
-
--- float 10.5 --
-string(5) "array"
-int(1)
-
--- float -10.5 --
-string(5) "array"
-int(1)
-
--- float .5 --
-string(5) "array"
-int(1)
-
--- empty array --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- int indexed array --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- associative array --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- nested arrays --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- uppercase NULL --
-string(5) "array"
-int(1)
-
--- lowercase null --
-string(5) "array"
-int(1)
-
--- lowercase true --
-string(5) "array"
-int(1)
-
--- lowercase false --
-string(5) "array"
-int(1)
-
--- uppercase TRUE --
-string(5) "array"
-int(1)
-
--- uppercase FALSE --
-string(5) "array"
-int(1)
-
--- empty string DQ --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- empty string SQ --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- string DQ --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- string SQ --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- mixed case string --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- heredoc --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- instance of classWithToString --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, object given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- instance of classWithoutToString --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, object given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- undefined var --
-string(5) "array"
-int(1)
-
--- unset var --
-string(5) "array"
-int(1)
-
--- resource --
-
-Warning: timezone_transitions_get() expects parameter 3 to be int, resource given in %s on line %d
-string(7) "boolean"
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-===DONE===
diff --git a/ext/exif/tests/exif_imagetype_variation1.phpt b/ext/exif/tests/exif_imagetype_variation1.phpt
deleted file mode 100644
index c190aed15c..0000000000
--- a/ext/exif/tests/exif_imagetype_variation1.phpt
+++ /dev/null
@@ -1,214 +0,0 @@
---TEST--
-Test exif_imagetype() function : usage variations - different types for filename argument
---SKIPIF--
-<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
---FILE--
-<?php
-
-/* Prototype : int exif_imagetype ( string $filename )
- * Description: Determine the type of an image
- * Source code: ext/exif/exif.c
-*/
-
-echo "*** Testing exif_imagetype() : different types for filename argument ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj'ct";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- "",
- '',
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- NULL,
- null
-);
-
-
-// loop through each element of the array and check the working of exif_imagetype()
-// when $filename is supplied with different values
-
-echo "\n--- Testing exif_imagetype() by supplying different values for 'filename' argument ---\n";
-$counter = 1;
-foreach($values as $filename) {
- echo "-- Iteration $counter --\n";
- var_dump( exif_imagetype($filename) );
- $counter ++;
-}
-
-// closing the file
-fclose($file_handle);
-
-echo "Done\n";
-?>
-
-?>
-===Done===
---EXPECTF--
-*** Testing exif_imagetype() : different types for filename argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing exif_imagetype() by supplying different values for 'filename' argument ---
--- Iteration 1 --
-
-Warning: exif_imagetype(0): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: exif_imagetype(12345): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: exif_imagetype(-2345): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: exif_imagetype(10.5): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: exif_imagetype(-10.5): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: exif_imagetype(101234567000): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: exif_imagetype(1.07654321E-9): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: exif_imagetype(0.5): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: exif_imagetype(obj'ct): failed to open stream: No such file or directory in %s on line %d
-bool(false)
--- Iteration 24 --
-
-Warning: exif_imagetype() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
--- Iteration 26 --
-
-Warning: exif_imagetype(): Filename cannot be empty in %s on line %d
-bool(false)
-Done
-
-?>
-===Done===
diff --git a/ext/exif/tests/exif_tagname_variation1-64bit.phpt b/ext/exif/tests/exif_tagname_variation1-64bit.phpt
deleted file mode 100644
index 9a14124362..0000000000
--- a/ext/exif/tests/exif_tagname_variation1-64bit.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test exif_tagname() function : usage variations - different types for index argument
---SKIPIF--
-<?php if (!extension_loaded('exif')) print 'skip exif extension not available';
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-
-/* Prototype : string exif_tagname ( string $index )
- * Description: Get the header name for an index
- * Source code: ext/exif/exif.c
-*/
-
-echo "*** Testing exif_tagname() : different types for index argument ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj'ct";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- "",
- '',
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- NULL,
- null
-);
-
-
-// loop through each element of the array and check the working of exif_tagname()
-// when $index argument is supplied with different values
-
-echo "\n--- Testing exif_tagname() by supplying different values for 'index' argument ---\n";
-$counter = 1;
-foreach($values as $index) {
- echo "-- Iteration $counter --\n";
- var_dump( exif_tagname($index) );
- $counter ++;
-}
-
-// closing the file
-fclose($file_handle);
-
-echo "Done\n";
-?>
-
-?>
-===Done===
---EXPECTF--
-*** Testing exif_tagname() : different types for index argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing exif_tagname() by supplying different values for 'index' argument ---
--- Iteration 1 --
-bool(false)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(false)
--- Iteration 7 --
-bool(false)
--- Iteration 8 --
-bool(false)
--- Iteration 9 --
-bool(false)
--- Iteration 10 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 15 --
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-
-Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
--- Iteration 23 --
-
-Warning: exif_tagname() expects parameter 1 to be int, object given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: exif_tagname() expects parameter 1 to be int, resource given in %s on line %d
-NULL
--- Iteration 25 --
-bool(false)
--- Iteration 26 --
-bool(false)
-Done
-
-?>
-===Done===
diff --git a/ext/exif/tests/exif_tagname_variation1.phpt b/ext/exif/tests/exif_tagname_variation1.phpt
deleted file mode 100644
index 3ebbdd33fe..0000000000
--- a/ext/exif/tests/exif_tagname_variation1.phpt
+++ /dev/null
@@ -1,174 +0,0 @@
---TEST--
-Test exif_tagname() function : usage variations - different types for index argument
---SKIPIF--
-<?php if (!extension_loaded('exif')) print 'skip exif extension not available'; ?>
---FILE--
-<?php
-
-/* Prototype : string exif_tagname ( string $index )
- * Description: Get the header name for an index
- * Source code: ext/exif/exif.c
-*/
-
-echo "*** Testing exif_tagname() : different types for index argument ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj'ct";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- "",
- '',
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- NULL,
- null
-);
-
-
-// loop through each element of the array and check the working of exif_tagname()
-// when $index argument is supplied with different values
-
-echo "\n--- Testing exif_tagname() by supplying different values for 'index' argument ---\n";
-$counter = 1;
-foreach($values as $index) {
- echo "-- Iteration $counter --\n";
- var_dump( exif_tagname($index) );
- $counter ++;
-}
-
-// closing the file
-fclose($file_handle);
-
-echo "Done\n";
-?>
-
-?>
-===Done===
---EXPECTF--
-*** Testing exif_tagname() : different types for index argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing exif_tagname() by supplying different values for 'index' argument ---
--- Iteration 1 --
-bool(false)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(false)
--- Iteration 7 --
-bool(false)
--- Iteration 8 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 13 --
-bool(false)
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-
-Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 19 --
-bool(false)
--- Iteration 20 --
-bool(false)
--- Iteration 21 --
-
-Warning: exif_tagname() expects parameter 1 to be int, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: exif_tagname() expects parameter 1 to be int, resource given in %s on line %d
-NULL
--- Iteration 23 --
-bool(false)
--- Iteration 24 --
-bool(false)
-Done
-
-?>
-===Done===
diff --git a/ext/gd/tests/imagecolorallocate_variation1.phpt b/ext/gd/tests/imagecolorallocate_variation1.phpt
deleted file mode 100644
index 37d9f95a89..0000000000
--- a/ext/gd/tests/imagecolorallocate_variation1.phpt
+++ /dev/null
@@ -1,267 +0,0 @@
---TEST--
-Test imagecolorallocate() function : usage variations - passing different data types to first argument
---SKIPIF--
-<?php
-if(!extension_loaded('gd')) {
- die('skip gd extension is not loaded');
-}
-?>
---FILE--
-<?php
-/* Prototype : int imagecolorallocate(resource im, int red, int green, int blue)
- * Description: Allocate a color for an image
- * Source code: ext/gd/gd.c
- */
-
-echo "*** Testing imagecolorallocate() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$red = 10;
-$green = 10;
-$blue = 10;
-
-$fp = tmpfile();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 10.1234567e10' => 10.1234567e10,
- 'float 10.7654321E-10' => 10.7654321E-10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //resource
- "file resource" => $fp
-);
-
-// loop through each element of the array for im
-foreach($values as $key => $value) {
- echo "\n-- $key --\n";
- var_dump( imagecolorallocate($value, $red, $green, $blue) );
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imagecolorallocate() : usage variations ***
-
--- int 0 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- int 1 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- int 12345 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- int -12345 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- float 10.5 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- float -10.5 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- float 10.1234567e10 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- float 10.7654321E-10 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- float .5 --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- empty array --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- int indexed array --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- associative array --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- nested arrays --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- uppercase NULL --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- lowercase null --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- lowercase true --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- lowercase false --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- uppercase TRUE --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- uppercase FALSE --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- empty string DQ --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- empty string SQ --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- string DQ --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- string SQ --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- mixed case string --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- heredoc --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- instance of classWithToString --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
--- instance of classWithoutToString --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
--- undefined var --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- unset var --
-
-Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- file resource --
-
-Warning: imagecolorallocate(): supplied resource is not a valid Image resource in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/gd/tests/imagecolorallocate_variation2.phpt b/ext/gd/tests/imagecolorallocate_variation2.phpt
deleted file mode 100644
index e46e0da960..0000000000
--- a/ext/gd/tests/imagecolorallocate_variation2.phpt
+++ /dev/null
@@ -1,215 +0,0 @@
---TEST--
-Test imagecolorallocate() function : usage variations - passing different data types to second argument
---SKIPIF--
-<?php
-if(!extension_loaded('gd')) {
- die('skip gd extension is not loaded');
-}
-if(!function_exists('imagecreatetruecolor')) {
- die('skip imagecreatetruecolor function is not available');
-}
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : int imagecolorallocate(resource im, int red, int green, int blue)
- * Description: Allocate a color for an image
- * Source code: ext/gd/gd.c
- */
-
-echo "*** Testing imagecolorallocate() : usage variations ***\n";
-
-$im = imagecreatetruecolor(200, 200);
-$green = 10;
-$blue = 10;
-
-$fp = tmpfile();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 10.1234567e10' => 10.1234567e10,
- 'float 10.7654321E-10' => 10.7654321E-10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //resource
- "file resource" => $fp
-);
-// loop through each element of the array for red
-foreach($values as $key => $value) {
- echo "\n--$key--\n";
- var_dump( imagecolorallocate($im, $value, $green, $blue) );
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imagecolorallocate() : usage variations ***
-
---float 10.5--
-int(657930)
-
---float -10.5--
-bool(false)
-
---float 10.1234567e10--
-bool(false)
-
---float 10.7654321E-10--
-int(2570)
-
---float .5--
-int(2570)
-
---empty array--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
---int indexed array--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
---associative array--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
---nested arrays--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
---uppercase NULL--
-int(2570)
-
---lowercase null--
-int(2570)
-
---lowercase true--
-int(68106)
-
---lowercase false--
-int(2570)
-
---uppercase TRUE--
-int(68106)
-
---uppercase FALSE--
-int(2570)
-
---empty string DQ--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
---undefined var--
-int(2570)
-
---unset var--
-int(2570)
-
---file resource--
-
-Warning: imagecolorallocate() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/gd/tests/imagecolorallocate_variation3.phpt b/ext/gd/tests/imagecolorallocate_variation3.phpt
deleted file mode 100644
index 8552f976c7..0000000000
--- a/ext/gd/tests/imagecolorallocate_variation3.phpt
+++ /dev/null
@@ -1,214 +0,0 @@
---TEST--
-Test imagecolorallocate() function : usage variations - passing different data types to third argument
---SKIPIF--
-<?php
-if(!extension_loaded('gd')) {
- die('skip gd extension is not loaded');
-}
-if(!function_exists('imagecreatetruecolor')) {
- die('skip imagecreatetruecolor function is not available');
-}
-?>
---FILE--
-<?php
-/* Prototype : imagecolorallocate(resource im, int red, int green, int blue)
- * Description: Allocate a color for an image
- * Source code: ext/gd/gd.c
- */
-
-echo "*** Testing imagecolorallocate() : usage variations ***\n";
-
-$im = imagecreatetruecolor(200, 200);
-$red = 10;
-$blue = 10;
-
-$fp = tmpfile();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 10.1234567e5' => 10.1234567e5,
- 'float 10.7654321E-5' => 10.7654321E-5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //resource
- "file resource" => $fp
-);
-// loop through each element of the array for red
-foreach($values as $key => $value) {
- echo "\n--$key--\n";
- var_dump( imagecolorallocate($im, $red, $value, $blue) );
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imagecolorallocate() : usage variations ***
-
---float 10.5--
-int(657930)
-
---float -10.5--
-int(652810)
-
---float 10.1234567e5--
-int(259815690)
-
---float 10.7654321E-5--
-int(655370)
-
---float .5--
-int(655370)
-
---empty array--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
---int indexed array--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
---associative array--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
---nested arrays--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
---uppercase NULL--
-int(655370)
-
---lowercase null--
-int(655370)
-
---lowercase true--
-int(655626)
-
---lowercase false--
-int(655370)
-
---uppercase TRUE--
-int(655626)
-
---uppercase FALSE--
-int(655370)
-
---empty string DQ--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
---undefined var--
-int(655370)
-
---unset var--
-int(655370)
-
---file resource--
-
-Warning: imagecolorallocate() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/gd/tests/imagecolorallocate_variation4.phpt b/ext/gd/tests/imagecolorallocate_variation4.phpt
deleted file mode 100644
index ad8908eeea..0000000000
--- a/ext/gd/tests/imagecolorallocate_variation4.phpt
+++ /dev/null
@@ -1,214 +0,0 @@
---TEST--
-Test imagecolorallocate() function : usage variations - passing different data types to fourth argument
---SKIPIF--
-<?php
-if(!extension_loaded('gd')) {
- die('skip gd extension is not loaded');
-}
-if(!function_exists('imagecreatetruecolor')) {
- die('skip imagecreatetruecolor function is not available');
-}
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : int imagecolorallocate(resource im, int red, int green, int blue)
- * Description: Allocate a color for an image
- * Source code: ext/gd/gd.c
- */
-echo "*** Testing imagecolorallocate() : usage variations ***\n";
-
-$im = imagecreatetruecolor(200, 200);
-$red = 10;
-$green = 10;
-
-$fp = tmpfile();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 10.1234567e10' => 10.1234567e10,
- 'float 10.7654321E-10' => 10.7654321E-10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //resource
- "file resource" => $fp
-);
-// loop through each element of the array for red
-foreach($values as $key => $value) {
- echo "\n--$key--\n";
- var_dump( imagecolorallocate($im, $red, $green, $value) );
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imagecolorallocate() : usage variations ***
-
---float 10.5--
-int(657930)
-
---float -10.5--
-int(657910)
-
---float 10.1234567e10--
-bool(false)
-
---float 10.7654321E-10--
-int(657920)
-
---float .5--
-int(657920)
-
---empty array--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
---int indexed array--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
---associative array--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
---nested arrays--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
---uppercase NULL--
-int(657920)
-
---lowercase null--
-int(657920)
-
---lowercase true--
-int(657921)
-
---lowercase false--
-int(657920)
-
---uppercase TRUE--
-int(657921)
-
---uppercase FALSE--
-int(657920)
-
---empty string DQ--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, object given in %s on line %d
-NULL
-
---undefined var--
-int(657920)
-
---unset var--
-int(657920)
-
---file resource--
-
-Warning: imagecolorallocate() expects parameter 4 to be int, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/iconv/tests/iconv_get_encoding_error.phpt b/ext/iconv/tests/iconv_get_encoding_error.phpt
deleted file mode 100644
index c146051440..0000000000
--- a/ext/iconv/tests/iconv_get_encoding_error.phpt
+++ /dev/null
@@ -1,177 +0,0 @@
---TEST--
-Test iconv_get_encoding() function : basic functionality
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_get_encoding') or die("skip iconv_get_encoding() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : mixed iconv_get_encoding([string type])
- * Description: Get internal encoding and output encoding for ob_iconv_handler()
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test Error functionality of iconv_get_encoding
- */
-
-echo "*** Testing iconv_get_encoding() : error functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-Nothing
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_get_encoding($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_get_encoding() : error functionality ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_get_encoding() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt
deleted file mode 100644
index ae10b0dc9e..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test iconv_mime_encode() function : usage variations - Pass different data types to headers arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_mime_decode_headers') or die("skip iconv_mime_decode_headers() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : array iconv_mime_decode_headers(string headers [, int mode, string charset])
- * Description: Decodes multiple mime header fields
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode_headers() behaves
- */
-
-echo "*** Testing iconv_mime_decode_headers() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$headers = <<<EOF
-Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=
-To: example@example.com
-Date: Thu, 1 Jan 1970 00:00:00 +0000
-Message-Id: <example@example.com>
-Received: from localhost (localhost [127.0.0.1]) by localhost
- with SMTP id example for <example@example.com>;
- Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
- (envelope-from example-return-0000-example=example.com@example.com)
-Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
-
-EOF;
-
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'ISO-8859-1';
-
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode_headers()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode_headers($input, $mode, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode_headers() : usage variations ***
-
--- Iteration 1 --
-array(0) {
-}
-
--- Iteration 2 --
-array(0) {
-}
-
--- Iteration 3 --
-array(0) {
-}
-
--- Iteration 4 --
-array(0) {
-}
-
--- Iteration 5 --
-array(0) {
-}
-
--- Iteration 6 --
-array(0) {
-}
-
--- Iteration 7 --
-array(0) {
-}
-
--- Iteration 8 --
-array(0) {
-}
-
--- Iteration 9 --
-array(0) {
-}
-
--- Iteration 10 --
-array(0) {
-}
-
--- Iteration 11 --
-array(0) {
-}
-
--- Iteration 12 --
-array(0) {
-}
-
--- Iteration 13 --
-array(0) {
-}
-
--- Iteration 14 --
-array(0) {
-}
-
--- Iteration 15 --
-array(0) {
-}
-
--- Iteration 16 --
-array(0) {
-}
-
--- Iteration 17 --
-array(0) {
-}
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-array(0) {
-}
-
--- Iteration 20 --
-array(0) {
-}
-
--- Iteration 21 --
-array(0) {
-}
-
--- Iteration 22 --
-array(0) {
-}
-
--- Iteration 23 --
-array(0) {
-}
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode_headers() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt
deleted file mode 100644
index f325f2816f..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt
+++ /dev/null
@@ -1,466 +0,0 @@
---TEST--
-Test iconv_mime_encode() function : usage variations - Pass different data types to mode arg
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die('skip 32-bit only');
-extension_loaded('iconv') or die('skip iconv extension not loaded');
-function_exists('iconv_mime_decode_headers') or die("skip iconv_mime_decode_headers() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : array iconv_mime_decode_headers(string headers [, int mode, string charset])
- * Description: Decodes multiple mime header fields
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode_headers() behaves
- */
-
-echo "*** Testing iconv_mime_decode_headers() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$headers = <<<EOF
-Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?=
-To: example@example.com
-Date: Thu, 1 Jan 1970 00:00:00 +0000
-Message-Id: <example@example.com>
-Received: from localhost (localhost [127.0.0.1]) by localhost
- with SMTP id example for <example@example.com>;
- Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
- (envelope-from example-return-0000-example=example.com@example.com)
-Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
-
-EOF;
-
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode_headers()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode_headers($headers, $input, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode_headers() : usage variations ***
-
--- Iteration 1 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 2 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 3 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 4 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 5 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 6 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 7 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Iteration 8 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 9 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 10 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 11 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 12 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 13 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 14 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 15 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 16 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 23 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt
deleted file mode 100644
index 1a0f7fc0c3..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt
+++ /dev/null
@@ -1,469 +0,0 @@
---TEST--
-Test iconv_mime_encode() function : usage variations - Pass different data types to charset arg
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die('skip 32-bit only');
-extension_loaded('iconv') or die('skip iconv extension not loaded');
-function_exists('iconv_mime_decode_headers') or die("skip iconv_mime_decode_headers() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : array iconv_mime_decode_headers(string headers [, int mode, string charset])
- * Description: Decodes multiple mime header fields
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode_headers() behaves
- */
-
-echo "*** Testing iconv_mime_decode_headers() : usage variations ***\n";
-
-// Some of the parameters actually passed to charset will request to use
-// a default charset determined by the platform. In order for this test to
-// run on both linux and windows, the subject will have to be ascii only.
-// Initialise function arguments not being substituted
-$headers = <<<EOF
-Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?=
-To: example@example.com
-Date: Thu, 1 Jan 1970 00:00:00 +0000
-Message-Id: <example@example.com>
-Received: from localhost (localhost [127.0.0.1]) by localhost
- with SMTP id example for <example@example.com>;
- Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
- (envelope-from example-return-0000-example=example.com@example.com)
-Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
-
-EOF;
-
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode_headers()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode_headers($headers, $input, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode_headers() : usage variations ***
-
--- Iteration 1 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 2 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 3 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 4 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 5 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 6 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 7 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Iteration 8 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 9 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 10 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 11 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 12 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 13 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 14 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 15 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 16 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 23 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_variation1.phpt b/ext/iconv/tests/iconv_mime_decode_variation1.phpt
deleted file mode 100644
index e169b4ead5..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_variation1.phpt
+++ /dev/null
@@ -1,183 +0,0 @@
---TEST--
-Test iconv_mime_decode() function : usage variations - Pass different data types to header arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string iconv_mime_decode(string encoded_string [, int mode, string charset])
- * Description: Decodes a mime header field
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode() behaves
- */
-
-echo "*** Testing iconv_mime_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$header = 'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=';
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'ISO-8859-1';
-
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode($input, $mode, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(12) "123456789000"
-
--- Iteration 8 --
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(6) "string"
-
--- Iteration 19 --
-string(6) "string"
-
--- Iteration 20 --
-string(11) "hello world"
-
--- Iteration 21 --
-string(14) "Class A object"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_variation2.phpt
deleted file mode 100644
index 3e67d8aa28..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_variation2.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test iconv_mime_decode() function : usage variations - Pass different data types to mode arg
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die('skip 32-bit only');
-extension_loaded('iconv') or die('skip iconv extension not loaded');
-function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string iconv_mime_decode(string encoded_string [, int mode, string charset])
- * Description: Decodes a mime header field
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode() behaves
- */
-
-echo "*** Testing iconv_mime_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$header = 'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=';
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( bin2hex(iconv_mime_decode($header, $input, $charset)));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode() : usage variations ***
-
--- Iteration 1 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 2 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 3 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 4 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 5 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 6 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 7 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, float given in %s on line %d
-string(0) ""
-
--- Iteration 8 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 9 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 10 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 11 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 12 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 13 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 14 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 15 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 16 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 17 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 18 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 19 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 20 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 21 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, object given in %s on line %d
-string(0) ""
-
--- Iteration 22 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 23 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, resource given in %s on line %d
-string(0) ""
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_variation3.phpt
deleted file mode 100644
index 9d62320b03..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_variation3.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test iconv_mime_decode() function : usage variations - Pass different data types to charset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string iconv_mime_decode(string encoded_string [, int mode, string charset])
- * Description: Decodes a mime header field
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode() behaves
- */
-
-echo "*** Testing iconv_mime_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-// Some of the parameters actually passed to charset will request to use
-// a default charset determined by the platform. In order for this test to
-// run on both linux and windows, the subject will have to be ascii only.
-$header = 'Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?=';
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = iconv_mime_decode($header, $mode, $input);
- if ($res !== false) {
- var_dump(bin2hex($res));
- }
- else {
- var_dump($res);
- }
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `0' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `12345' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `-2345' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `10.5' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `-10.5' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `123456789000' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1.23456789E-9' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `0.5' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 11 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 12 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 14 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 16 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 17 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 18 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `string' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `string' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `hello world' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `Class A object' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 22 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 23 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode() expects parameter 3 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_set_encoding_error.phpt b/ext/iconv/tests/iconv_set_encoding_error.phpt
deleted file mode 100644
index 1a3179afea..0000000000
--- a/ext/iconv/tests/iconv_set_encoding_error.phpt
+++ /dev/null
@@ -1,177 +0,0 @@
---TEST--
-Test iconv_set_encoding() function : basic functionality
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_set_encoding') or die("skip iconv_set_encoding() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : bool iconv_set_encoding(string type, string charset)
- * Description: Sets internal encoding and output encoding for ob_iconv_handler()
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test Error functionality of iconv_get_encoding
- */
-
-echo "*** Testing iconv_set_encoding() : error functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-Nothing
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_set_encoding($input, "UTF-8") );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_set_encoding() : error functionality ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_set_encoding() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/iconv/tests/iconv_set_encoding_variation.phpt b/ext/iconv/tests/iconv_set_encoding_variation.phpt
deleted file mode 100644
index 62020063d8..0000000000
--- a/ext/iconv/tests/iconv_set_encoding_variation.phpt
+++ /dev/null
@@ -1,309 +0,0 @@
---TEST--
-Test iconv_set_encoding() function : error functionality
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_set_encoding') or die("skip iconv_set_encoding() is not available in this build");
-?>
---INI--
-error_reporting=E_ALL & ~E_DEPRECATED
---FILE--
-<?php
-/* Prototype : bool iconv_set_encoding(string type, string charset)
- * Description: Sets internal encoding and output encoding for ob_iconv_handler()
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test Error functionality of iconv_get_encoding
- */
-
-echo "*** Testing iconv_set_encoding() : error functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-Nothing
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_set_encoding("internal_encoding", $input) );
- var_dump( iconv_set_encoding("input_encoding", $input) );
- var_dump( iconv_set_encoding("output_encoding", $input) );
- var_dump( iconv_get_encoding("internal_encoding") );
- var_dump( iconv_get_encoding("input_encoding") );
- var_dump( iconv_get_encoding("output_encoding") );
-
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_set_encoding() : error functionality ***
-
--- Iteration 1 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "0"
-string(1) "0"
-string(1) "0"
-
--- Iteration 2 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 3 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "12345"
-string(5) "12345"
-string(5) "12345"
-
--- Iteration 4 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "-2345"
-string(5) "-2345"
-string(5) "-2345"
-
--- Iteration 5 --
-bool(true)
-bool(true)
-bool(true)
-string(4) "10.5"
-string(4) "10.5"
-string(4) "10.5"
-
--- Iteration 6 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "-10.5"
-string(5) "-10.5"
-string(5) "-10.5"
-
--- Iteration 7 --
-bool(true)
-bool(true)
-bool(true)
-string(12) "123456789000"
-string(12) "123456789000"
-string(12) "123456789000"
-
--- Iteration 8 --
-bool(true)
-bool(true)
-bool(true)
-string(13) "1.23456789E-9"
-string(13) "1.23456789E-9"
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-bool(true)
-bool(true)
-bool(true)
-string(3) "0.5"
-string(3) "0.5"
-string(3) "0.5"
-
--- Iteration 10 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 11 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 12 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 13 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 14 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 15 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 16 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 17 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 18 --
-bool(true)
-bool(true)
-bool(true)
-string(7) "Nothing"
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 19 --
-bool(true)
-bool(true)
-bool(true)
-string(7) "Nothing"
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 20 --
-bool(true)
-bool(true)
-bool(true)
-string(7) "Nothing"
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 21 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 22 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 23 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 24 --
-
-Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-Done
diff --git a/ext/iconv/tests/iconv_strlen_variation1.phpt b/ext/iconv/tests/iconv_strlen_variation1.phpt
deleted file mode 100644
index d6edf5b86d..0000000000
--- a/ext/iconv/tests/iconv_strlen_variation1.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test iconv_strlen() function : usage variations - Pass different data types as $str arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strlen') or die("skip iconv_strlen() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strlen(string str [, string charset])
- * Description: Get character numbers of a string
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test iconv_strlen by passing different data types as $str argument
- */
-
-echo "*** Testing iconv_strlen() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$encoding = 'utf-8';
-
-//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 $str argument
-$inputs = array(
-
- // int data
-/*1*/
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
-/*5*/
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float 12.3456789000e-10' => 12.3456789000e-10,
- 'float .5' => .5,
-
- // null data
-/*10*/
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
-/*12*/
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
-/*16*/
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
-/*18*/
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
-/*21*/
- 'instance of class' => new classA(),
-
- // undefined data
-/*22*/
- 'undefined var' => @$undefined_var,
-
- // unset data
-/*23*/
- 'unset var' => @$unset_var,
-
- // resource variable
-/*24*/
- 'resource' => $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strlen()
-$iterator = 1;
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( iconv_strlen($value, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing iconv_strlen() : usage variations ***
-
---int 0--
-int(1)
-
---int 1--
-int(1)
-
---int 12345--
-int(5)
-
---int -12345--
-int(6)
-
---float 10.5--
-int(4)
-
---float -10.5--
-int(5)
-
---float 12.3456789000e10--
-int(12)
-
---float 12.3456789000e-10--
-int(13)
-
---float .5--
-int(3)
-
---uppercase NULL--
-int(0)
-
---lowercase null--
-int(0)
-
---lowercase true--
-int(1)
-
---lowercase false--
-int(0)
-
---uppercase TRUE--
-int(1)
-
---uppercase FALSE--
-int(0)
-
---empty string DQ--
-int(0)
-
---empty string SQ--
-int(0)
-
---string DQ--
-int(6)
-
---string SQ--
-int(6)
-
---mixed case string--
-int(6)
-
---heredoc--
-int(11)
-
---instance of class--
-int(14)
-
---undefined var--
-int(0)
-
---unset var--
-int(0)
-
---resource--
-
-Warning: iconv_strlen() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/iconv/tests/iconv_strlen_variation2.phpt b/ext/iconv/tests/iconv_strlen_variation2.phpt
deleted file mode 100644
index c8a736cfc0..0000000000
--- a/ext/iconv/tests/iconv_strlen_variation2.phpt
+++ /dev/null
@@ -1,203 +0,0 @@
---TEST--
-Test iconv_strlen() function : usage variations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strlen') or die("skip iconv_strlen() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strlen(string str [, string charset])
- * Description: Get character numbers of a string
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test iconv_strlen() by passing different data types as $encoding argument.
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing iconv_strlen() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$str = 'string value';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strlen()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strlen($str, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strlen() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(12)
-
--- Iteration 11 --
-int(12)
-
--- Iteration 12 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-int(12)
-
--- Iteration 14 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-int(12)
-
--- Iteration 16 --
-int(12)
-
--- Iteration 17 --
-int(12)
-
--- Iteration 18 --
-int(12)
-
--- Iteration 19 --
-int(12)
-
--- Iteration 20 --
-int(12)
-
--- Iteration 21 --
-int(12)
-
--- Iteration 22 --
-int(12)
-
--- Iteration 23 --
-int(12)
-
--- Iteration 24 --
-
-Warning: iconv_strlen() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation1.phpt b/ext/iconv/tests/iconv_strpos_variation1.phpt
deleted file mode 100644
index 0d395adcaa..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $haystack arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strpos($input, $needle, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation2.phpt b/ext/iconv/tests/iconv_strpos_variation2.phpt
deleted file mode 100644
index de7f52d22a..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation2.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $needle arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $needle arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strpos($haystack, $input, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strpos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation3.phpt b/ext/iconv/tests/iconv_strpos_variation3.phpt
deleted file mode 100644
index 0a3b343bfc..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation3.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'a';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//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 $offest argument
-$inputs = array(
-
- // int data
- 0,
- 1,
- 12345,
- -5,
- -2345,
-
- // float data
- 10.5,
- -9.5,
- -100.3,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
- $heredoc,
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-
-foreach($inputs as $input) {
- echo "--\n";
- var_dump($input);
- var_dump( iconv_strpos($haystack, $needle, $input, $encoding));
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
---
-int(0)
-int(8)
---
-int(1)
-int(8)
---
-int(12345)
-bool(false)
---
-int(-5)
-int(8)
---
-int(-2345)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(10.5)
-bool(false)
---
-float(-9.5)
-int(8)
---
-float(-100.3)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(123456789000)
-
-Warning: iconv_strpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
---
-float(1.23456789E-9)
-int(8)
---
-float(0.5)
-int(8)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(11) "hello world"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-object(classA)#%d (%d) {
-}
-
-Warning: iconv_strpos() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-resource(%d) of type (stream)
-
-Warning: iconv_strpos() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
deleted file mode 100644
index 9389282f0a..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'a';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//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 $offest argument
-$inputs = array(
-
- // int data
- 0,
- 1,
- 12345,
- -5,
- -2345,
-
- // float data
- 10.5,
- -9.5,
- -100.3,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
- $heredoc,
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-
-foreach($inputs as $input) {
- echo "--\n";
- var_dump($input);
- var_dump( iconv_strpos($haystack, $needle, $input, $encoding));
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
---
-int(0)
-int(8)
---
-int(1)
-int(8)
---
-int(12345)
-bool(false)
---
-int(-5)
-int(8)
---
-int(-2345)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(10.5)
-bool(false)
---
-float(-9.5)
-int(8)
---
-float(-100.3)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(123456789000)
-bool(false)
---
-float(1.23456789E-9)
-int(8)
---
-float(0.5)
-int(8)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(11) "hello world"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-object(classA)#%d (%d) {
-}
-
-Warning: iconv_strpos() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-resource(%d) of type (stream)
-
-Warning: iconv_strpos() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation4.phpt b/ext/iconv/tests/iconv_strpos_variation4.phpt
deleted file mode 100644
index 55c3f62889..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation4.phpt
+++ /dev/null
@@ -1,206 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $charset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-
-/*
- * Pass iconv_strpos different data types as $encoding arg to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$needle = 'val';
-$offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strpos($haystack, $needle, $offset, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(7)
-
--- Iteration 11 --
-int(7)
-
--- Iteration 12 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-int(7)
-
--- Iteration 14 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-int(7)
-
--- Iteration 16 --
-int(7)
-
--- Iteration 17 --
-int(7)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-int(7)
-
--- Iteration 23 --
-int(7)
-
--- Iteration 24 --
-
-Warning: iconv_strpos() expects parameter 4 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strrpos_variation1.phpt b/ext/iconv/tests/iconv_strrpos_variation1.phpt
deleted file mode 100644
index 51d99ddca6..0000000000
--- a/ext/iconv/tests/iconv_strrpos_variation1.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test iconv_strrpos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strrpos() different data types as $haystack argument to test behaviour
- */
-
-echo "*** Testing iconv_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'world';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "hello, world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello, world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "hello, world",
- 'hello, world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strrpos($input, $needle, $encoding));
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strrpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strrpos_variation2.phpt b/ext/iconv/tests/iconv_strrpos_variation2.phpt
deleted file mode 100644
index 59e26a4a18..0000000000
--- a/ext/iconv/tests/iconv_strrpos_variation2.phpt
+++ /dev/null
@@ -1,181 +0,0 @@
---TEST--
-Test iconv_strrpos() function : usage variations - Pass different data types to $needle arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strrpos() different data types as $needle argument to test behaviour
- */
-
-echo "*** Testing iconv_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'hello, world';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "world",
- 'world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strrpos($haystack, $input, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strrpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strrpos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strrpos_variation3.phpt b/ext/iconv/tests/iconv_strrpos_variation3.phpt
deleted file mode 100644
index 86af94ae59..0000000000
--- a/ext/iconv/tests/iconv_strrpos_variation3.phpt
+++ /dev/null
@@ -1,204 +0,0 @@
---TEST--
-Test iconv_strrpos() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strrpos() different data types as $encoding argument to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing iconv_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'hello, world';
-$needle = 'world';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strrpos($haystack, $needle, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strrpos() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(7)
-
--- Iteration 11 --
-int(7)
-
--- Iteration 12 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-int(7)
-
--- Iteration 14 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-int(7)
-
--- Iteration 16 --
-int(7)
-
--- Iteration 17 --
-int(7)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-int(7)
-
--- Iteration 23 --
-int(7)
-
--- Iteration 24 --
-
-Warning: iconv_strrpos() expects parameter 3 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/imap/tests/imap_close_variation1.phpt b/ext/imap/tests/imap_close_variation1.phpt
deleted file mode 100644
index eb649b0d5a..0000000000
--- a/ext/imap/tests/imap_close_variation1.phpt
+++ /dev/null
@@ -1,214 +0,0 @@
---TEST--
-Test imap_close() function : usage variations - different data types as $stream_id arg
---SKIPIF--
-<?php
-extension_loaded('imap') or die('skip imap extension not available in this build');
-?>
---FILE--
-<?php
-/* Prototype : bool imap_close(resource $stream_id [, int $options])
- * Description: Close an IMAP stream
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $stream_id argument to test behaviour of imap_close()
- */
-
-echo "*** Testing imap_close() : usage variations ***\n";
-
-//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;
-
-// unexpected values to be passed to $stream_id 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,
-);
-
-// loop through each element of $inputs to check the behavior of imap_close()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( imap_close($input) );
- $iterator++;
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imap_close() : usage variations ***
-
--- Iteration 1 --
-
-Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 2 --
-
-Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 3 --
-
-Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 4 --
-
-Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 5 --
-
-Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 6 --
-
-Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 7 --
-
-Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 8 --
-
-Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 9 --
-
-Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 10 --
-
-Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 11 --
-
-Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 12 --
-
-Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 13 --
-
-Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 14 --
-
-Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 15 --
-
-Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 16 --
-
-Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 17 --
-
-Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 18 --
-
-Warning: imap_close() expects parameter 1 to be resource, array given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 19 --
-
-Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 20 --
-
-Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 21 --
-
-Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 22 --
-
-Warning: imap_close() expects parameter 1 to be resource, object given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 23 --
-
-Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80
-NULL
-
--- Iteration 24 --
-
-Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80
-NULL
-===DONE===
diff --git a/ext/imap/tests/imap_close_variation2.phpt b/ext/imap/tests/imap_close_variation2.phpt
deleted file mode 100644
index 652c4260a0..0000000000
--- a/ext/imap/tests/imap_close_variation2.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test imap_close() function : usage variations - different data types as $options arg
---SKIPIF--
-<?php
-require_once(dirname(__FILE__).'/skipif.inc');
-?>
---FILE--
-<?php
-/* Prototype : bool imap_close(resource $stream_id [, int $options])
- * Description: Close an IMAP stream
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $options argument to test behaviour of imap_close()
- */
-
-echo "*** Testing imap_close() : usage variations ***\n";
-
-// include file for imap_stream
-require_once(dirname(__FILE__).'/imap_include.inc');
-
-// create mailbox to test whether options has been set to CL_EXPUNGE
-$stream_id = setup_test_mailbox('', 3, $mailbox);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-32768
-EOT;
-
-// unexpected values to be passed to $options argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 32768,
- -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*/ "32768",
- '32768',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behavior of imap_close()
-$iterator = 1;
-foreach($inputs as $input) {
-
- // mark added messages for deletion
- for ($i = 1; $i < 4; $i++) {
- imap_delete($stream_id, $i);
- }
- echo "\n-- Iteration $iterator --\n";
- var_dump( $check = imap_close($stream_id, $input) );
-
- // check that imap_close was successful, if not call imap_close and explicitly set CL_EXPUNGE
- if(false === $check) {
- imap_close($stream_id, CL_EXPUNGE);
- } else {
- // if imap_close was successful test whether CL_EXPUNGE was set by doing a message count
- $imap_stream = imap_open($mailbox, $username, $password);
- $num_msg = imap_num_msg($imap_stream);
- if ($num_msg != 0) {
- echo "CL_EXPUNGE was not set, $num_msg msgs in mailbox\n";
- } else {
- echo "CL_EXPUNGE was set\n";
- }
- // call imap_close with CL_EXPUNGE explicitly set in case mailbox not empty
- imap_close($imap_stream, CL_EXPUNGE);
- }
- $iterator++;
-
- // get $stream_id for next iteration
- $stream_id = imap_open($mailbox, $username, $password);
- populate_mailbox($stream_id, $mailbox, 3);
-
-};
-
-?>
-===DONE===
---CLEAN--
-<?php
-require_once(dirname(__FILE__).'/clean.inc');
-?>
---EXPECTF--
-*** Testing imap_close() : usage variations ***
-Create a temporary mailbox and add 3 msgs
-.. mailbox '{%s}%s' created
-
--- Iteration 1 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 2 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 3 --
-bool(true)
-CL_EXPUNGE was set
-
--- Iteration 4 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 8 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 9 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 10 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 11 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 12 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 13 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 14 --
-
-Warning: imap_close(): invalid value for the flags parameter in %s on line %d
-bool(false)
-
--- Iteration 15 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 16 --
-
-Warning: imap_close() expects parameter 2 to be int, string given in %s on line %d
-NULL
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 17 --
-
-Warning: imap_close() expects parameter 2 to be int, string given in %s on line %d
-NULL
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 18 --
-
-Warning: imap_close() expects parameter 2 to be int, array given in %s on line %d
-NULL
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 19 --
-bool(true)
-CL_EXPUNGE was set
-
--- Iteration 20 --
-bool(true)
-CL_EXPUNGE was set
-
--- Iteration 21 --
-bool(true)
-CL_EXPUNGE was set
-
--- Iteration 22 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-
--- Iteration 23 --
-bool(true)
-CL_EXPUNGE was not set, 3 msgs in mailbox
-===DONE===
diff --git a/ext/imap/tests/imap_fetch_overview_variation1.phpt b/ext/imap/tests/imap_fetch_overview_variation1.phpt
deleted file mode 100644
index a0508e6d0d..0000000000
--- a/ext/imap/tests/imap_fetch_overview_variation1.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test imap_fetch_overview() function : usage variations - diff data types as $stream_id arg
---SKIPIF--
-<?php
-extension_loaded('imap') or die('skip imap extension not available in this build');
-?>
---FILE--
-<?php
-/* Prototype : array imap_fetch_overview(resource $stream_id, int $msg_no [, int $options])
- * Description: Read an overview of the information in the headers
- * of the given message sequence
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $stream_id argument to imap_fetch_overview() to test behaviour
- */
-
-echo "*** Testing imap_fetch_overview() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$msg_no = 1;
-
-//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;
-
-// unexpected values to be passed to $stream_id 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,
-);
-
-// loop through each element of $inputs to check the behavior of imap_fetch_overview()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Testing with first argument value: ";
- var_dump($input);
- var_dump( imap_fetch_overview($input, $msg_no) );
- $iterator++;
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imap_fetch_overview() : usage variations ***
-
--- Testing with first argument value: int(0)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Testing with first argument value: int(1)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Testing with first argument value: int(12345)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Testing with first argument value: int(-2345)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Testing with first argument value: float(10.5)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Testing with first argument value: float(-10.5)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Testing with first argument value: float(123456789000)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Testing with first argument value: float(1.23456789E-9)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Testing with first argument value: float(0.5)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Testing with first argument value: NULL
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- Testing with first argument value: NULL
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- Testing with first argument value: bool(true)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Testing with first argument value: bool(false)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Testing with first argument value: bool(true)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Testing with first argument value: bool(false)
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Testing with first argument value: string(0) ""
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Testing with first argument value: string(0) ""
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Testing with first argument value: array(0) {
-}
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- Testing with first argument value: string(6) "string"
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Testing with first argument value: string(6) "string"
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Testing with first argument value: string(11) "hello world"
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Testing with first argument value: object(classA)#1 (0) {
-}
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
--- Testing with first argument value: NULL
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- Testing with first argument value: NULL
-
-Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/imap/tests/imap_fetch_overview_variation2.phpt b/ext/imap/tests/imap_fetch_overview_variation2.phpt
deleted file mode 100644
index 4baa93ae06..0000000000
--- a/ext/imap/tests/imap_fetch_overview_variation2.phpt
+++ /dev/null
@@ -1,230 +0,0 @@
---TEST--
-Test imap_fetch_overview() function : usage variations - diff data types as $msg_no arg
---SKIPIF--
-<?php
-require_once(dirname(__FILE__).'/skipif.inc');
-?>
---FILE--
-<?php
-/* Prototype : array imap_fetch_overview(resource $stream_id, int $msg_no [, int $options])
- * Description: Read an overview of the information in the headers
- * of the given message sequence
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $msg_no argument to imap_fetch_overview() to test behaviour
- */
-
-echo "*** Testing imap_fetch_overview() : usage variations ***\n";
-require_once(dirname(__FILE__).'/imap_include.inc');
-
-// Initialise function arguments not being substituted
-$stream_id = setup_test_mailbox('', 1, $mailbox, 'notSimple'); // set up temp mailbox with 1 msg
-
-//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 <<<ARGUMENT HERE>>> 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 imap_fetch_overview()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Testing with second argument value: ";
- var_dump($input);
- $overview = imap_fetch_overview($stream_id, $input);
- if (!$overview) {
- echo imap_last_error() . "\n";
- } else {
- displayOverviewFields($overview[0]);
- }
- $iterator++;
-};
-
-fclose($fp);
-
-// clear the error stack
-imap_errors();
-?>
-===DONE===
---CLEAN--
-<?php
-require_once(dirname(__FILE__).'/clean.inc');
-?>
---EXPECTF--
-*** Testing imap_fetch_overview() : usage variations ***
-Create a temporary mailbox and add 1 msgs
-.. mailbox '{%s}%s' created
-
--- Testing with second argument value: int(0)
-Sequence out of range
-
--- Testing with second argument value: int(1)
-size is %d
-uid is %d
-msgno is 1
-recent is %d
-flagged is 0
-answered is 0
-deleted is 0
-seen is 0
-draft is 0
-udate is OK
-
--- Testing with second argument value: int(12345)
-Sequence out of range
-
--- Testing with second argument value: int(-2345)
-Syntax error in sequence
-
--- Testing with second argument value: float(10.5)
-Sequence out of range
-
--- Testing with second argument value: float(-10.5)
-Syntax error in sequence
-
--- Testing with second argument value: float(123456789000)
-Sequence out of range
-
--- Testing with second argument value: float(1.23456789E-9)
-Sequence syntax error
-
--- Testing with second argument value: float(0.5)
-Sequence out of range
-
--- Testing with second argument value: NULL
-Sequence out of range
-
--- Testing with second argument value: NULL
-Sequence out of range
-
--- Testing with second argument value: bool(true)
-size is %d
-uid is %d
-msgno is 1
-recent is %d
-flagged is 0
-answered is 0
-deleted is 0
-seen is 0
-draft is 0
-udate is OK
-
--- Testing with second argument value: bool(false)
-Sequence out of range
-
--- Testing with second argument value: bool(true)
-size is %d
-uid is %d
-msgno is 1
-recent is %d
-flagged is 0
-answered is 0
-deleted is 0
-seen is 0
-draft is 0
-udate is OK
-
--- Testing with second argument value: bool(false)
-Sequence out of range
-
--- Testing with second argument value: string(0) ""
-Sequence out of range
-
--- Testing with second argument value: string(0) ""
-Sequence out of range
-
--- Testing with second argument value: array(0) {
-}
-
-Warning: imap_fetch_overview() expects parameter 2 to be string, array given in %s on line %d
-Sequence out of range
-
--- Testing with second argument value: string(6) "string"
-Syntax error in sequence
-
--- Testing with second argument value: string(6) "string"
-Syntax error in sequence
-
--- Testing with second argument value: string(11) "hello world"
-Syntax error in sequence
-
--- Testing with second argument value: object(classA)#1 (0) {
-}
-Syntax error in sequence
-
--- Testing with second argument value: NULL
-Syntax error in sequence
-
--- Testing with second argument value: NULL
-Syntax error in sequence
-
--- Testing with second argument value: resource(%d) of type (stream)
-
-Warning: imap_fetch_overview() expects parameter 2 to be string, resource given in %s on line %d
-Syntax error in sequence
-===DONE===
diff --git a/ext/imap/tests/imap_fetchbody_variation1.phpt b/ext/imap/tests/imap_fetchbody_variation1.phpt
deleted file mode 100644
index 03bbfc782c..0000000000
--- a/ext/imap/tests/imap_fetchbody_variation1.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test imap_fetchbody() function : usage variation - diff data types as $stream_id arg
---SKIPIF--
-<?php
-extension_loaded('imap') or die('skip imap extension not available in this build');
-?>
---FILE--
-<?php
-/* Prototype : string imap_fetchbody(resource $stream_id, int $msg_no, string $section
- * [, int $options])
- * Description: Get a specific body section
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $stream_id argument to test behaviour of imap_fetchbody()
- */
-
-echo "*** Testing imap_fetchbody() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$msg_no = 1;
-$section = '2';
-
-//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;
-
-// unexpected values to be passed to $stream_id 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,
-);
-
-// loop through each element of $inputs to check the behavior of imap_fetchbody()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( imap_fetchbody($input, $msg_no, $section) );
- $iterator++;
-}
-?>
-===DONE===
---EXPECTF--
-*** Testing imap_fetchbody() : usage variations ***
-
--- Iteration 1 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85
-NULL
-
--- Iteration 2 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85
-NULL
-
--- Iteration 3 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85
-NULL
-
--- Iteration 4 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85
-NULL
-
--- Iteration 5 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85
-NULL
-
--- Iteration 6 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85
-NULL
-
--- Iteration 7 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85
-NULL
-
--- Iteration 8 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85
-NULL
-
--- Iteration 9 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85
-NULL
-
--- Iteration 10 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85
-NULL
-
--- Iteration 11 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85
-NULL
-
--- Iteration 12 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85
-NULL
-
--- Iteration 13 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85
-NULL
-
--- Iteration 14 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85
-NULL
-
--- Iteration 15 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85
-NULL
-
--- Iteration 16 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85
-NULL
-
--- Iteration 17 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85
-NULL
-
--- Iteration 18 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, array given in %s on line 85
-NULL
-
--- Iteration 19 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85
-NULL
-
--- Iteration 20 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85
-NULL
-
--- Iteration 21 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85
-NULL
-
--- Iteration 22 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, object given in %s on line 85
-NULL
-
--- Iteration 23 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85
-NULL
-
--- Iteration 24 --
-
-Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85
-NULL
-===DONE===
diff --git a/ext/imap/tests/imap_fetchbody_variation2.phpt b/ext/imap/tests/imap_fetchbody_variation2.phpt
deleted file mode 100644
index 342c9cc5e6..0000000000
--- a/ext/imap/tests/imap_fetchbody_variation2.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test imap_fetchbody() function : usage variation - diff data types as $msg_no arg
---SKIPIF--
-<?php
-require_once(dirname(__FILE__).'/skipif.inc');
-?>
---FILE--
-<?php
-/* Prototype : string imap_fetchbody(resource $stream_id, int $msg_no, string $section
- * [, int $options])
- * Description: Get a specific body section
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $msg_no argument to test behaviour of imap_fetchbody()
- */
-
-echo "*** Testing imap_fetchbody() : usage variations ***\n";
-
-require_once(dirname(__FILE__).'/imap_include.inc');
-
-// Initialise function arguments not being substituted
-$stream_id = setup_test_mailbox('', 1); // set up temp mailbox with 1 simple msg
-$section = '1';
-
-//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;
-
-// unexpected values to be passed to $msg_no 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,
-);
-
-// loop through each element of $inputs to check the behavior of imap_fetchbody()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( imap_fetchbody($stream_id, $input, $section) );
- $iterator++;
-};
-?>
-===DONE===
---CLEAN--
-<?php
-require_once(dirname(__FILE__).'/clean.inc');
-?>
---EXPECTF--
-*** Testing imap_fetchbody() : usage variations ***
-Create a temporary mailbox and add 1 msgs
-.. mailbox '{%s}%s' created
-
--- Iteration 1 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 2 --
-string(%d) "1: this is a test message, please ignore%a"
-
--- Iteration 3 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 12 --
-string(%d) "1: this is a test message, please ignore%a"
-
--- Iteration 13 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 14 --
-string(%d) "1: this is a test message, please ignore%a"
-
--- Iteration 15 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: imap_fetchbody() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: imap_fetchbody(): Bad message number in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/imap/tests/imap_fetchbody_variation3.phpt b/ext/imap/tests/imap_fetchbody_variation3.phpt
deleted file mode 100644
index 560f2b8242..0000000000
--- a/ext/imap/tests/imap_fetchbody_variation3.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test imap_fetchbody() function : usage variation - diff data types as $section arg
---SKIPIF--
-<?php
-require_once(dirname(__FILE__).'/skipif.inc');
-?>
---FILE--
-<?php
-/* Prototype : string imap_fetchbody(resource $stream_id, int $msg_no, string $section
- * [, int $options])
- * Description: Get a specific body section
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $section argument to test behaviour of imap_fetchbody()
- */
-
-echo "*** Testing imap_fetchbody() : usage variations ***\n";
-
-require_once(dirname(__FILE__).'/imap_include.inc');
-
-// Initialise function arguments not being substituted
-$stream_id = setup_test_mailbox('', 1); // set up temp mailbox with 1 simple msg
-$msg_no = 1;
-
-//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;
-
-// unexpected values to be passed to $section 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,
-);
-
-// loop through each element of $inputs to check the behavior of imap_fetchbody()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( imap_fetchbody($stream_id, $msg_no, $input) );
- $iterator++;
-};
-?>
-===DONE===
---CLEAN--
-<?php
-require_once(dirname(__FILE__).'/clean.inc');
-?>
---EXPECTF--
-*** Testing imap_fetchbody() : usage variations ***
-Create a temporary mailbox and add 1 msgs
-.. mailbox '%s.phpttest' created
-
--- Iteration 1 --
-string(71) "From: %s
-To: %s
-Subject: test1
-
-"
-
--- Iteration 2 --
-string(%d) "1: this is a test message, please ignore%a"
-
--- Iteration 3 --
-string(0) ""
-
--- Iteration 4 --
-string(0) ""
-
--- Iteration 5 --
-string(0) ""
-
--- Iteration 6 --
-string(0) ""
-
--- Iteration 7 --
-string(0) ""
-
--- Iteration 8 --
-string(0) ""
-
--- Iteration 9 --
-string(0) ""
-
--- Iteration 10 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 11 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 12 --
-string(%d) "1: this is a test message, please ignore%a"
-
--- Iteration 13 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 14 --
-string(%d) "1: this is a test message, please ignore%a"
-
--- Iteration 15 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 16 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 17 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 18 --
-
-Warning: imap_fetchbody() expects parameter 3 to be string, array given in %s on line 87
-NULL
-
--- Iteration 19 --
-string(0) ""
-
--- Iteration 20 --
-string(0) ""
-
--- Iteration 21 --
-string(0) ""
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-
--- Iteration 24 --
-string(%d) "From: %s
-To: %s
-Subject: test1
-
-1: this is a test message, please ignore%a"
-===DONE===
diff --git a/ext/imap/tests/imap_fetchheader_variation1.phpt b/ext/imap/tests/imap_fetchheader_variation1.phpt
deleted file mode 100644
index ff828832f6..0000000000
--- a/ext/imap/tests/imap_fetchheader_variation1.phpt
+++ /dev/null
@@ -1,245 +0,0 @@
---TEST--
-Test imap_fetchheader() function : usage variations - diff data types as $stream_id arg
---SKIPIF--
-<?php
-extension_loaded('imap') or die('skip imap extension not available in this build');
-?>
---FILE--
-<?php
-/* Prototype : string imap_fetchheader(resource $stream_id, int $msg_no [, int $options])
- * Description: Get the full unfiltered header for a message
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $stream_id argument to test behaviour of imap_fetchheader()
- */
-
-echo "*** Testing imap_fetchheader() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$msg_no = 1;
-
-//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 different types of array
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $stream_id 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // array data
-/*21*/ array(),
- $index_array,
- $assoc_array,
- array('foo', $index_array, $assoc_array),
-
-
- // object data
-/*25*/ new classA(),
-
- // undefined data
-/*26*/ @$undefined_var,
-
- // unset data
-/*27*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behavior of imap_fetchheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( imap_fetchheader($input, $msg_no) );
- $iterator++;
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing imap_fetchheader() : usage variations ***
-
--- Iteration 1 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
--- Iteration 26 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 27 --
-
-Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/imap/tests/imap_fetchheader_variation2.phpt b/ext/imap/tests/imap_fetchheader_variation2.phpt
deleted file mode 100644
index cba0d9061a..0000000000
--- a/ext/imap/tests/imap_fetchheader_variation2.phpt
+++ /dev/null
@@ -1,274 +0,0 @@
---TEST--
-Test imap_fetchheader() function : usage variations - diff data types for $msg_no arg
---SKIPIF--
-<?php
-require_once(dirname(__FILE__).'/skipif.inc');
-?>
---FILE--
-<?php
-/* Prototype : string imap_fetchheader(resource $stream_id, int $msg_no [, int $options])
- * Description: Get the full unfiltered header for a message
- * Source code: ext/imap/php_imap.c
- */
-
-/*
- * Pass different data types as $msg_no argument to test behaviour of imap_fetchheader()
- */
-
-echo "*** Testing imap_fetchheader() : usage variations ***\n";
-require_once(dirname(__FILE__).'/imap_include.inc');
-
-// Initialise function arguments not being substituted
-$stream_id = setup_test_mailbox('', 1, $mailbox, 'notSimple'); // set up temp mailbox with 1 msg
-
-//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;
-
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $msg_no 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // array data
-/*21*/ array(),
- $index_array,
- $assoc_array,
- array('foo', $index_array, $assoc_array),
-
-
- // object data
-/*25*/ new classA(),
-
- // undefined data
-/*26*/ @$undefined_var,
-
- // unset data
-/*27*/ @$unset_var,
-
- // resource variable
-/*28*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of imap_fetchheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( imap_fetchheader($stream_id, $input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---CLEAN--
-<?php
-require_once(dirname(__FILE__).'/clean.inc');
-?>
-===DONE===
---EXPECTF--
-*** Testing imap_fetchheader() : usage variations ***
-Create a temporary mailbox and add 1 msgs
-.. mailbox '{%s}%s' created
-
--- Iteration 1 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 2 --
-string(%d) "From: foo@anywhere.com
-Subject: Test msg 1
-To: %s
-MIME-Version: 1.0
-Content-Type: MULTIPART/mixed; BOUNDARY="%s"
-
-"
-
--- Iteration 3 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 12 --
-string(%d) "From: foo@anywhere.com
-Subject: Test msg 1
-To: %s
-MIME-Version: 1.0
-Content-Type: MULTIPART/mixed; BOUNDARY="%s"
-
-"
-
--- Iteration 13 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 14 --
-string(%d) "From: foo@anywhere.com
-Subject: Test msg 1
-To: %s
-MIME-Version: 1.0
-Content-Type: MULTIPART/mixed; BOUNDARY="%s"
-
-"
-
--- Iteration 15 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 26 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 27 --
-
-Warning: imap_fetchheader(): Bad message number in %s on line %d
-bool(false)
-
--- Iteration 28 --
-
-Warning: imap_fetchheader() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt b/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt
deleted file mode 100644
index 5ee6fc569c..0000000000
--- a/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt
+++ /dev/null
@@ -1,206 +0,0 @@
---TEST--
-Test mb_decode_mimeheader() function : usage variation
---CREDITS--
-D. Kesley
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_decode_mimeheader') or die("skip mb_decode_mimeheader() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_decode_mimeheader(string string)
- * Description: Decodes the MIME "encoded-word" in the string
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_decode_mimeheader() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for string
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_decode_mimeheader($value) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_decode_mimeheader() : usage variation ***
-
---int 0--
-string(1) "0"
-
---int 1--
-string(1) "1"
-
---int 12345--
-string(5) "12345"
-
---int -12345--
-string(5) "-2345"
-
---float 10.5--
-string(4) "10.5"
-
---float -10.5--
-string(5) "-10.5"
-
---float 12.3456789000e10--
-string(12) "123456789000"
-
---float -12.3456789000e10--
-string(13) "-123456789000"
-
---float .5--
-string(3) "0.5"
-
---empty array--
-Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(0) ""
-
---lowercase null--
-string(0) ""
-
---lowercase true--
-string(1) "1"
-
---lowercase false--
-string(0) ""
-
---uppercase TRUE--
-string(1) "1"
-
---uppercase FALSE--
-string(0) ""
-
---empty string DQ--
-string(0) ""
-
---empty string SQ--
-string(0) ""
-
---instance of classWithToString--
-string(14) "Class A object"
-
---instance of classWithoutToString--
-Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-string(0) ""
-
---unset var--
-string(0) ""
-
---resource--
-Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt
deleted file mode 100644
index be01edbadd..0000000000
--- a/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test mb_encode_mimeheader() function : usage variations - Pass different data types to $str arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_encode_mimeheader
- * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
- * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $str argument to see how mb_encode_mimeheader() behaves
- */
-
-echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$charset = 'utf-8';
-$transfer_encoding = 'B';
-$linefeed = "\r\n";
-$indent = 2;
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_encode_mimeheader($input, $charset, $transfer_encoding, $linefeed, $indent));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_encode_mimeheader() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(12) "123456789000"
-
--- Iteration 8 --
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(6) "string"
-
--- Iteration 19 --
-string(6) "string"
-
--- Iteration 20 --
-string(11) "hello world"
-
--- Iteration 21 --
-string(14) "Class A object"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: mb_encode_mimeheader() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt
deleted file mode 100644
index e9d9fa2dd6..0000000000
--- a/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt
+++ /dev/null
@@ -1,224 +0,0 @@
---TEST--
-Test mb_encode_mimeheader() function : usage variations - Pass different data types to $charset arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_encode_mimeheader
- * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
- * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $charset argument to see how mb_encode_mimeheader() behaves
- */
-
-echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
-
-mb_internal_encoding('utf-8');
-
-// Initialise function arguments not being substituted
-$str = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC');
-$transfer_encoding = 'B';
-$linefeed = "\r\n";
-$indent = 2;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-utf-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $charset 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*/ "",
- '',
-
- // string data
-/*18*/ "utf-8",
- 'utf-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_encode_mimeheader($str, $input, $transfer_encoding, $linefeed, $indent));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_encode_mimeheader() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 19 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 20 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 21 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 22 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_encode_mimeheader() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt
deleted file mode 100644
index 1da923ec21..0000000000
--- a/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt
+++ /dev/null
@@ -1,186 +0,0 @@
---TEST--
-Test mb_encode_mimeheader() function : usage variations - Pass different data types to $transfer_encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_encode_mimeheader
- * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
- * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $transfer_encoding argument to see how mb_encode_mimeheader() behaves
- */
-
-echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
-
-mb_internal_encoding('utf-8');
-
-// Initialise function arguments not being substituted
-$str = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC');
-$charset = 'utf-8';
-$linefeed = "\r\n";
-$indent = 2;
-
-//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 $transfer_encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_encode_mimeheader($str, $charset, $input, $linefeed, $indent));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_encode_mimeheader() : usage variations ***
-
--- Iteration 1 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 2 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 3 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 4 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 5 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 6 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 7 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 8 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 9 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 10 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 11 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 12 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 13 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 14 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 15 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 16 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 17 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 18 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 19 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 20 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 21 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 22 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 23 --
-string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
-
--- Iteration 24 --
-
-Warning: mb_encode_mimeheader() expects parameter 3 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt
deleted file mode 100644
index 11279c7bf6..0000000000
--- a/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt
+++ /dev/null
@@ -1,187 +0,0 @@
---TEST--
-Test mb_encode_mimeheader() function : usage variations - Pass different data types to $linefeed arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_encode_mimeheader
- * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
- * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $linefeed argument to see how mb_encode_mimeheader() behaves
- */
-
-echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
-mb_internal_encoding('utf-8');
-
-
-// Initialise function arguments not being substituted
-//longer $str to go over 1 line
-$str = base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==');
-$charset = 'utf-8';
-$transfer_encoding = 'B';
-$indent = 2;
-
-//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 $linefeed 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_encode_mimeheader($str, $charset, $transfer_encoding, $input, $indent));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_encode_mimeheader() : usage variations ***
-
--- Iteration 1 --
-string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=0 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 2 --
-string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 3 --
-string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=12345 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 4 --
-string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=-2345 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 5 --
-string(117) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=10.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 6 --
-string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=-10.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 7 --
-string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=12345678 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 8 --
-string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1.234567 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 9 --
-string(116) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=0.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 10 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 11 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 12 --
-string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 13 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 14 --
-string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 15 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 16 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 17 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 18 --
-string(119) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=string =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 19 --
-string(119) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=string =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 20 --
-string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=hello wo =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 21 --
-string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=Class A =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 22 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 23 --
-string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 24 --
-
-Warning: mb_encode_mimeheader() expects parameter 4 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt
deleted file mode 100644
index 9dec3c11c5..0000000000
--- a/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test mb_encode_mimeheader() function : usage variations - Pass different data types to $indent arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : string mb_encode_mimeheader
- * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
- * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $indent argument to see how mb_encode_mimeheader() behaves
- */
-
-echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
-
-mb_internal_encoding('utf-8');
-
-// Initialise function arguments not being substituted
-$str = base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==');
-$charset = 'utf-8';
-$transfer_encoding = 'B';
-$linefeed = "\r\n";
-
-//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 $indent 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_encode_mimeheader($str, $charset, $transfer_encoding, $linefeed, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_encode_mimeheader() : usage variations ***
-
--- Iteration 1 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 2 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 3 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 4 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 5 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66?=
- =?UTF-8?B?zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 6 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 7 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 8 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 9 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 10 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 11 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 12 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 13 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 14 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 15 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 16 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 23 --
-string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
-
--- Iteration 24 --
-
-Warning: mb_encode_mimeheader() expects parameter 5 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_ereg_replace_variation2.phpt b/ext/mbstring/tests/mb_ereg_replace_variation2.phpt
deleted file mode 100644
index 39bdf51020..0000000000
--- a/ext/mbstring/tests/mb_ereg_replace_variation2.phpt
+++ /dev/null
@@ -1,178 +0,0 @@
---TEST--
-Test mb_ereg_replace() function : usage variations
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto string mb_ereg_replace(string pattern, string replacement, string string [, string option])
- * Description: Replace regular expression for multibyte string
- * Source code: ext/mbstring/php_mbregex.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_ereg_replace() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pattern = '[a-z]';
-$string = 'string_val';
-$option = '';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of the array for pattern
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_ereg_replace($pattern, $input, $string, $option) );
- $iterator++;
-};
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_ereg_replace() : usage variations ***
-
--- Iteration 1 --
-string(10) "000000_000"
-
--- Iteration 2 --
-string(10) "111111_111"
-
--- Iteration 3 --
-string(46) "123451234512345123451234512345_123451234512345"
-
--- Iteration 4 --
-string(46) "-2345-2345-2345-2345-2345-2345_-2345-2345-2345"
-
--- Iteration 5 --
-string(37) "10.510.510.510.510.510.5_10.510.510.5"
-
--- Iteration 6 --
-string(46) "-10.5-10.5-10.5-10.5-10.5-10.5_-10.5-10.5-10.5"
-
--- Iteration 7 --
-string(109) "123456789000123456789000123456789000123456789000123456789000123456789000_123456789000123456789000123456789000"
-
--- Iteration 8 --
-string(118) "1.23456789E-91.23456789E-91.23456789E-91.23456789E-91.23456789E-91.23456789E-9_1.23456789E-91.23456789E-91.23456789E-9"
-
--- Iteration 9 --
-string(28) "0.50.50.50.50.50.5_0.50.50.5"
-
--- Iteration 10 --
-string(1) "_"
-
--- Iteration 11 --
-string(1) "_"
-
--- Iteration 12 --
-string(10) "111111_111"
-
--- Iteration 13 --
-string(1) "_"
-
--- Iteration 14 --
-string(10) "111111_111"
-
--- Iteration 15 --
-string(1) "_"
-
--- Iteration 16 --
-string(1) "_"
-
--- Iteration 17 --
-string(1) "_"
-
--- Iteration 18 --
-string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8"
-
--- Iteration 19 --
-string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8"
-
--- Iteration 20 --
-string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8"
-
--- Iteration 21 --
-string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8"
-
--- Iteration 22 --
-string(1) "_"
-
--- Iteration 23 --
-string(1) "_"
-
--- Iteration 24 --
-
-Warning: mb_ereg_replace() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/mbstring/tests/mb_ereg_replace_variation3.phpt b/ext/mbstring/tests/mb_ereg_replace_variation3.phpt
deleted file mode 100644
index 2e115f5d6f..0000000000
--- a/ext/mbstring/tests/mb_ereg_replace_variation3.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test mb_ereg_replace() function : usage variations
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto string mb_ereg_replace(string pattern, string replacement, string string [, string option])
- * Description: Replace regular expression for multibyte string
- * Source code: ext/mbstring/php_mbregex.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_ereg_replace() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pattern = '[a-z]';
-$replacement = 'string_val';
-$option = '';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of the array for pattern
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_ereg_replace($pattern, $replacement, $input, $option) );
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_ereg_replace() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(12) "123456789000"
-
--- Iteration 8 --
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(5) "UTF-8"
-
--- Iteration 19 --
-string(5) "UTF-8"
-
--- Iteration 20 --
-string(5) "UTF-8"
-
--- Iteration 21 --
-string(5) "UTF-8"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: mb_ereg_replace() expects parameter 3 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/mbstring/tests/mb_ereg_replace_variation4.phpt b/ext/mbstring/tests/mb_ereg_replace_variation4.phpt
deleted file mode 100644
index deb8b2eb41..0000000000
--- a/ext/mbstring/tests/mb_ereg_replace_variation4.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test mb_ereg_replace() function : usage variations
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto string mb_ereg_replace(string pattern, string replacement, string string [, string option])
- * Description: Replace regular expression for multibyte string
- * Source code: ext/mbstring/php_mbregex.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_ereg_replace() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pattern = '[a-k]';
-$replacement = '1';
-$string = 'string_val';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of the array for pattern
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_ereg_replace($pattern, $replacement, $string, $input) );
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_ereg_replace() : usage variations ***
-
--- Iteration 1 --
-string(10) "str1n1_v1l"
-
--- Iteration 2 --
-string(10) "str1n1_v1l"
-
--- Iteration 3 --
-string(10) "str1n1_v1l"
-
--- Iteration 4 --
-string(10) "str1n1_v1l"
-
--- Iteration 5 --
-string(10) "str1n1_v1l"
-
--- Iteration 6 --
-string(10) "str1n1_v1l"
-
--- Iteration 7 --
-string(10) "str1n1_v1l"
-
--- Iteration 8 --
-string(10) "str1n1_v1l"
-
--- Iteration 9 --
-string(10) "str1n1_v1l"
-
--- Iteration 10 --
-string(10) "str1n1_v1l"
-
--- Iteration 11 --
-string(10) "str1n1_v1l"
-
--- Iteration 12 --
-string(10) "str1n1_v1l"
-
--- Iteration 13 --
-string(10) "str1n1_v1l"
-
--- Iteration 14 --
-string(10) "str1n1_v1l"
-
--- Iteration 15 --
-string(10) "str1n1_v1l"
-
--- Iteration 16 --
-string(10) "str1n1_v1l"
-
--- Iteration 17 --
-string(10) "str1n1_v1l"
-
--- Iteration 18 --
-string(10) "str1n1_v1l"
-
--- Iteration 19 --
-string(10) "str1n1_v1l"
-
--- Iteration 20 --
-string(10) "str1n1_v1l"
-
--- Iteration 21 --
-string(10) "str1n1_v1l"
-
--- Iteration 22 --
-string(10) "str1n1_v1l"
-
--- Iteration 23 --
-string(10) "str1n1_v1l"
-
--- Iteration 24 --
-
-Warning: mb_ereg_replace() expects parameter 4 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/mbstring/tests/mb_internal_encoding_variation1.phpt b/ext/mbstring/tests/mb_internal_encoding_variation1.phpt
deleted file mode 100644
index c031569399..0000000000
--- a/ext/mbstring/tests/mb_internal_encoding_variation1.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test mb_internal_encoding() function : usage variations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_internal_encoding([string $encoding])
- * Description: Sets the current internal encoding or Returns
- * the current internal encoding as a string
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $encoding to mb_internal_encoding() to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_internal_encoding() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_internal_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_internal_encoding($input) );
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_internal_encoding() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_internal_encoding(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_internal_encoding(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_internal_encoding(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_internal_encoding(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_internal_encoding(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_internal_encoding(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_internal_encoding(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_internal_encoding(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-bool(true)
-
--- Iteration 19 --
-bool(true)
-
--- Iteration 20 --
-bool(true)
-
--- Iteration 21 --
-bool(true)
-
--- Iteration 22 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_internal_encoding() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_regex_encoding_variation1.phpt b/ext/mbstring/tests/mb_regex_encoding_variation1.phpt
deleted file mode 100644
index c3bb50ce80..0000000000
--- a/ext/mbstring/tests/mb_regex_encoding_variation1.phpt
+++ /dev/null
@@ -1,215 +0,0 @@
---TEST--
-Test mb_regex_encoding() function : usage variations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_regex_encoding([string $encoding])
- * Description: Returns the current encoding for regex as a string.
- * Source code: ext/mbstring/php_mbregex.c
- */
-
-/*
- * Pass different data types as $encoding argument to mb_regex_encoding() to test behaviour
- * Where possible, 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_regex_encoding() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_regex_encoding($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_regex_encoding() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_regex_encoding(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_regex_encoding(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_regex_encoding(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_regex_encoding(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_regex_encoding(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_regex_encoding(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_regex_encoding(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_regex_encoding(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-bool(true)
-
--- Iteration 19 --
-bool(true)
-
--- Iteration 20 --
-bool(true)
-
--- Iteration 21 --
-bool(true)
-
--- Iteration 22 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_regex_encoding() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_split_variation1.phpt b/ext/mbstring/tests/mb_split_variation1.phpt
deleted file mode 100644
index 7d2f952bff..0000000000
--- a/ext/mbstring/tests/mb_split_variation1.phpt
+++ /dev/null
@@ -1,246 +0,0 @@
---TEST--
-Test mb_split() function : usage variations - different parameter types for pattern
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_split') or die("skip mb_split() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto array mb_split(string pattern, string string [, int limit])
- * Description: split multibyte string into array by regular expression
- * Source code: ext/mbstring/php_mbregex.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_split() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$string = 'a b c d e f g';
-$limit = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of the array for pattern
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_split($input, $string, $limit) );
- $iterator++;
-};
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_split() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 2 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 3 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 4 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 5 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 6 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 7 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 8 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 10 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 11 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 12 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 13 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 14 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 15 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 16 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 17 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 18 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 19 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 20 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 21 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 22 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 23 --
-array(1) {
- [0]=>
- string(13) "a b c d e f g"
-}
-
--- Iteration 24 --
-
-Warning: mb_split() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/mbstring/tests/mb_split_variation2.phpt b/ext/mbstring/tests/mb_split_variation2.phpt
deleted file mode 100644
index 2ef402f205..0000000000
--- a/ext/mbstring/tests/mb_split_variation2.phpt
+++ /dev/null
@@ -1,248 +0,0 @@
---TEST--
-Test mb_split() function : usage variations - different parameter types for string
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_split') or die("skip mb_split() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto array mb_split(string pattern, string string [, int limit])
- * Description: split multibyte string into array by regular expression
- * Source code: ext/mbstring/php_mbregex.c
- * Alias to functions:
- */
-
-
-echo "*** Testing mb_split() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pattern = '[a-z]';
-$limit = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of the array for pattern
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_split($pattern, $input, $limit) );
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_split() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- string(1) "0"
-}
-
--- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "1"
-}
-
--- Iteration 3 --
-array(1) {
- [0]=>
- string(5) "12345"
-}
-
--- Iteration 4 --
-array(1) {
- [0]=>
- string(5) "-2345"
-}
-
--- Iteration 5 --
-array(1) {
- [0]=>
- string(4) "10.5"
-}
-
--- Iteration 6 --
-array(1) {
- [0]=>
- string(5) "-10.5"
-}
-
--- Iteration 7 --
-array(1) {
- [0]=>
- string(12) "123456789000"
-}
-
--- Iteration 8 --
-array(1) {
- [0]=>
- string(13) "1.23456789E-9"
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- string(3) "0.5"
-}
-
--- Iteration 10 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 11 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 12 --
-array(1) {
- [0]=>
- string(1) "1"
-}
-
--- Iteration 13 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 14 --
-array(1) {
- [0]=>
- string(1) "1"
-}
-
--- Iteration 15 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 16 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 17 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 18 --
-array(1) {
- [0]=>
- string(5) "UTF-8"
-}
-
--- Iteration 19 --
-array(1) {
- [0]=>
- string(5) "UTF-8"
-}
-
--- Iteration 20 --
-array(1) {
- [0]=>
- string(5) "UTF-8"
-}
-
--- Iteration 21 --
-array(1) {
- [0]=>
- string(5) "UTF-8"
-}
-
--- Iteration 22 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 23 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 24 --
-
-Warning: mb_split() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/mbstring/tests/mb_split_variation3.phpt b/ext/mbstring/tests/mb_split_variation3.phpt
deleted file mode 100644
index c5e6783f98..0000000000
--- a/ext/mbstring/tests/mb_split_variation3.phpt
+++ /dev/null
@@ -1,332 +0,0 @@
---TEST--
-Test mb_split() function : usage variations - different parameter types for limit
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_split') or die("skip mb_split() is not available in this build");
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : proto array mb_split(string pattern, string string [, int limit])
- * Description: split multibyte string into array by regular expression
- * Source code: ext/mbstring/php_mbregex.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_split() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pattern = '[a-z]';
-$string = 'string_val';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of the array for pattern
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_split($pattern, $string, $input) );
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_split() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 2 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 3 --
-array(10) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(1) "_"
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(0) ""
-}
-
--- Iteration 4 --
-array(10) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(1) "_"
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(0) ""
-}
-
--- Iteration 5 --
-array(10) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(1) "_"
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(0) ""
-}
-
--- Iteration 6 --
-array(10) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(1) "_"
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(0) ""
-}
-
--- Iteration 7 --
-array(10) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(1) "_"
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(0) ""
-}
-
--- Iteration 8 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 10 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 11 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 12 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 13 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 14 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 15 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 16 --
-
-Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: mb_split() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 23 --
-array(1) {
- [0]=>
- string(10) "string_val"
-}
-
--- Iteration 24 --
-
-Warning: mb_split() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/mbstring/tests/mb_stripos_variation1.phpt b/ext/mbstring/tests/mb_stripos_variation1.phpt
deleted file mode 100644
index 7ecbbe9e70..0000000000
--- a/ext/mbstring/tests/mb_stripos_variation1.phpt
+++ /dev/null
@@ -1,183 +0,0 @@
---TEST--
-Test mb_stripos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stripos') or die("skip mb_stripos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_stripos different data types as $haystack arg to test behaviour
- */
-
-echo "*** Testing mb_stripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_stripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_stripos($input, $needle, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_stripos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_stripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_stripos_variation2.phpt b/ext/mbstring/tests/mb_stripos_variation2.phpt
deleted file mode 100644
index bb49022e0f..0000000000
--- a/ext/mbstring/tests/mb_stripos_variation2.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test mb_stripos() function : usage variations - pass different data types as $needle arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stripos') or die("skip mb_stripos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_stripos different data types as $needle arg to test behaviour
- */
-
-echo "*** Testing mb_stripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_stripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_stripos($haystack, $input, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_stripos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_stripos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_stripos() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_stripos_variation3.phpt b/ext/mbstring/tests/mb_stripos_variation3.phpt
deleted file mode 100644
index 4c9441462a..0000000000
--- a/ext/mbstring/tests/mb_stripos_variation3.phpt
+++ /dev/null
@@ -1,211 +0,0 @@
---TEST--
-Test mb_stripos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stripos') or die("skip mb_stripos() is not available in this build");
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : int mb_stripos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_stripos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing mb_stripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'A';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//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 $offest argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -5,
- -2345,
-
- // float data
-/*6*/ 10.5,
- -5.5,
- -100.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*12*/ NULL,
- null,
-
- // boolean data
-/*14*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*18*/ "",
- '',
-
- // string data
-/*20*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_stripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_stripos($haystack, $needle, $input, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_stripos() : usage variations ***
-
--- Iteration 1 --
-int(8)
-
--- Iteration 2 --
-int(8)
-
--- Iteration 3 --
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 4 --
-int(8)
-
--- Iteration 5 --
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-int(8)
-
--- Iteration 8 --
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(8)
-
--- Iteration 11 --
-int(8)
-
--- Iteration 12 --
-int(8)
-
--- Iteration 13 --
-int(8)
-
--- Iteration 14 --
-int(8)
-
--- Iteration 15 --
-int(8)
-
--- Iteration 16 --
-int(8)
-
--- Iteration 17 --
-int(8)
-
--- Iteration 18 --
-
-Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: mb_stripos() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-int(8)
-
--- Iteration 25 --
-int(8)
-
--- Iteration 26 --
-
-Warning: mb_stripos() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_stripos_variation4.phpt b/ext/mbstring/tests/mb_stripos_variation4.phpt
deleted file mode 100644
index b2109ee8e0..0000000000
--- a/ext/mbstring/tests/mb_stripos_variation4.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test mb_stripos() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stripos') or die("skip mb_stripos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_stripos different data types as $encoding arg to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_stripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$needle = 'VaL';
-$offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_stripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_stripos($haystack, $needle, $offset, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_stripos() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_stripos(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_stripos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_stripos(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_stripos(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_stripos(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_stripos(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_stripos(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_stripos(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_stripos(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_stripos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_stripos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_stripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_stripos() expects parameter 4 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_stristr_variation1.phpt b/ext/mbstring/tests/mb_stristr_variation1.phpt
deleted file mode 100644
index 15b4c864c8..0000000000
--- a/ext/mbstring/tests/mb_stristr_variation1.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test mb_stristr() function : usage variation - various haystacks, needle won't be found
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stristr') or die("skip mb_stristr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_stristr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_stristr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$needle = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for haystack
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_stristr($value, $needle, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_stristr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_stristr() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - mb_stristr() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_stristr_variation2.phpt b/ext/mbstring/tests/mb_stristr_variation2.phpt
deleted file mode 100644
index 2352e82beb..0000000000
--- a/ext/mbstring/tests/mb_stristr_variation2.phpt
+++ /dev/null
@@ -1,215 +0,0 @@
---TEST--
-Test mb_stristr() function : usage variation - different types of needle.
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stristr') or die("skip mb_stristr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_stristr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_stristr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for needle
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_stristr($haystack, $value, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_stristr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_stristr() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
-bool(false)
-
---resource--
-Error: 2 - mb_stristr() expects parameter 2 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_stristr_variation3.phpt b/ext/mbstring/tests/mb_stristr_variation3.phpt
deleted file mode 100644
index b24faaeb71..0000000000
--- a/ext/mbstring/tests/mb_stristr_variation3.phpt
+++ /dev/null
@@ -1,232 +0,0 @@
---TEST--
-Test mb_stristr() function : usage variation - different values for part
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stristr') or die("skip mb_stristr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_stristr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_stristr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for part
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = mb_stristr($haystack, $needle, $value, $encoding);
- if ($res === NULL) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_stristr() : usage variation ***
-
---int 0--
-string(8) "5f76616c"
-
---int 1--
-string(12) "737472696e67"
-
---int 12345--
-string(12) "737472696e67"
-
---int -12345--
-string(12) "737472696e67"
-
---float 10.5--
-string(12) "737472696e67"
-
---float -10.5--
-string(12) "737472696e67"
-
---float 12.3456789000e10--
-string(12) "737472696e67"
-
---float -12.3456789000e10--
-string(12) "737472696e67"
-
---float .5--
-string(12) "737472696e67"
-
---empty array--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(8) "5f76616c"
-
---lowercase null--
-string(8) "5f76616c"
-
---lowercase true--
-string(12) "737472696e67"
-
---lowercase false--
-string(8) "5f76616c"
-
---uppercase TRUE--
-string(12) "737472696e67"
-
---uppercase FALSE--
-string(8) "5f76616c"
-
---empty string DQ--
-string(8) "5f76616c"
-
---empty string SQ--
-string(8) "5f76616c"
-
---string DQ--
-string(12) "737472696e67"
-
---string SQ--
-string(12) "737472696e67"
-
---mixed case string--
-string(12) "737472696e67"
-
---heredoc--
-string(12) "737472696e67"
-
---instance of classWithToString--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---undefined var--
-string(8) "5f76616c"
-
---unset var--
-string(8) "5f76616c"
-
---resource--
-Error: 2 - mb_stristr() expects parameter 3 to be bool, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_stristr_variation4.phpt b/ext/mbstring/tests/mb_stristr_variation4.phpt
deleted file mode 100644
index 122e92fcc4..0000000000
--- a/ext/mbstring/tests/mb_stristr_variation4.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test mb_stristr() function : usage variation - different encoding types
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stristr') or die("skip mb_stristr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_stristr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_stristr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$part = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "invalid";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-utf-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for encoding
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_stristr($haystack, $needle, $part, $value) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_stristr() : usage variation ***
-
---int 0--
-Error: 2 - mb_stristr(): Unknown encoding "0", %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - mb_stristr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - mb_stristr(): Unknown encoding "12345", %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - mb_stristr(): Unknown encoding "-2345", %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - mb_stristr(): Unknown encoding "10.5", %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - mb_stristr(): Unknown encoding "-10.5", %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - mb_stristr(): Unknown encoding "123456789000", %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - mb_stristr(): Unknown encoding "-123456789000", %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - mb_stristr(): Unknown encoding "0.5", %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - mb_stristr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - mb_stristr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - mb_stristr(): Unknown encoding "invalid", %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_stristr() expects parameter 4 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
-bool(false)
-
---resource--
-Error: 2 - mb_stristr() expects parameter 4 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strlen_variation1.phpt b/ext/mbstring/tests/mb_strlen_variation1.phpt
deleted file mode 100644
index 480ee6909f..0000000000
--- a/ext/mbstring/tests/mb_strlen_variation1.phpt
+++ /dev/null
@@ -1,180 +0,0 @@
---TEST--
-Test mb_strlen() function : usage variations - Pass different data types as $str arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strlen(string $str [, string $encoding])
- * Description: Get character numbers of a string
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Test mb_strlen by passing different data types as $str argument
- */
-
-echo "*** Testing mb_strlen() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$encoding = 'utf-8';
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strlen()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strlen($input, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strlen() : usage variations ***
-
--- Iteration 1 --
-int(1)
-
--- Iteration 2 --
-int(1)
-
--- Iteration 3 --
-int(5)
-
--- Iteration 4 --
-int(5)
-
--- Iteration 5 --
-int(4)
-
--- Iteration 6 --
-int(5)
-
--- Iteration 7 --
-int(12)
-
--- Iteration 8 --
-int(13)
-
--- Iteration 9 --
-int(3)
-
--- Iteration 10 --
-int(0)
-
--- Iteration 11 --
-int(0)
-
--- Iteration 12 --
-int(1)
-
--- Iteration 13 --
-int(0)
-
--- Iteration 14 --
-int(1)
-
--- Iteration 15 --
-int(0)
-
--- Iteration 16 --
-int(0)
-
--- Iteration 17 --
-int(0)
-
--- Iteration 18 --
-int(6)
-
--- Iteration 19 --
-int(6)
-
--- Iteration 20 --
-int(11)
-
--- Iteration 21 --
-int(14)
-
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(0)
-
--- Iteration 24 --
-
-Warning: mb_strlen() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strlen_variation2.phpt b/ext/mbstring/tests/mb_strlen_variation2.phpt
deleted file mode 100644
index 17c1e0c6e6..0000000000
--- a/ext/mbstring/tests/mb_strlen_variation2.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test mb_strlen() function : usage variations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strlen(string $str [, string $encoding])
- * Description: Get character numbers of a string
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Test mb_strlen() by passing different data types as $encoding argument.
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_strlen() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$str = 'string value';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strlen()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strlen($str, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strlen() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_strlen(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_strlen(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_strlen(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strlen(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strlen(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strlen(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strlen(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_strlen(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strlen(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_strlen(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_strlen(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(12)
-
--- Iteration 19 --
-int(12)
-
--- Iteration 20 --
-int(12)
-
--- Iteration 21 --
-int(12)
-
--- Iteration 22 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_strlen(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strlen() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strpos_variation1.phpt b/ext/mbstring/tests/mb_strpos_variation1.phpt
deleted file mode 100644
index 696cc1cd89..0000000000
--- a/ext/mbstring/tests/mb_strpos_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test mb_strpos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strpos different data types as $haystack arg to test behaviour
- */
-
-echo "*** Testing mb_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strpos($input, $needle, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strpos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strpos_variation2.phpt b/ext/mbstring/tests/mb_strpos_variation2.phpt
deleted file mode 100644
index 9dc8e2a019..0000000000
--- a/ext/mbstring/tests/mb_strpos_variation2.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test mb_strpos() function : usage variations - pass different data types as $needle arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strpos different data types as $needle arg to test behaviour
- */
-
-echo "*** Testing mb_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strpos($haystack, $input, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_strpos(): Empty delimiter in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strpos() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strpos_variation3.phpt b/ext/mbstring/tests/mb_strpos_variation3.phpt
deleted file mode 100644
index b34682d5b4..0000000000
--- a/ext/mbstring/tests/mb_strpos_variation3.phpt
+++ /dev/null
@@ -1,211 +0,0 @@
---TEST--
-Test mb_strpos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strpos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing mb_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'a';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//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 $offest argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -5,
- -2345,
-
- // float data
-/*6*/ 10.5,
- -5.5,
- -100.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*12*/ NULL,
- null,
-
- // boolean data
-/*14*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*18*/ "",
- '',
-
- // string data
-/*20*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strpos($haystack, $needle, $input, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strpos() : usage variations ***
-
--- Iteration 1 --
-int(8)
-
--- Iteration 2 --
-int(8)
-
--- Iteration 3 --
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 4 --
-int(8)
-
--- Iteration 5 --
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-int(8)
-
--- Iteration 8 --
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(8)
-
--- Iteration 11 --
-int(8)
-
--- Iteration 12 --
-int(8)
-
--- Iteration 13 --
-int(8)
-
--- Iteration 14 --
-int(8)
-
--- Iteration 15 --
-int(8)
-
--- Iteration 16 --
-int(8)
-
--- Iteration 17 --
-int(8)
-
--- Iteration 18 --
-
-Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: mb_strpos() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-int(8)
-
--- Iteration 25 --
-int(8)
-
--- Iteration 26 --
-
-Warning: mb_strpos() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strpos_variation4.phpt b/ext/mbstring/tests/mb_strpos_variation4.phpt
deleted file mode 100644
index a9b168c573..0000000000
--- a/ext/mbstring/tests/mb_strpos_variation4.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test mb_strpos() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strpos different data types as $encoding arg to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$needle = 'val';
-$offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strpos($haystack, $needle, $offset, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strpos() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_strpos(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_strpos(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strpos(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strpos(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strpos(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strpos(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_strpos(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strpos(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_strpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strpos() expects parameter 4 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strrchr_variation1.phpt b/ext/mbstring/tests/mb_strrchr_variation1.phpt
deleted file mode 100644
index da635fb74a..0000000000
--- a/ext/mbstring/tests/mb_strrchr_variation1.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test mb_strrchr() function : usage variation - various haystacks, needle won't be found
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrchr') or die("skip mb_strrchr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrchr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$needle = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for haystack
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strrchr($value, $needle, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrchr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strrchr() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - mb_strrchr() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrchr_variation2.phpt b/ext/mbstring/tests/mb_strrchr_variation2.phpt
deleted file mode 100644
index 942980e5fd..0000000000
--- a/ext/mbstring/tests/mb_strrchr_variation2.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test mb_strrchr() function : usage variation - different types of needle.
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrchr') or die("skip mb_strrchr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrchr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for needle
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strrchr($haystack, $value, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrchr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strrchr() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - mb_strrchr() expects parameter 2 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrchr_variation3.phpt b/ext/mbstring/tests/mb_strrchr_variation3.phpt
deleted file mode 100644
index 0664a16302..0000000000
--- a/ext/mbstring/tests/mb_strrchr_variation3.phpt
+++ /dev/null
@@ -1,232 +0,0 @@
---TEST--
-Test mb_strrchr() function : usage variation - different values for part
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrchr') or die("skip mb_strrchr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrchr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for part
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = mb_strrchr($haystack, $needle, $value, $encoding);
- if ($res === NULL) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrchr() : usage variation ***
-
---int 0--
-string(8) "5f76616c"
-
---int 1--
-string(12) "737472696e67"
-
---int 12345--
-string(12) "737472696e67"
-
---int -12345--
-string(12) "737472696e67"
-
---float 10.5--
-string(12) "737472696e67"
-
---float -10.5--
-string(12) "737472696e67"
-
---float 12.3456789000e10--
-string(12) "737472696e67"
-
---float -12.3456789000e10--
-string(12) "737472696e67"
-
---float .5--
-string(12) "737472696e67"
-
---empty array--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(8) "5f76616c"
-
---lowercase null--
-string(8) "5f76616c"
-
---lowercase true--
-string(12) "737472696e67"
-
---lowercase false--
-string(8) "5f76616c"
-
---uppercase TRUE--
-string(12) "737472696e67"
-
---uppercase FALSE--
-string(8) "5f76616c"
-
---empty string DQ--
-string(8) "5f76616c"
-
---empty string SQ--
-string(8) "5f76616c"
-
---string DQ--
-string(12) "737472696e67"
-
---string SQ--
-string(12) "737472696e67"
-
---mixed case string--
-string(12) "737472696e67"
-
---heredoc--
-string(12) "737472696e67"
-
---instance of classWithToString--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---undefined var--
-string(8) "5f76616c"
-
---unset var--
-string(8) "5f76616c"
-
---resource--
-Error: 2 - mb_strrchr() expects parameter 3 to be bool, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrchr_variation4.phpt b/ext/mbstring/tests/mb_strrchr_variation4.phpt
deleted file mode 100644
index 5ba8e0563f..0000000000
--- a/ext/mbstring/tests/mb_strrchr_variation4.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test mb_strrchr() function : usage variation - different encoding types
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrchr') or die("skip mb_strrchr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrchr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$part = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "invalid";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-invalid
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for encoding
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strrchr($haystack, $needle, $part, $value) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrchr() : usage variation ***
-
---int 0--
-Error: 2 - mb_strrchr(): Unknown encoding "0", %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - mb_strrchr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - mb_strrchr(): Unknown encoding "12345", %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - mb_strrchr(): Unknown encoding "-2345", %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - mb_strrchr(): Unknown encoding "10.5", %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - mb_strrchr(): Unknown encoding "-10.5", %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - mb_strrchr(): Unknown encoding "123456789000", %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - mb_strrchr(): Unknown encoding "-123456789000", %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - mb_strrchr(): Unknown encoding "0.5", %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - mb_strrchr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - mb_strrchr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - mb_strrchr(): Unknown encoding "invalid", %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strrchr() expects parameter 4 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
-bool(false)
-
---resource--
-Error: 2 - mb_strrchr() expects parameter 4 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrichr_variation1.phpt b/ext/mbstring/tests/mb_strrichr_variation1.phpt
deleted file mode 100644
index afc01e70fb..0000000000
--- a/ext/mbstring/tests/mb_strrichr_variation1.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test mb_strrichr() function : usage variation - various haystacks, needle won't be found
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrichr') or die("skip mb_strrichr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrichr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$needle = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for haystack
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strrichr($value, $needle, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrichr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strrichr() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - mb_strrichr() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrichr_variation2.phpt b/ext/mbstring/tests/mb_strrichr_variation2.phpt
deleted file mode 100644
index b389f60721..0000000000
--- a/ext/mbstring/tests/mb_strrichr_variation2.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test mb_strrichr() function : usage variation - different types of needle.
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrichr') or die("skip mb_strrichr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrichr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for needle
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strrichr($haystack, $value, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrichr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strrichr() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - mb_strrichr() expects parameter 2 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrichr_variation3.phpt b/ext/mbstring/tests/mb_strrichr_variation3.phpt
deleted file mode 100644
index c2cccaa375..0000000000
--- a/ext/mbstring/tests/mb_strrichr_variation3.phpt
+++ /dev/null
@@ -1,232 +0,0 @@
---TEST--
-Test mb_strrichr() function : usage variation - different values for part
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrichr') or die("skip mb_strrichr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrichr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for part
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = mb_strrichr($haystack, $needle, $value, $encoding);
- if ($res === NULL) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrichr() : usage variation ***
-
---int 0--
-string(8) "5f76616c"
-
---int 1--
-string(12) "737472696e67"
-
---int 12345--
-string(12) "737472696e67"
-
---int -12345--
-string(12) "737472696e67"
-
---float 10.5--
-string(12) "737472696e67"
-
---float -10.5--
-string(12) "737472696e67"
-
---float 12.3456789000e10--
-string(12) "737472696e67"
-
---float -12.3456789000e10--
-string(12) "737472696e67"
-
---float .5--
-string(12) "737472696e67"
-
---empty array--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(8) "5f76616c"
-
---lowercase null--
-string(8) "5f76616c"
-
---lowercase true--
-string(12) "737472696e67"
-
---lowercase false--
-string(8) "5f76616c"
-
---uppercase TRUE--
-string(12) "737472696e67"
-
---uppercase FALSE--
-string(8) "5f76616c"
-
---empty string DQ--
-string(8) "5f76616c"
-
---empty string SQ--
-string(8) "5f76616c"
-
---string DQ--
-string(12) "737472696e67"
-
---string SQ--
-string(12) "737472696e67"
-
---mixed case string--
-string(12) "737472696e67"
-
---heredoc--
-string(12) "737472696e67"
-
---instance of classWithToString--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---undefined var--
-string(8) "5f76616c"
-
---unset var--
-string(8) "5f76616c"
-
---resource--
-Error: 2 - mb_strrichr() expects parameter 3 to be bool, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strrichr_variation4.phpt b/ext/mbstring/tests/mb_strrichr_variation4.phpt
deleted file mode 100644
index adcccee209..0000000000
--- a/ext/mbstring/tests/mb_strrichr_variation4.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test mb_strrichr() function : usage variation - different encoding types
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrichr') or die("skip mb_strrichr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds the last occurrence of a character in a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strrichr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$part = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "invalid";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-invalid
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for encoding
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strrichr($haystack, $needle, $part, $value) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strrichr() : usage variation ***
-
---int 0--
-Error: 2 - mb_strrichr(): Unknown encoding "0", %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - mb_strrichr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - mb_strrichr(): Unknown encoding "12345", %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - mb_strrichr(): Unknown encoding "-2345", %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - mb_strrichr(): Unknown encoding "10.5", %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - mb_strrichr(): Unknown encoding "-10.5", %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - mb_strrichr(): Unknown encoding "123456789000", %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - mb_strrichr(): Unknown encoding "-123456789000", %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - mb_strrichr(): Unknown encoding "0.5", %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - mb_strrichr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - mb_strrichr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - mb_strrichr(): Unknown encoding "invalid", %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strrichr() expects parameter 4 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
-bool(false)
-
---resource--
-Error: 2 - mb_strrichr() expects parameter 4 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strripos_variation1.phpt b/ext/mbstring/tests/mb_strripos_variation1.phpt
deleted file mode 100644
index 0ba21a5624..0000000000
--- a/ext/mbstring/tests/mb_strripos_variation1.phpt
+++ /dev/null
@@ -1,183 +0,0 @@
---TEST--
-Test mb_strripos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strripos') or die("skip mb_strripos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of last occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_strripos different data types as $haystack arg to test behaviour
- */
-
-echo "*** Testing mb_strripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strripos($input, $needle, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strripos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strripos_variation2.phpt b/ext/mbstring/tests/mb_strripos_variation2.phpt
deleted file mode 100644
index 6777145e13..0000000000
--- a/ext/mbstring/tests/mb_strripos_variation2.phpt
+++ /dev/null
@@ -1,183 +0,0 @@
---TEST--
-Test mb_strripos() function : usage variations - pass different data types as $needle arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strripos') or die("skip mb_strripos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of last occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_strripos different data types as $needle arg to test behaviour
- */
-
-echo "*** Testing mb_strripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//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 $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strripos($haystack, $input, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strripos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strripos() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt b/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt
deleted file mode 100644
index ed0707e6bb..0000000000
--- a/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt
+++ /dev/null
@@ -1,206 +0,0 @@
---TEST--
-Test mb_strripos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strripos') or die("skip mb_strripos() is not available in this build");
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of last occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_strripos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing mb_strripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'A';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//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 $offest argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 12.5,
- -12.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strripos($haystack, $needle, $input, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strripos() : usage variations ***
-
--- Iteration 1 --
-int(8)
-
--- Iteration 2 --
-int(8)
-
--- Iteration 3 --
-
-Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 8 --
-int(8)
-
--- Iteration 9 --
-int(8)
-
--- Iteration 10 --
-int(8)
-
--- Iteration 11 --
-int(8)
-
--- Iteration 12 --
-int(8)
-
--- Iteration 13 --
-int(8)
-
--- Iteration 14 --
-int(8)
-
--- Iteration 15 --
-int(8)
-
--- Iteration 16 --
-
-Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mb_strripos() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-int(8)
-
--- Iteration 23 --
-int(8)
-
--- Iteration 24 --
-
-Warning: mb_strripos() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strripos_variation4.phpt b/ext/mbstring/tests/mb_strripos_variation4.phpt
deleted file mode 100644
index 72ce6865a8..0000000000
--- a/ext/mbstring/tests/mb_strripos_variation4.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test mb_strripos() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strripos') or die("skip mb_strripos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of last occurrence of a string within another, case insensitive
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-/*
- * Pass mb_strripos different data types as $encoding arg to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_strripos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$needle = 'VaL';
-$offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strripos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strripos($haystack, $needle, $offset, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strripos() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_strripos(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_strripos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_strripos(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strripos(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strripos(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strripos(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strripos(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_strripos(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strripos(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_strripos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_strripos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_strripos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strripos() expects parameter 4 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strrpos_variation1.phpt b/ext/mbstring/tests/mb_strrpos_variation1.phpt
deleted file mode 100644
index 9376443cf4..0000000000
--- a/ext/mbstring/tests/mb_strrpos_variation1.phpt
+++ /dev/null
@@ -1,180 +0,0 @@
---TEST--
-Test mb_strrpos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strrpos() different data types as $haystack argument to test behaviour
- */
-
-echo "*** Testing mb_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'world';
-$offset = 0;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "hello, world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello, world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "hello, world",
- 'hello, world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strrpos($input, $needle, $offset, $encoding));
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strrpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strrpos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strrpos_variation2.phpt b/ext/mbstring/tests/mb_strrpos_variation2.phpt
deleted file mode 100644
index 85c951eb83..0000000000
--- a/ext/mbstring/tests/mb_strrpos_variation2.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test mb_strrpos() function : usage variations - Pass different data types to $needle arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strrpos() different data types as $needle argument to test behaviour
- */
-
-echo "*** Testing mb_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'hello, world';
-$offset = 0;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "world",
- 'world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strrpos($haystack, $input, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strrpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strrpos() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strrpos_variation3.phpt b/ext/mbstring/tests/mb_strrpos_variation3.phpt
deleted file mode 100644
index 99e5962f67..0000000000
--- a/ext/mbstring/tests/mb_strrpos_variation3.phpt
+++ /dev/null
@@ -1,153 +0,0 @@
---TEST--
-Test mb_strrpos() function : usage variations - Pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strrpos() different data types as $offset argument to test behaviour
- */
-
-echo "*** Testing mb_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'a';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "7";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// unexpected values to be passed to $offset 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,
-
- // object data
-/*16*/ new classA(),
-
- // undefined data
-/*17*/ @$undefined_var,
-
- // unset data
-/*18*/ @$unset_var
-);
-
-// loop through each element of $inputs to check the behavior of mb_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strrpos($haystack, $needle, $input, $encoding));
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strrpos() : usage variations ***
-
--- Iteration 1 --
-int(8)
-
--- Iteration 2 --
-int(8)
-
--- Iteration 3 --
-
-Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
--- Iteration 8 --
-int(8)
-
--- Iteration 9 --
-int(8)
-
--- Iteration 10 --
-int(8)
-
--- Iteration 11 --
-int(8)
-
--- Iteration 12 --
-int(8)
-
--- Iteration 13 --
-int(8)
-
--- Iteration 14 --
-int(8)
-
--- Iteration 15 --
-int(8)
-
--- Iteration 16 --
-
-Notice: Object of class classA could not be converted to int in %s on line %d
-int(8)
-
--- Iteration 17 --
-int(8)
-
--- Iteration 18 --
-int(8)
-Done
diff --git a/ext/mbstring/tests/mb_strrpos_variation4.phpt b/ext/mbstring/tests/mb_strrpos_variation4.phpt
deleted file mode 100644
index 3e1f6c9703..0000000000
--- a/ext/mbstring/tests/mb_strrpos_variation4.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test mb_strrpos() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass mb_strrpos() different data types as $encoding argument to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'hello, world';
-$needle = 'world';
-$offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strrpos($haystack, $needle, $offset, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strrpos() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_strrpos(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_strrpos(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strrpos(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strrpos(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strrpos(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strrpos(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_strrpos(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strrpos(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_strrpos() expects parameter 4 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strstr_variation1.phpt b/ext/mbstring/tests/mb_strstr_variation1.phpt
deleted file mode 100644
index 5dfeaee8a1..0000000000
--- a/ext/mbstring/tests/mb_strstr_variation1.phpt
+++ /dev/null
@@ -1,207 +0,0 @@
---TEST--
-Test mb_strstr() function : usage variation - various haystacks, needle won't be found
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strstr') or die("skip mb_strstr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strstr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strstr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$needle = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for haystack
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strstr($value, $needle, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strstr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strstr() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - mb_strstr() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strstr_variation2.phpt b/ext/mbstring/tests/mb_strstr_variation2.phpt
deleted file mode 100644
index b14da94fab..0000000000
--- a/ext/mbstring/tests/mb_strstr_variation2.phpt
+++ /dev/null
@@ -1,215 +0,0 @@
---TEST--
-Test mb_strstr() function : usage variation - different types of needle.
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strstr') or die("skip mb_strstr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strstr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strstr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$part = true;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for needle
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strstr($haystack, $value, $part, $encoding) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strstr() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strstr() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
-bool(false)
-
---resource--
-Error: 2 - mb_strstr() expects parameter 2 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strstr_variation3.phpt b/ext/mbstring/tests/mb_strstr_variation3.phpt
deleted file mode 100644
index 462c993b74..0000000000
--- a/ext/mbstring/tests/mb_strstr_variation3.phpt
+++ /dev/null
@@ -1,232 +0,0 @@
---TEST--
-Test mb_strstr() function : usage variation - different values for part
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strstr') or die("skip mb_strstr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strstr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strstr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for part
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = mb_strstr($haystack, $needle, $value, $encoding);
- if ($res === NULL) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strstr() : usage variation ***
-
---int 0--
-string(8) "5f76616c"
-
---int 1--
-string(12) "737472696e67"
-
---int 12345--
-string(12) "737472696e67"
-
---int -12345--
-string(12) "737472696e67"
-
---float 10.5--
-string(12) "737472696e67"
-
---float -10.5--
-string(12) "737472696e67"
-
---float 12.3456789000e10--
-string(12) "737472696e67"
-
---float -12.3456789000e10--
-string(12) "737472696e67"
-
---float .5--
-string(12) "737472696e67"
-
---empty array--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(8) "5f76616c"
-
---lowercase null--
-string(8) "5f76616c"
-
---lowercase true--
-string(12) "737472696e67"
-
---lowercase false--
-string(8) "5f76616c"
-
---uppercase TRUE--
-string(12) "737472696e67"
-
---uppercase FALSE--
-string(8) "5f76616c"
-
---empty string DQ--
-string(8) "5f76616c"
-
---empty string SQ--
-string(8) "5f76616c"
-
---string DQ--
-string(12) "737472696e67"
-
---string SQ--
-string(12) "737472696e67"
-
---mixed case string--
-string(12) "737472696e67"
-
---heredoc--
-string(12) "737472696e67"
-
---instance of classWithToString--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, object given, %s(%d)
-NULL
-
---undefined var--
-string(8) "5f76616c"
-
---unset var--
-string(8) "5f76616c"
-
---resource--
-Error: 2 - mb_strstr() expects parameter 3 to be bool, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strstr_variation4.phpt b/ext/mbstring/tests/mb_strstr_variation4.phpt
deleted file mode 100644
index 088f4dac0d..0000000000
--- a/ext/mbstring/tests/mb_strstr_variation4.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test mb_strstr() function : usage variation - different encoding types
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strstr') or die("skip mb_strstr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strstr(string haystack, string needle[, bool part[, string encoding]])
- * Description: Finds first occurrence of a string within another
- * Source code: ext/mbstring/mbstring.c
- * Alias to functions:
- */
-
-echo "*** Testing mb_strstr() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'string_val';
-$needle = '_';
-$part = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "invalid";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-invalid
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for encoding
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( mb_strstr($haystack, $needle, $part, $value) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mb_strstr() : usage variation ***
-
---int 0--
-Error: 2 - mb_strstr(): Unknown encoding "0", %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - mb_strstr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - mb_strstr(): Unknown encoding "12345", %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - mb_strstr(): Unknown encoding "-2345", %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - mb_strstr(): Unknown encoding "10.5", %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - mb_strstr(): Unknown encoding "-10.5", %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - mb_strstr(): Unknown encoding "123456789000", %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - mb_strstr(): Unknown encoding "-123456789000", %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - mb_strstr(): Unknown encoding "0.5", %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - mb_strstr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - mb_strstr(): Unknown encoding "1", %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - mb_strstr(): Unknown encoding "invalid", %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - mb_strstr() expects parameter 4 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
-bool(false)
-
---resource--
-Error: 2 - mb_strstr() expects parameter 4 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/mbstring/tests/mb_strtolower_variation1.phpt b/ext/mbstring/tests/mb_strtolower_variation1.phpt
deleted file mode 100644
index 004660ff1f..0000000000
--- a/ext/mbstring/tests/mb_strtolower_variation1.phpt
+++ /dev/null
@@ -1,178 +0,0 @@
---TEST--
-Test mb_strtolower() function : usage variations - pass different data types as $sourcestring arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
- * Description: Returns a lowercased version of $sourcestring
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $sourcestring argument to test behaviour of mb_strtolower()
- */
-
-echo "*** Testing mb_strtolower() : usage variations ***\n";
-
-
-//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 $sourcestring 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*/ "",
- '',
-
- // string data
-/*18*/ "String",
- 'String',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strtolower()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strtolower($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strtolower() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(12) "123456789000"
-
--- Iteration 8 --
-string(13) "1.23456789e-9"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(6) "string"
-
--- Iteration 19 --
-string(6) "string"
-
--- Iteration 20 --
-string(11) "hello world"
-
--- Iteration 21 --
-string(14) "class a object"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: mb_strtolower() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strtolower_variation2.phpt b/ext/mbstring/tests/mb_strtolower_variation2.phpt
deleted file mode 100644
index c9e2520232..0000000000
--- a/ext/mbstring/tests/mb_strtolower_variation2.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test mb_strtolower() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
- * Description: Returns a lowercased version of $sourcestring
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types to $encoding argument to test behaviour of mb_strtolower()
- * Where possible, 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing mb_strtolower() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$sourcestring = 'Hello, World';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strtolower()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = mb_strtolower($sourcestring, $input);
- if ($res === false || $res == NULL) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strtolower() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_strtolower(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_strtolower(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strtolower(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strtolower(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strtolower(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strtolower(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_strtolower(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strtolower(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 11 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 12 --
-
-Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 19 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 20 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 21 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 22 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 23 --
-string(24) "68656c6c6f2c20776f726c64"
-
--- Iteration 24 --
-
-Warning: mb_strtolower() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strtoupper_variation1.phpt b/ext/mbstring/tests/mb_strtoupper_variation1.phpt
deleted file mode 100644
index 3bf6e18103..0000000000
--- a/ext/mbstring/tests/mb_strtoupper_variation1.phpt
+++ /dev/null
@@ -1,180 +0,0 @@
---TEST--
-Test mb_strtoupper() function : usage varitations - pass different data types as $sourcestring arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
- * Description: Returns a uppercased version of $sourcestring
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- *
- * Pass different data types as $sourcestring argument to mb_strtoupper to test behaviour
- */
-
-echo "*** Testing mb_strtoupper() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-
-//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 $sourcestring 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*/ "",
- '',
-
- // string data
-/*18*/ "String",
- 'String',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strtoupper()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_strtoupper($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strtoupper() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(12) "123456789000"
-
--- Iteration 8 --
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(6) "STRING"
-
--- Iteration 19 --
-string(6) "STRING"
-
--- Iteration 20 --
-string(12) "HELLO, WORLD"
-
--- Iteration 21 --
-string(14) "CLASS A OBJECT"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: mb_strtoupper() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_strtoupper_variation2.phpt b/ext/mbstring/tests/mb_strtoupper_variation2.phpt
deleted file mode 100644
index 498f94fba4..0000000000
--- a/ext/mbstring/tests/mb_strtoupper_variation2.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test mb_strtoupper() function : usage varitations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
- * Description: Returns a uppercased version of $sourcestring
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $encoding argument to mb_strtoupper() to test behaviour
- * Where possible, 'UTF-8' is entered as string value
- */
-
-echo "*** Testing mb_strtoupper() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$sourcestring = 'Hello, World';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_strtoupper()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = mb_strtoupper($sourcestring, $input);
- if ($res === false || $res == NULL) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_strtoupper() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_strtoupper(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_strtoupper(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_strtoupper(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_strtoupper(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_strtoupper(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_strtoupper(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_strtoupper(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_strtoupper(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 11 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 12 --
-
-Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 19 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 20 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 21 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 22 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 23 --
-string(24) "48454c4c4f2c20574f524c44"
-
--- Iteration 24 --
-
-Warning: mb_strtoupper() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_substr_count_variation1.phpt b/ext/mbstring/tests/mb_substr_count_variation1.phpt
deleted file mode 100644
index 86efcadad9..0000000000
--- a/ext/mbstring/tests/mb_substr_count_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test mb_substr_count() function : usage variations - Pass different data types as $haystack arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype :int mb_substr_count(string $haystack, string $needle [, string $encoding])
- * Description: Count the number of substring occurrences
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $haystack argument to mb_substr_count() to test behaviour
- */
-
-echo "*** Testing mb_substr_count() : usage variations ***\n";
-
-
-// Initialise function arguments not being substituted
-$needle = 'world';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "hello, world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello, world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $haystack 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*/ "",
- '',
-
- // string data
-/*18*/ "hello, world",
- 'hello, world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_substr_count()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_substr_count($input, $needle) );
- $iterator++;
-};
-
-fclose($fp);
-
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_substr_count() : usage variations ***
-
--- Iteration 1 --
-int(0)
-
--- Iteration 2 --
-int(0)
-
--- Iteration 3 --
-int(0)
-
--- Iteration 4 --
-int(0)
-
--- Iteration 5 --
-int(0)
-
--- Iteration 6 --
-int(0)
-
--- Iteration 7 --
-int(0)
-
--- Iteration 8 --
-int(0)
-
--- Iteration 9 --
-int(0)
-
--- Iteration 10 --
-int(0)
-
--- Iteration 11 --
-int(0)
-
--- Iteration 12 --
-int(0)
-
--- Iteration 13 --
-int(0)
-
--- Iteration 14 --
-int(0)
-
--- Iteration 15 --
-int(0)
-
--- Iteration 16 --
-int(0)
-
--- Iteration 17 --
-int(0)
-
--- Iteration 18 --
-int(1)
-
--- Iteration 19 --
-int(1)
-
--- Iteration 20 --
-int(1)
-
--- Iteration 21 --
-int(1)
-
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(0)
-
--- Iteration 24 --
-
-Warning: mb_substr_count() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_substr_count_variation2.phpt b/ext/mbstring/tests/mb_substr_count_variation2.phpt
deleted file mode 100644
index 48dd675fda..0000000000
--- a/ext/mbstring/tests/mb_substr_count_variation2.phpt
+++ /dev/null
@@ -1,196 +0,0 @@
---TEST--
-Test mb_substr_count() function : usage variations - pass different data types as $needle arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
- * Description: Count the number of substring occurrences
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $needle to mb_substr_count() to test behaviour
- */
-
-echo "*** Testing mb_substr_count() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'hello, world';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $needle 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*/ "",
- '',
-
- // string data
-/*18*/ "world",
- 'world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_substr_count()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_substr_count($haystack, $input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_substr_count() : usage variations ***
-
--- Iteration 1 --
-int(0)
-
--- Iteration 2 --
-int(0)
-
--- Iteration 3 --
-int(0)
-
--- Iteration 4 --
-int(0)
-
--- Iteration 5 --
-int(0)
-
--- Iteration 6 --
-int(0)
-
--- Iteration 7 --
-int(0)
-
--- Iteration 8 --
-int(0)
-
--- Iteration 9 --
-int(0)
-
--- Iteration 10 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 12 --
-int(0)
-
--- Iteration 13 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 14 --
-int(0)
-
--- Iteration 15 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(1)
-
--- Iteration 19 --
-int(1)
-
--- Iteration 20 --
-int(1)
-
--- Iteration 21 --
-int(1)
-
--- Iteration 22 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_substr_count(): Empty substring in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_substr_count() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_substr_count_variation3.phpt b/ext/mbstring/tests/mb_substr_count_variation3.phpt
deleted file mode 100644
index 2324ed0939..0000000000
--- a/ext/mbstring/tests/mb_substr_count_variation3.phpt
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test mb_substr_count() function :usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
- * Description: Count the number of substring occurrences
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $encoding argument to mb_substr_count() to test behaviour
- * Where possible, 'UTF-8' is entered as string value
- */
-
-echo "*** Testing mb_substr_count() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$haystack = 'hello, world';
-$needle = 'world';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_substr_count()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_substr_count($haystack, $needle, $input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_substr_count() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_substr_count(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_substr_count(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_substr_count(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_substr_count(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_substr_count(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_substr_count(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_substr_count(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_substr_count(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(1)
-
--- Iteration 19 --
-int(1)
-
--- Iteration 20 --
-int(1)
-
--- Iteration 21 --
-int(1)
-
--- Iteration 22 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_substr_count() expects parameter 3 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_substr_variation1.phpt b/ext/mbstring/tests/mb_substr_variation1.phpt
deleted file mode 100644
index 5fa4f25975..0000000000
--- a/ext/mbstring/tests/mb_substr_variation1.phpt
+++ /dev/null
@@ -1,180 +0,0 @@
---TEST--
-Test mb_substr() function : usage variations - pass unexpected arguments (including strings) in place of $str
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
- * Description: Returns part of a string
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $str to mb_substr() to test behaviour
- */
-
-echo "*** Testing mb_substr() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$start = 0;
-$length = 5;
-
-//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 $str 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_substr()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( mb_substr($input, $start, $length));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_substr() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(5) "12345"
-
--- Iteration 8 --
-string(5) "1.234"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(5) "strin"
-
--- Iteration 19 --
-string(5) "strin"
-
--- Iteration 20 --
-string(5) "hello"
-
--- Iteration 21 --
-string(5) "Class"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: mb_substr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/mbstring/tests/mb_substr_variation2.phpt b/ext/mbstring/tests/mb_substr_variation2.phpt
deleted file mode 100644
index d65774ab60..0000000000
--- a/ext/mbstring/tests/mb_substr_variation2.phpt
+++ /dev/null
@@ -1,226 +0,0 @@
---TEST--
-Test mb_substr() function : usage variations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
- * Description: Returns part of a string
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass different data types as $encoding argument to mb_substr() to test behaviour
- * Where possible, 'UTF-8' is entered as string value
- */
-
-echo "*** Testing mb_substr() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$str = 'string_val';
-$start = 1;
-$length = 5;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input 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*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_substr
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = mb_substr($str, $start, $length, $input);
- if ($res === false) {
- var_dump($res);
- }
- else {
- var_dump(bin2hex($res));
- }
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing mb_substr() : usage variations ***
-
--- Iteration 1 --
-
-Warning: mb_substr(): Unknown encoding "0" in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: mb_substr(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: mb_substr(): Unknown encoding "12345" in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: mb_substr(): Unknown encoding "-2345" in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: mb_substr(): Unknown encoding "10.5" in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: mb_substr(): Unknown encoding "-10.5" in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: mb_substr(): Unknown encoding "123456789000" in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: mb_substr(): Unknown encoding "1.23456789E-9" in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: mb_substr(): Unknown encoding "0.5" in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: mb_substr(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: mb_substr(): Unknown encoding "1" in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 18 --
-string(10) "7472696e67"
-
--- Iteration 19 --
-string(10) "7472696e67"
-
--- Iteration 20 --
-string(10) "7472696e67"
-
--- Iteration 21 --
-string(10) "7472696e67"
-
--- Iteration 22 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: mb_substr(): Unknown encoding "" in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: mb_substr() expects parameter 4 to be string, resource given in %s on line %d
-string(0) ""
-Done
diff --git a/ext/mbstring/tests/mb_substr_variation3.phpt b/ext/mbstring/tests/mb_substr_variation3.phpt
deleted file mode 100644
index 702bdda147..0000000000
--- a/ext/mbstring/tests/mb_substr_variation3.phpt
+++ /dev/null
@@ -1,445 +0,0 @@
---TEST--
-Test mb_substr() function : usage variations - test different encodings
---SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
- * Description: Returns part of a string
- * Source code: ext/mbstring/mbstring.c
- */
-
-/*
- * Pass all encodings listed on php.net to test that function recognises them.
- * NB: The strings passed are *NOT* necessarily encoded in the encoding passed to the function.
- * This test is purely to see whether the function recognises the encoding.
- */
-
-echo "*** Testing mb_substr() : usage variations ***\n";
-
-$encoding = array('UCS-4', /*1*/
- 'UCS-4BE',
- 'UCS-4LE',
- 'UCS-2',
- 'UCS-2BE', /*5*/
- 'UCS-2LE',
- 'UTF-32',
- 'UTF-32BE',
- 'UTF-32LE',
- 'UTF-16', /*10*/
- 'UTF-16BE',
- 'UTF-16LE',
- 'UTF-7',
- 'UTF7-IMAP',
- 'UTF-8', /*15*/
- 'ASCII',
- 'EUC-JP',
- 'SJIS',
- 'eucJP-win',
- 'SJIS-win', /*20*/
- 'ISO-2022-JP',
- 'JIS',
- 'ISO-8859-1',
- 'ISO-8859-2',
- 'ISO-8859-3', /*25*/
- 'ISO-8859-4',
- 'ISO-8859-5',
- 'ISO-8859-6',
- 'ISO-8859-7',
- 'ISO-8859-8', /*30*/
- 'ISO-8859-9',
- 'ISO-8859-10',
- 'ISO-8859-13',
- 'ISO-8859-14',
- 'ISO-8859-15', /*35*/
- 'byte2be',
- 'byte2le',
- 'byte4be',
- 'byte4le',
- 'BASE64', /*40*/
- 'HTML-ENTITIES',
- '7bit',
- '8bit',
- 'EUC-CN',
- 'CP936', /*45*/
- 'HZ',
- 'EUC-TW',
- 'CP950',
- 'BIG-5',
- 'EUC-KR', /*50*/
- 'UHC',
- 'ISO-2022-KR',
- 'Windows-1251',
- 'Windows-1252',
- 'CP866', /*55*/
- 'KOI8-R'); /*56*/
-
-
-
-$iterator = 1;
-$string_ascii = 'abc def';
-//Japanese string encoded in UTF-8
-$string_mb = base64_decode('44K/44OT44Ol44Os44O844OG44Kj44Oz44Kw44O744Oe44K344O844Oz44O744Kr44Oz44OR44OL44O8');
-
-foreach($encoding as $enc) {
- echo "\n-- Iteration $iterator: $enc --\n";
-
- echo "-- ASCII String --\n";
- if (mb_substr($string_ascii, 1, 5, $enc)) {
- echo "Encoding $enc recognised\n";
- } else {
- echo "Encoding $enc not recognised\n";
- }
-
- echo "-- Multibyte String --\n";
- if (mb_substr($string_mb, 1, 5, $enc)) {
- echo "Encoding $enc recognised\n";
- } else {
- echo "Encoding $enc not recognised\n";
- }
-}
-
-echo "Done";
-?>
---EXPECT--
-*** Testing mb_substr() : usage variations ***
-
--- Iteration 1: UCS-4 --
--- ASCII String --
-Encoding UCS-4 recognised
--- Multibyte String --
-Encoding UCS-4 recognised
-
--- Iteration 1: UCS-4BE --
--- ASCII String --
-Encoding UCS-4BE recognised
--- Multibyte String --
-Encoding UCS-4BE recognised
-
--- Iteration 1: UCS-4LE --
--- ASCII String --
-Encoding UCS-4LE recognised
--- Multibyte String --
-Encoding UCS-4LE recognised
-
--- Iteration 1: UCS-2 --
--- ASCII String --
-Encoding UCS-2 recognised
--- Multibyte String --
-Encoding UCS-2 recognised
-
--- Iteration 1: UCS-2BE --
--- ASCII String --
-Encoding UCS-2BE recognised
--- Multibyte String --
-Encoding UCS-2BE recognised
-
--- Iteration 1: UCS-2LE --
--- ASCII String --
-Encoding UCS-2LE recognised
--- Multibyte String --
-Encoding UCS-2LE recognised
-
--- Iteration 1: UTF-32 --
--- ASCII String --
-Encoding UTF-32 recognised
--- Multibyte String --
-Encoding UTF-32 recognised
-
--- Iteration 1: UTF-32BE --
--- ASCII String --
-Encoding UTF-32BE recognised
--- Multibyte String --
-Encoding UTF-32BE recognised
-
--- Iteration 1: UTF-32LE --
--- ASCII String --
-Encoding UTF-32LE recognised
--- Multibyte String --
-Encoding UTF-32LE recognised
-
--- Iteration 1: UTF-16 --
--- ASCII String --
-Encoding UTF-16 recognised
--- Multibyte String --
-Encoding UTF-16 recognised
-
--- Iteration 1: UTF-16BE --
--- ASCII String --
-Encoding UTF-16BE recognised
--- Multibyte String --
-Encoding UTF-16BE recognised
-
--- Iteration 1: UTF-16LE --
--- ASCII String --
-Encoding UTF-16LE recognised
--- Multibyte String --
-Encoding UTF-16LE recognised
-
--- Iteration 1: UTF-7 --
--- ASCII String --
-Encoding UTF-7 recognised
--- Multibyte String --
-Encoding UTF-7 recognised
-
--- Iteration 1: UTF7-IMAP --
--- ASCII String --
-Encoding UTF7-IMAP recognised
--- Multibyte String --
-Encoding UTF7-IMAP recognised
-
--- Iteration 1: UTF-8 --
--- ASCII String --
-Encoding UTF-8 recognised
--- Multibyte String --
-Encoding UTF-8 recognised
-
--- Iteration 1: ASCII --
--- ASCII String --
-Encoding ASCII recognised
--- Multibyte String --
-Encoding ASCII recognised
-
--- Iteration 1: EUC-JP --
--- ASCII String --
-Encoding EUC-JP recognised
--- Multibyte String --
-Encoding EUC-JP recognised
-
--- Iteration 1: SJIS --
--- ASCII String --
-Encoding SJIS recognised
--- Multibyte String --
-Encoding SJIS recognised
-
--- Iteration 1: eucJP-win --
--- ASCII String --
-Encoding eucJP-win recognised
--- Multibyte String --
-Encoding eucJP-win recognised
-
--- Iteration 1: SJIS-win --
--- ASCII String --
-Encoding SJIS-win recognised
--- Multibyte String --
-Encoding SJIS-win recognised
-
--- Iteration 1: ISO-2022-JP --
--- ASCII String --
-Encoding ISO-2022-JP recognised
--- Multibyte String --
-Encoding ISO-2022-JP recognised
-
--- Iteration 1: JIS --
--- ASCII String --
-Encoding JIS recognised
--- Multibyte String --
-Encoding JIS recognised
-
--- Iteration 1: ISO-8859-1 --
--- ASCII String --
-Encoding ISO-8859-1 recognised
--- Multibyte String --
-Encoding ISO-8859-1 recognised
-
--- Iteration 1: ISO-8859-2 --
--- ASCII String --
-Encoding ISO-8859-2 recognised
--- Multibyte String --
-Encoding ISO-8859-2 recognised
-
--- Iteration 1: ISO-8859-3 --
--- ASCII String --
-Encoding ISO-8859-3 recognised
--- Multibyte String --
-Encoding ISO-8859-3 recognised
-
--- Iteration 1: ISO-8859-4 --
--- ASCII String --
-Encoding ISO-8859-4 recognised
--- Multibyte String --
-Encoding ISO-8859-4 recognised
-
--- Iteration 1: ISO-8859-5 --
--- ASCII String --
-Encoding ISO-8859-5 recognised
--- Multibyte String --
-Encoding ISO-8859-5 recognised
-
--- Iteration 1: ISO-8859-6 --
--- ASCII String --
-Encoding ISO-8859-6 recognised
--- Multibyte String --
-Encoding ISO-8859-6 recognised
-
--- Iteration 1: ISO-8859-7 --
--- ASCII String --
-Encoding ISO-8859-7 recognised
--- Multibyte String --
-Encoding ISO-8859-7 recognised
-
--- Iteration 1: ISO-8859-8 --
--- ASCII String --
-Encoding ISO-8859-8 recognised
--- Multibyte String --
-Encoding ISO-8859-8 recognised
-
--- Iteration 1: ISO-8859-9 --
--- ASCII String --
-Encoding ISO-8859-9 recognised
--- Multibyte String --
-Encoding ISO-8859-9 recognised
-
--- Iteration 1: ISO-8859-10 --
--- ASCII String --
-Encoding ISO-8859-10 recognised
--- Multibyte String --
-Encoding ISO-8859-10 recognised
-
--- Iteration 1: ISO-8859-13 --
--- ASCII String --
-Encoding ISO-8859-13 recognised
--- Multibyte String --
-Encoding ISO-8859-13 recognised
-
--- Iteration 1: ISO-8859-14 --
--- ASCII String --
-Encoding ISO-8859-14 recognised
--- Multibyte String --
-Encoding ISO-8859-14 recognised
-
--- Iteration 1: ISO-8859-15 --
--- ASCII String --
-Encoding ISO-8859-15 recognised
--- Multibyte String --
-Encoding ISO-8859-15 recognised
-
--- Iteration 1: byte2be --
--- ASCII String --
-Encoding byte2be recognised
--- Multibyte String --
-Encoding byte2be recognised
-
--- Iteration 1: byte2le --
--- ASCII String --
-Encoding byte2le recognised
--- Multibyte String --
-Encoding byte2le recognised
-
--- Iteration 1: byte4be --
--- ASCII String --
-Encoding byte4be recognised
--- Multibyte String --
-Encoding byte4be recognised
-
--- Iteration 1: byte4le --
--- ASCII String --
-Encoding byte4le recognised
--- Multibyte String --
-Encoding byte4le recognised
-
--- Iteration 1: BASE64 --
--- ASCII String --
-Encoding BASE64 recognised
--- Multibyte String --
-Encoding BASE64 recognised
-
--- Iteration 1: HTML-ENTITIES --
--- ASCII String --
-Encoding HTML-ENTITIES recognised
--- Multibyte String --
-Encoding HTML-ENTITIES recognised
-
--- Iteration 1: 7bit --
--- ASCII String --
-Encoding 7bit recognised
--- Multibyte String --
-Encoding 7bit recognised
-
--- Iteration 1: 8bit --
--- ASCII String --
-Encoding 8bit recognised
--- Multibyte String --
-Encoding 8bit recognised
-
--- Iteration 1: EUC-CN --
--- ASCII String --
-Encoding EUC-CN recognised
--- Multibyte String --
-Encoding EUC-CN recognised
-
--- Iteration 1: CP936 --
--- ASCII String --
-Encoding CP936 recognised
--- Multibyte String --
-Encoding CP936 recognised
-
--- Iteration 1: HZ --
--- ASCII String --
-Encoding HZ recognised
--- Multibyte String --
-Encoding HZ recognised
-
--- Iteration 1: EUC-TW --
--- ASCII String --
-Encoding EUC-TW recognised
--- Multibyte String --
-Encoding EUC-TW recognised
-
--- Iteration 1: CP950 --
--- ASCII String --
-Encoding CP950 recognised
--- Multibyte String --
-Encoding CP950 recognised
-
--- Iteration 1: BIG-5 --
--- ASCII String --
-Encoding BIG-5 recognised
--- Multibyte String --
-Encoding BIG-5 recognised
-
--- Iteration 1: EUC-KR --
--- ASCII String --
-Encoding EUC-KR recognised
--- Multibyte String --
-Encoding EUC-KR recognised
-
--- Iteration 1: UHC --
--- ASCII String --
-Encoding UHC recognised
--- Multibyte String --
-Encoding UHC recognised
-
--- Iteration 1: ISO-2022-KR --
--- ASCII String --
-Encoding ISO-2022-KR recognised
--- Multibyte String --
-Encoding ISO-2022-KR recognised
-
--- Iteration 1: Windows-1251 --
--- ASCII String --
-Encoding Windows-1251 recognised
--- Multibyte String --
-Encoding Windows-1251 recognised
-
--- Iteration 1: Windows-1252 --
--- ASCII String --
-Encoding Windows-1252 recognised
--- Multibyte String --
-Encoding Windows-1252 recognised
-
--- Iteration 1: CP866 --
--- ASCII String --
-Encoding CP866 recognised
--- Multibyte String --
-Encoding CP866 recognised
-
--- Iteration 1: KOI8-R --
--- ASCII String --
-Encoding KOI8-R recognised
--- Multibyte String --
-Encoding KOI8-R recognised
-Done
diff --git a/ext/posix/tests/posix_getgrgid_variation.phpt b/ext/posix/tests/posix_getgrgid_variation.phpt
deleted file mode 100644
index 9bf807ad14..0000000000
--- a/ext/posix/tests/posix_getgrgid_variation.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test posix_getgrgid() function : usage variations - parameter types
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto array posix_getgrgid(long gid)
- * Description: Group database access (POSIX.1, 9.2.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getgrgid() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for gid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- $result = posix_getgrgid($value);
- if ((is_array($result) && (count($result) == 4))
- ||
- ($result === false)) {
- echo "valid output\n";
- } else {
- var_dump($result);
- }
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getgrgid() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-valid output
-
-Arg value -10.5
-valid output
-
-Arg value 101234567000
-
-Warning: posix_getgrgid() expects parameter 1 to be int, float given in %s on line %d
-valid output
-
-Arg value 1.07654321E-9
-valid output
-
-Arg value 0.5
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getpgid_variation.phpt b/ext/posix/tests/posix_getpgid_variation.phpt
deleted file mode 100644
index 6a5e7fd5a9..0000000000
--- a/ext/posix/tests/posix_getpgid_variation.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test posix_getpgid() function : variation
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die("skip - 32-bit only");
-if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) {
- print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getpgid(void)
- * Description: Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getpgid() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for gid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- $result = posix_getpgid($value);
- if (is_int($result) || $result === false) {
- echo "valid output\n";
- } else {
- var_dump($result);
- }
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getpgid() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-valid output
-
-Arg value -10.5
-valid output
-
-Arg value 101234567000
-
-Warning: posix_getpgid() expects parameter 1 to be int, float given in %s on line %d
-valid output
-
-Arg value 1.07654321E-9
-valid output
-
-Arg value 0.5
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getpwuid_variation.phpt b/ext/posix/tests/posix_getpwuid_variation.phpt
deleted file mode 100644
index ca57d2cc83..0000000000
--- a/ext/posix/tests/posix_getpwuid_variation.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test posix_getpwuid() function : usage variations - parameter types
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto array posix_getpwuid(long uid)
- * Description: User database access (POSIX.1, 9.2.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getpwuid() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for uid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- $result = posix_getpwuid($value);
- if ((is_array($result) && (count($result) == 7))
- ||
- ($result === false)) {
- echo "valid output\n";
- } else {
- var_dump($result);
- }
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getpwuid() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-valid output
-
-Arg value -10.5
-valid output
-
-Arg value 101234567000
-
-Warning: posix_getpwuid() expects parameter 1 to be int, float given in %s on line %d
-valid output
-
-Arg value 1.07654321E-9
-valid output
-
-Arg value 0.5
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_kill_variation1.phpt b/ext/posix/tests/posix_kill_variation1.phpt
deleted file mode 100644
index 25a123cf04..0000000000
--- a/ext/posix/tests/posix_kill_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test posix_kill() function : usage variations - first parameter type
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto bool posix_kill(int pid, int sig)
- * Description: Send a signal to a process (POSIX.1, 3.3.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_kill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$sig = -999;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for pid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( posix_kill($value, $sig) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_kill() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-
-Warning: posix_kill() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_kill_variation2.phpt b/ext/posix/tests/posix_kill_variation2.phpt
deleted file mode 100644
index 8ca0d9f3c2..0000000000
--- a/ext/posix/tests/posix_kill_variation2.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test posix_kill() function : usage variations - second parameter type
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto bool posix_kill(int pid, int sig)
- * Description: Send a signal to a process (POSIX.1, 3.3.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_kill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pid = -999;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for sig
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( posix_kill($pid, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_kill() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-
-Warning: posix_kill() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_seteuid_variation3.phpt b/ext/posix/tests/posix_seteuid_variation3.phpt
deleted file mode 100644
index d4c16514e3..0000000000
--- a/ext/posix/tests/posix_seteuid_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_seteuid() by substituting argument 1 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
- 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 emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_seteuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_setgid_variation3.phpt b/ext/posix/tests/posix_setgid_variation3.phpt
deleted file mode 100644
index 92580c9373..0000000000
--- a/ext/posix/tests/posix_setgid_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_setgid() by substituting argument 1 with emptyUnsetUndefNull values.
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
- if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setgid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_setuid_variation3.phpt b/ext/posix/tests/posix_setuid_variation3.phpt
deleted file mode 100644
index 0336865062..0000000000
--- a/ext/posix/tests/posix_setuid_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_setuid() by substituting argument 1 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
- 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 emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt
deleted file mode 100644
index e8da057c7f..0000000000
--- a/ext/posix/tests/posix_strerror_variation1.phpt
+++ /dev/null
@@ -1,181 +0,0 @@
---TEST--
-Test posix_strerror() function : usage variations
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto string posix_strerror(int errno)
- * Description: Retrieve the system error message associated with the given errno.
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_strerror() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for errno
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- echo gettype( posix_strerror($value) )."\n";
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_strerror() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-string
-
-Arg value -10.5
-string
-
-Arg value 101234567000
-
-Warning: posix_strerror() expects parameter 1 to be int, float given in %s on line %d
-boolean
-
-Arg value 1.07654321E-9
-string
-
-Arg value 0.5
-string
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Arg value
-string
-
-Arg value
-string
-
-Arg value 1
-string
-
-Arg value
-string
-
-Arg value 1
-string
-
-Arg value
-string
-
-Arg value
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value string
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value string
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value
-string
-
-Arg value
-string
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/session/tests/session_commit_error.phpt b/ext/session/tests/session_commit_error.phpt
deleted file mode 100644
index c71cee34eb..0000000000
--- a/ext/session/tests/session_commit_error.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test session_commit() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : bool session_commit(void)
- * Description : Write session data and end session
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_commit() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_commit($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_commit() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 2 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 3 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 4 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 5 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 6 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 7 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 8 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 9 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 10 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 11 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 12 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 13 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 14 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 15 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 16 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 17 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 18 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 19 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 20 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 21 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 22 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 23 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 24 --
-
-Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-Done
diff --git a/ext/session/tests/session_decode_error.phpt b/ext/session/tests/session_decode_error.phpt
deleted file mode 100644
index 72bc25976b..0000000000
--- a/ext/session/tests/session_decode_error.phpt
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test session_decode() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : string session_decode(void)
- * Description : Decodes session data from a string
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_decode() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-var_dump(session_start());
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_decode($input));
- var_dump($_SESSION);
- $iterator++;
-};
-
-var_dump(session_destroy());
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_decode() : error functionality ***
-bool(true)
-
--- Iteration 1 --
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-bool(true)
-array(0) {
-}
-
--- Iteration 3 --
-bool(true)
-array(0) {
-}
-
--- Iteration 4 --
-bool(true)
-array(0) {
-}
-
--- Iteration 5 --
-bool(true)
-array(0) {
-}
-
--- Iteration 6 --
-bool(true)
-array(0) {
-}
-
--- Iteration 7 --
-bool(true)
-array(0) {
-}
-
--- Iteration 8 --
-bool(true)
-array(0) {
-}
-
--- Iteration 9 --
-bool(true)
-array(0) {
-}
-
--- Iteration 10 --
-bool(true)
-array(0) {
-}
-
--- Iteration 11 --
-bool(true)
-array(0) {
-}
-
--- Iteration 12 --
-bool(true)
-array(0) {
-}
-
--- Iteration 13 --
-bool(true)
-array(0) {
-}
-
--- Iteration 14 --
-bool(true)
-array(0) {
-}
-
--- Iteration 15 --
-bool(true)
-array(0) {
-}
-
--- Iteration 16 --
-bool(true)
-array(0) {
-}
-
--- Iteration 17 --
-bool(true)
-array(0) {
-}
-
--- Iteration 18 --
-bool(true)
-array(0) {
-}
-
--- Iteration 19 --
-bool(true)
-array(0) {
-}
-
--- Iteration 20 --
-bool(true)
-array(0) {
-}
-
--- Iteration 21 --
-bool(true)
-array(0) {
-}
-
--- Iteration 22 --
-bool(true)
-array(0) {
-}
-
--- Iteration 23 --
-bool(true)
-array(0) {
-}
-
--- Iteration 24 --
-
-Warning: session_decode() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-array(0) {
-}
-bool(true)
-Done
diff --git a/ext/session/tests/session_encode_error.phpt b/ext/session/tests/session_encode_error.phpt
deleted file mode 100644
index bbd26f92f7..0000000000
--- a/ext/session/tests/session_encode_error.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test session_encode() function : basic functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : string session_encode(void)
- * Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_encode() : basic functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-session_start();
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_encode($input));
- $iterator++;
-};
-
-session_destroy();
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_encode() : basic functionality ***
-
--- Iteration 1 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/session/tests/session_get_cookie_params_error.phpt b/ext/session/tests/session_get_cookie_params_error.phpt
deleted file mode 100644
index d5b987fb57..0000000000
--- a/ext/session/tests/session_get_cookie_params_error.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test session_get_cookie_params() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : array session_get_cookie_params(void)
- * Description : Get the session cookie parameters
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_get_cookie_params() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_get_cookie_params($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_get_cookie_params() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/session/tests/session_id_error.phpt b/ext/session/tests/session_id_error.phpt
deleted file mode 100644
index 7a323bc3c1..0000000000
--- a/ext/session/tests/session_id_error.phpt
+++ /dev/null
@@ -1,171 +0,0 @@
---TEST--
-Test session_id() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : string session_id([string $id])
- * Description : Get and/or set the current session id
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_id() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_id($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_id() : error functionality ***
-
--- Iteration 1 --
-string(0) ""
-
--- Iteration 2 --
-string(1) "0"
-
--- Iteration 3 --
-string(1) "1"
-
--- Iteration 4 --
-string(5) "12345"
-
--- Iteration 5 --
-string(5) "-2345"
-
--- Iteration 6 --
-string(4) "10.5"
-
--- Iteration 7 --
-string(5) "-10.5"
-
--- Iteration 8 --
-string(12) "123456789000"
-
--- Iteration 9 --
-string(13) "1.23456789E-9"
-
--- Iteration 10 --
-string(3) "0.5"
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(0) ""
-
--- Iteration 13 --
-string(1) "1"
-
--- Iteration 14 --
-string(0) ""
-
--- Iteration 15 --
-string(1) "1"
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(0) ""
-
--- Iteration 19 --
-string(7) "Nothing"
-
--- Iteration 20 --
-string(7) "Nothing"
-
--- Iteration 21 --
-string(12) "Hello World!"
-
--- Iteration 22 --
-string(12) "Hello World!"
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: session_id() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/session/tests/session_module_name_error.phpt b/ext/session/tests/session_module_name_error.phpt
deleted file mode 100644
index 6940445969..0000000000
--- a/ext/session/tests/session_module_name_error.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test session_module_name() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : string session_module_name([string $module])
- * Description : Get and/or set the current session module
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_module_name() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_module_name($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_module_name() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_module_name(): Cannot find named PHP session module (0) in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: session_module_name(): Cannot find named PHP session module (12345) in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: session_module_name(): Cannot find named PHP session module (-2345) in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: session_module_name(): Cannot find named PHP session module (10.5) in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: session_module_name(): Cannot find named PHP session module (-10.5) in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: session_module_name(): Cannot find named PHP session module (123456789000) in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: session_module_name(): Cannot find named PHP session module (1.23456789E-9) in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: session_module_name(): Cannot find named PHP session module (0.5) in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: session_module_name(): Cannot find named PHP session module (Nothing) in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: session_module_name(): Cannot find named PHP session module (Nothing) in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: session_module_name(): Cannot find named PHP session module (Hello World!) in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: session_module_name(): Cannot find named PHP session module (Hello World!) in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: session_module_name() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt
deleted file mode 100644
index 641d8b6b93..0000000000
--- a/ext/session/tests/session_name_error.phpt
+++ /dev/null
@@ -1,236 +0,0 @@
---TEST--
-Test session_name() function : error functionality
---INI--
-session.save_path=
-session.name=PHPSESSID
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : string session_name([string $name])
- * Description : Get and/or set the current session name
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_name() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump($input, session_name($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_name() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '0' in %s on line %d
-int(0)
-string(9) "PHPSESSID"
-
--- Iteration 2 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d
-int(1)
-string(9) "PHPSESSID"
-
--- Iteration 3 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '12345' in %s on line %d
-int(12345)
-string(9) "PHPSESSID"
-
--- Iteration 4 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '-2345' in %s on line %d
-int(-2345)
-string(9) "PHPSESSID"
-
--- Iteration 5 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '10.5' in %s on line %d
-float(10.5)
-string(9) "PHPSESSID"
-
--- Iteration 6 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '-10.5' in %s on line %d
-float(-10.5)
-string(9) "PHPSESSID"
-
--- Iteration 7 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '123456789000' in %s on line %d
-float(123456789000)
-string(9) "PHPSESSID"
-
--- Iteration 8 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '1.23456789E-9' in %s on line %d
-float(1.23456789E-9)
-string(9) "PHPSESSID"
-
--- Iteration 9 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '0.5' in %s on line %d
-float(0.5)
-string(9) "PHPSESSID"
-
--- Iteration 10 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-NULL
-string(9) "PHPSESSID"
-
--- Iteration 11 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-NULL
-string(9) "PHPSESSID"
-
--- Iteration 12 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d
-bool(true)
-string(9) "PHPSESSID"
-
--- Iteration 13 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-bool(false)
-string(9) "PHPSESSID"
-
--- Iteration 14 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d
-bool(true)
-string(9) "PHPSESSID"
-
--- Iteration 15 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-bool(false)
-string(9) "PHPSESSID"
-
--- Iteration 16 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-string(0) ""
-string(9) "PHPSESSID"
-
--- Iteration 17 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-string(0) ""
-string(9) "PHPSESSID"
-
--- Iteration 18 --
-string(7) "Nothing"
-string(9) "PHPSESSID"
-
--- Iteration 19 --
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 20 --
-string(12) "Hello World!"
-string(7) "Nothing"
-
--- Iteration 21 --
-object(classA)#1 (0) {
-}
-string(12) "Hello World!"
-
--- Iteration 22 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-NULL
-string(12) "Hello World!"
-
--- Iteration 23 --
-
-Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d
-NULL
-string(12) "Hello World!"
-
--- Iteration 24 --
-
-Warning: session_name() expects parameter 1 to be string, resource given in %s on line %d
-resource(%d) of type (stream)
-NULL
-Done
diff --git a/ext/session/tests/session_regenerate_id_error.phpt b/ext/session/tests/session_regenerate_id_error.phpt
deleted file mode 100644
index b3def66b53..0000000000
--- a/ext/session/tests/session_regenerate_id_error.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test session_regenerate_id() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : bool session_regenerate_id([bool $delete_old_session])
- * Description : Update the current session id with a newly generated one
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_regenerate_id() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_regenerate_id($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_regenerate_id() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: session_regenerate_id() expects parameter 1 to be bool, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: session_regenerate_id() expects parameter 1 to be bool, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/session/tests/session_save_path_error.phpt b/ext/session/tests/session_save_path_error.phpt
deleted file mode 100644
index 1df2c76cce..0000000000
--- a/ext/session/tests/session_save_path_error.phpt
+++ /dev/null
@@ -1,176 +0,0 @@
---TEST--
-Test session_save_path() function : error functionality
---INI--
-session.gc_probability=0
-session.save_path=
-session.name=PHPSESSID
-session.save_handler=files
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : string session_save_path([string $path])
- * Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_save_path() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_save_path($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_save_path() : error functionality ***
-
--- Iteration 1 --
-string(0) ""
-
--- Iteration 2 --
-string(1) "0"
-
--- Iteration 3 --
-string(1) "1"
-
--- Iteration 4 --
-string(5) "12345"
-
--- Iteration 5 --
-string(5) "-2345"
-
--- Iteration 6 --
-string(4) "10.5"
-
--- Iteration 7 --
-string(5) "-10.5"
-
--- Iteration 8 --
-string(12) "123456789000"
-
--- Iteration 9 --
-string(13) "1.23456789E-9"
-
--- Iteration 10 --
-string(3) "0.5"
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(0) ""
-
--- Iteration 13 --
-string(1) "1"
-
--- Iteration 14 --
-string(0) ""
-
--- Iteration 15 --
-string(1) "1"
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(0) ""
-
--- Iteration 19 --
-string(7) "Nothing"
-
--- Iteration 20 --
-string(7) "Nothing"
-
--- Iteration 21 --
-string(12) "Hello World!"
-
--- Iteration 22 --
-string(12) "Hello World!"
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: session_save_path() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/session/tests/session_start_error.phpt b/ext/session/tests/session_start_error.phpt
deleted file mode 100644
index c81a7d2fde..0000000000
--- a/ext/session/tests/session_start_error.phpt
+++ /dev/null
@@ -1,290 +0,0 @@
---TEST--
-Test session_start() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : bool session_start(void)
- * Description : Initialize session data
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_start() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_start($input));
- var_dump(session_destroy());
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_start() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: session_start() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: session_start() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: session_start() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: session_start() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: session_start() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: session_start() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: session_start() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: session_start() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: session_start() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: session_start() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: session_start() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: session_start() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: session_start() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Warning: session_start() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: session_start() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: session_start() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
-bool(false)
-Done
diff --git a/ext/session/tests/session_unset_error.phpt b/ext/session/tests/session_unset_error.phpt
deleted file mode 100644
index c411cffa46..0000000000
--- a/ext/session/tests/session_unset_error.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test session_unset() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : void session_unset(void)
- * Description : Free all session variables
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_unset() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_unset($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_unset() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 2 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 3 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 4 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 5 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 6 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 7 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 8 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 9 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 10 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 11 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 12 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 13 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 14 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 15 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 16 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 17 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 18 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 19 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 20 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 21 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 22 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 23 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 24 --
-
-Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-Done
diff --git a/ext/session/tests/session_write_close_error.phpt b/ext/session/tests/session_write_close_error.phpt
deleted file mode 100644
index 5e48d8c000..0000000000
--- a/ext/session/tests/session_write_close_error.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test session_write_close() function : error functionality
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-ob_start();
-
-/*
- * Prototype : bool session_write_close(void)
- * Description : Write session data and end session
- * Source code : ext/session/session.c
- */
-
-echo "*** Testing session_write_close() : error functionality ***\n";
-
-// Get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class classA
-{
- public function __toString() {
- return "Hello World!";
- }
-}
-
-$heredoc = <<<EOT
-Hello World!
-EOT;
-
-$fp = fopen(__FILE__, "r");
-
-// Unexpected values to be passed as arguments
-$inputs = array(
-
- // Integer 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 strings
-/*16*/ "",
- '',
-
- // Invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // Object data
-/*21*/ new classA(),
-
- // Undefined data
-/*22*/ @$undefined_var,
-
- // Unset data
-/*23*/ @$unset_var,
-
- // Resource variable
-/*24*/ $fp
-);
-
-
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(session_write_close($input));
- $iterator++;
-};
-
-fclose($fp);
-echo "Done";
-ob_end_flush();
-?>
---EXPECTF--
-*** Testing session_write_close() : error functionality ***
-
--- Iteration 1 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 2 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 3 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 4 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 5 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 6 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 7 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 8 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 9 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 10 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 11 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 12 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 13 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 14 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 15 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 16 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 17 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 18 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 19 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 20 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 21 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 22 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 23 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-
--- Iteration 24 --
-
-Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82
-NULL
-Done
diff --git a/ext/spl/tests/class_implements_variation2.phpt b/ext/spl/tests/class_implements_variation2.phpt
deleted file mode 100644
index d63669fbec..0000000000
--- a/ext/spl/tests/class_implements_variation2.phpt
+++ /dev/null
@@ -1,259 +0,0 @@
---TEST--
-SPL: Test class_implements() function : variation
---FILE--
-<?php
-/* Prototype : array class_implements(mixed what [, bool autoload ])
- * Description: Return all classes and interfaces implemented by SPL
- * Source code: ext/spl/php_spl.c
- * Alias to functions:
- */
-
-echo "*** Testing class_implements() : variation ***\n";
-
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$class = 'Iterator';
-
-//resource
-$res = fopen(__FILE__,'r');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //resource
- 'resource' => $res,
-);
-
-// loop through each element of the array for pattern
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( class_implements($class, $value) );
-};
-
-fclose($res);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing class_implements() : variation ***
-
---int 0--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---int 1--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---int 12345--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---int -12345--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---float 10.5--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---float -10.5--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---float 12.3456789000e10--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---float -12.3456789000e10--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---float .5--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---empty array--
-Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---lowercase null--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---lowercase true--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---lowercase false--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---uppercase TRUE--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---uppercase FALSE--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---empty string DQ--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---empty string SQ--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---instance of classWithToString--
-Error: 2 - class_implements() expects parameter 2 to be bool, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - class_implements() expects parameter 2 to be bool, object given, %s(%d)
-bool(false)
-
---undefined var--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---unset var--
-array(1) {
- ["Traversable"]=>
- string(11) "Traversable"
-}
-
---resource--
-Error: 2 - class_implements() expects parameter 2 to be bool, resource given, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/spl/tests/class_uses_variation2.phpt b/ext/spl/tests/class_uses_variation2.phpt
deleted file mode 100644
index 6458bd178c..0000000000
--- a/ext/spl/tests/class_uses_variation2.phpt
+++ /dev/null
@@ -1,261 +0,0 @@
---TEST--
-SPL: Test class_uses() function : variation
---FILE--
-<?php
-/* Prototype : array class_uses(mixed what [, bool autoload ])
- * Description: Return all traits used by a class
- * Source code: ext/spl/php_spl.c
- * Alias to functions:
- */
-
-echo "*** Testing class_uses() : variation ***\n";
-
-trait foo {}
-class fooUser { use foo; }
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$class = 'fooUser';
-
-//resource
-$res = fopen(__FILE__,'r');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //resource
- 'resource' => $res,
-);
-
-// loop through each element of the array for pattern
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( class_uses($class, $value) );
-};
-
-fclose($res);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing class_uses() : variation ***
-
---int 0--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---int 1--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---int 12345--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---int -12345--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---float 10.5--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---float -10.5--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---float 12.3456789000e10--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---float -12.3456789000e10--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---float .5--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---empty array--
-Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---lowercase null--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---lowercase true--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---lowercase false--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---uppercase TRUE--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---uppercase FALSE--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---empty string DQ--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---empty string SQ--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---instance of classWithToString--
-Error: 2 - class_uses() expects parameter 2 to be bool, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - class_uses() expects parameter 2 to be bool, object given, %s(%d)
-bool(false)
-
---undefined var--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---unset var--
-array(1) {
- ["foo"]=>
- string(3) "foo"
-}
-
---resource--
-Error: 2 - class_uses() expects parameter 2 to be bool, resource given, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/array/array_change_key_case_variation1.phpt b/ext/standard/tests/array/array_change_key_case_variation1.phpt
deleted file mode 100644
index 14626deb86..0000000000
--- a/ext/standard/tests/array/array_change_key_case_variation1.phpt
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test array_change_key_case() function : usage variations - Pass different data types as $input arg
---FILE--
-<?php
-/* Prototype : array array_change_key_case(array $input [, int $case])
- * Description: Returns an array with all string keys lowercased [or uppercased]
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $input argument to test behaviour of array_change_key_case()
- */
-
-echo "*** Testing array_change_key_case() : usage variations ***\n";
-
-//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 $input 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 array_change_key_case()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_change_key_case($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_change_key_case_variation2.phpt b/ext/standard/tests/array/array_change_key_case_variation2.phpt
deleted file mode 100644
index b0b90bd926..0000000000
--- a/ext/standard/tests/array/array_change_key_case_variation2.phpt
+++ /dev/null
@@ -1,289 +0,0 @@
---TEST--
-Test array_change_key_case() function : usage variations - Pass different data types as $case arg
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : array array_change_key_case(array $input [, int $case])
- * Description: Returns an array with all string keys lowercased [or uppercased]
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $case argument to array_change_key_case() to test behaviour
- * Where possible, CASE_UPPER has been entered as a string value
- */
-
-echo "*** Testing array_change_key_case() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$array = array ('one' => 1, 'TWO' => 2, 'Three' => 3);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-CASE_UPPER
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $case 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*/ "CASE_UPPER",
- 'CASE_UPPER',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behavior of array_change_key_case()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_change_key_case($array, $input) );
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
--- Iteration 1 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 2 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 3 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 4 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 5 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 6 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 7 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 8 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 9 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 10 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 11 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 12 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 13 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 14 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 15 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 16 --
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_change_key_case() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 23 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-Done
diff --git a/ext/standard/tests/array/array_chunk_variation1.phpt b/ext/standard/tests/array/array_chunk_variation1.phpt
deleted file mode 100644
index e4437ccf1a..0000000000
--- a/ext/standard/tests/array/array_chunk_variation1.phpt
+++ /dev/null
@@ -1,325 +0,0 @@
---TEST--
-Test array_chunk() function : usage variations - unexpected values for 'array' argument
---FILE--
-<?php
-/* Prototype : proto array array_chunk(array $array, int $size [, bool $preserve_keys])
- * Description: Split array into chunks
- * Chunks an array into size large chunks.
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_chunk() function with unexpected values for 'array' argument
-*/
-
-echo "*** Testing array_chunk() : usage variations ***\n";
-
-// Initialise function arguments
-$size = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new stdclass(),
-
- // undefined data
-/*21*/ @undefined_var,
-
- // unset data
-/*22*/ @unset_var
-
-);
-
-$count = 1;
-// loop through each element of the array for input
-foreach($values as $value){
- echo "\n-- Iteration $count --\n";
- var_dump( array_chunk($value, $size) );
- var_dump( array_chunk($value, $size, true) );
- var_dump( array_chunk($value, $size, false) );
- $count++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_chunk_variation2.phpt b/ext/standard/tests/array/array_chunk_variation2.phpt
deleted file mode 100644
index ea6468cd8b..0000000000
--- a/ext/standard/tests/array/array_chunk_variation2.phpt
+++ /dev/null
@@ -1,429 +0,0 @@
---TEST--
-Test array_chunk() function : usage variations - unexpected values for 'size' argument
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
- * Description: Split array into chunks
- : Chunks an array into size large chunks
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_chunk() function with unexpected values for 'size' argument
-*/
-
-echo "*** Testing array_chunk() : usage variations ***\n";
-
-// input array
-$input = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array (
-
- // float data
-/*1*/ 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
-/*6*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
-
- // string data
-/*19*/ "string",
- 'string',
-
- // object data
-/*21*/ new stdclass(),
-
- // undefined data
-/*22*/ @undefined_var,
-
- // unset data
-/*23*/ @unset_var
-
-);
-
-// loop through each element of the array for size
-$count = 1;
-foreach($values as $value){
- echo "\n-- Iteration $count --\n";
- var_dump( array_chunk($input, $value) );
- var_dump( array_chunk($input, $value, true) );
- var_dump( array_chunk($input, $value, false) );
- $count++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 2 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 3 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 4 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 13 --
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
--- Iteration 14 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 15 --
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
--- Iteration 16 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_chunk() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_chunk_variation3.phpt b/ext/standard/tests/array/array_chunk_variation3.phpt
deleted file mode 100644
index 6492410c66..0000000000
--- a/ext/standard/tests/array/array_chunk_variation3.phpt
+++ /dev/null
@@ -1,268 +0,0 @@
---TEST--
-Test array_chunk() function : usage variations - unexpected values for 'preserve_keys'
---FILE--
-<?php
-/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
- * Description: Split array into chunks
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_chunk() function with unexpected values for 'preserve_keys'
-*/
-
-echo "*** Testing array_chunk() : usage variations ***\n";
-
-// input array
-$input = array(1, 2);
-$size = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // empty data
-/*12*/ "",
- '',
-
- // string data
-/*14*/ "string",
- 'string',
-
- // object data
-/*16*/ new stdclass(),
-
- // undefined data
-/*17*/ @undefined_var,
-
- // unset data
-/*18*/ @unset_var
-
-);
-
-$count = 1;
-
-// loop through each element of the array for preserve_keys
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump( array_chunk($input, $size, $value) );
- $count++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 2 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 3 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 4 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 5 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 6 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 7 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 8 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 10 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 11 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 12 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 13 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 14 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 15 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 16 --
-
-Warning: array_chunk() expects parameter 3 to be bool, object given in %s on line %d
-NULL
-
--- Iteration 17 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 18 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-Done
diff --git a/ext/standard/tests/array/array_combine_variation1.phpt b/ext/standard/tests/array/array_combine_variation1.phpt
deleted file mode 100644
index f9978f5476..0000000000
--- a/ext/standard/tests/array/array_combine_variation1.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test array_combine() function : usage variations - unexpected values for 'keys' argument
---FILE--
-<?php
-/* Prototype : array array_combine(array $keys, array $values)
- * Description: Creates an array by using the elements of the first parameter as keys
- * and the elements of the second as the corresponding values
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_combine() function by passing values to $keys argument other than arrays
-* and see that function emits proper warning messages wherever expected.
-* The $values argument passed is a fixed array.
-*/
-
-echo "*** Testing array_combine() : Passing non-array values to \$keys argument ***\n";
-
-// Initialise $values argument
-$values = array(1, 2);
-
-//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 $keys argument
-$keys_passed = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element within $keys_passed to check the behavior of array_combine()
-$iterator = 1;
-foreach($keys_passed as $keys) {
- echo "-- Iteration $iterator --\n";
- var_dump( array_combine($keys,$values) );
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_combine() : Passing non-array values to $keys argument ***
--- Iteration 1 --
-
-Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_combine() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_combine() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_combine_variation2.phpt b/ext/standard/tests/array/array_combine_variation2.phpt
deleted file mode 100644
index 2d888df694..0000000000
--- a/ext/standard/tests/array/array_combine_variation2.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test array_combine() function : usage variations - unexpected values for 'values' argument
---FILE--
-<?php
-/* Prototype : array array_combine(array $keys, array $values)
- * Description: Creates an array by using the elements of the first parameter as keys
- * and the elements of the second as the corresponding values
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_combine() function by passing values to $values argument other than arrays
-* and see that function emits proper warning messages wherever expected.
-* The $keys argument passed is a fixed array.
-*/
-
-echo "*** Testing array_combine() : Passing non-array values to \$values argument ***\n";
-
-// Initialize $keys array
-$keys = array(1, 2);
-
-//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 $values argument
-$values_passed = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element within $values_passed to check the behavior of array_combine()
-$iterator = 1;
-foreach($values_passed as $values) {
- echo "-- Iteration $iterator --\n";
- var_dump( array_combine($keys,$values) );
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_combine() : Passing non-array values to $values argument ***
--- Iteration 1 --
-
-Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_combine() expects parameter 2 to be array, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_combine() expects parameter 2 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_fill_variation1.phpt b/ext/standard/tests/array/array_fill_variation1.phpt
deleted file mode 100644
index f3bdef1b61..0000000000
--- a/ext/standard/tests/array/array_fill_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test array_fill() function : usage variations - unexpected values for 'start_key' argument
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : proto array array_fill(int start_key, int num, mixed val)
- * Description: Create an array containing num elements starting with index start_key each initialized to val
- * Source code: ext/standard/array.c
- */
-
-/*
- * testing array_fill() by passing different unexpected value for 'start_key' argument
- */
-
-echo "*** Testing array_fill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$num = 2;
-$val = 100;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//define a class
-class test
-{
- var $t = 10;
- function __toString()
- {
- return "testObject";
- }
-}
-
-
-//array of different values for 'start_key' argument
-$values = array(
-
- // float values
- /* 1 */ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.34567890006E-10,
- .5,
-
- // array values
- /* 6 */ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null values
- /* 11 */ NULL,
- null,
-
- // boolean values
- /* 13 */ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- /* 17 */ "",
- '',
-
- // string values
- /* 19 */ "string",
- 'string',
-
- // objects
- /* 21 */ new test(),
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var,
-
- // resource variable
- /* 24 */ $fp
-);
-
-// loop through each element of the array for start_key
-// check the working of array_fill()
-echo "--- Testing array_fill() with different values for 'start_key' arg ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++)
-{
- echo "-- Iteration $counter --\n";
- $start_key = $values[$index];
-
- var_dump( array_fill($start_key,$num,$val) );
-
- $counter ++;
-}
-
-// close the resource used
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'start_key' arg ---
--- Iteration 1 --
-array(2) {
- [10]=>
- int(100)
- [11]=>
- int(100)
-}
--- Iteration 2 --
-array(2) {
- [-10]=>
- int(100)
- [0]=>
- int(100)
-}
--- Iteration 3 --
-
-Warning: array_fill() expects parameter 1 to be int, float given in %s%eext%estandard%etests%earray%earray_fill_variation1.php on line 92
-NULL
--- Iteration 4 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 6 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 11 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 12 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 13 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 14 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 15 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 16 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 17 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_fill() expects parameter 1 to be int, object given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 22 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 23 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 24 --
-
-Warning: array_fill() expects parameter 1 to be int, resource given in %sarray_fill_variation1.php on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_fill_variation1_64bit.phpt b/ext/standard/tests/array/array_fill_variation1_64bit.phpt
deleted file mode 100644
index ba3a70c482..0000000000
--- a/ext/standard/tests/array/array_fill_variation1_64bit.phpt
+++ /dev/null
@@ -1,247 +0,0 @@
---TEST--
-Test array_fill() function : usage variations - unexpected values for 'start_key' argument
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : proto array array_fill(int start_key, int num, mixed val)
- * Description: Create an array containing num elements starting with index start_key each initialized to val
- * Source code: ext/standard/array.c
- */
-
-/*
- * testing array_fill() by passing different unexpected value for 'start_key' argument
- */
-
-echo "*** Testing array_fill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$num = 2;
-$val = 100;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//define a class
-class test
-{
- var $t = 10;
- function __toString()
- {
- return "testObject";
- }
-}
-
-
-//array of different values for 'start_key' argument
-$values = array(
-
- // float values
- /* 1 */ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.34567890006E-10,
- .5,
-
- // array values
- /* 6 */ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null values
- /* 11 */ NULL,
- null,
-
- // boolean values
- /* 13 */ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- /* 17 */ "",
- '',
-
- // string values
- /* 19 */ "string",
- 'string',
-
- // objects
- /* 21 */ new test(),
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var,
-
- // resource variable
- /* 24 */ $fp
-);
-
-// loop through each element of the array for start_key
-// check the working of array_fill()
-echo "--- Testing array_fill() with different values for 'start_key' arg ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++)
-{
- echo "-- Iteration $counter --\n";
- $start_key = $values[$index];
-
- var_dump( array_fill($start_key,$num,$val) );
-
- $counter ++;
-}
-
-// close the resource used
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'start_key' arg ---
--- Iteration 1 --
-array(2) {
- [10]=>
- int(100)
- [11]=>
- int(100)
-}
--- Iteration 2 --
-array(2) {
- [-10]=>
- int(100)
- [0]=>
- int(100)
-}
--- Iteration 3 --
-array(2) {
- [123456789000]=>
- int(100)
- [123456789001]=>
- int(100)
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 6 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 12 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 13 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 14 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 15 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 16 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 17 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_fill() expects parameter 1 to be int, object given in %s on line %d
-NULL
--- Iteration 22 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 23 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 24 --
-
-Warning: array_fill() expects parameter 1 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_fill_variation2.phpt b/ext/standard/tests/array/array_fill_variation2.phpt
deleted file mode 100644
index 1209aea44d..0000000000
--- a/ext/standard/tests/array/array_fill_variation2.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test array_fill() function : usage variations - unexpected values for 'num' argument
---FILE--
-<?php
-/* Prototype : proto array array_fill(int start_key, int num, mixed val)
- * Description: Create an array containing num elements starting with index start_key each initialized to val
- * Source code: ext/standard/array.c
- */
-
-/*
- * testing array_fill() by passing different unexpected values for 'num' argument
- */
-
-echo "*** Testing array_fill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$start_key = 0;
-$val = 100;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//define a class
-class test
-{
- var $t = 10;
- function __toString()
- {
- return "testObject";
- }
-}
-
-
-//array of different values for 'num' argument
-$values = array(
-
- // float values
- /* 1 */ 2.5,
- -2.5,
- 0.5e1,
- 0.5E-1,
- .5,
-
- // array values
- /* 6 */ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null values
- /* 11 */ NULL,
- null,
-
- // boolean values
- /* 13 */ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- /* 17 */ "",
- '',
-
- // string values
- /* 19 */ "string",
- 'string',
-
- // objects
- /* 21 */ new test(),
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- /* 24 */ @$unset_var,
-
-);
-
-// loop through each element of the array for num
-// check the working of array_fill
-echo "--- Testing array_fill() with different values for 'num' arg ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++)
-{
- echo "-- Iteration $counter --\n";
- $num = $values[$index];
-
- var_dump( array_fill($start_key,$num,$val) );
-
- $counter ++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'num' arg ---
--- Iteration 1 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 2 --
-
-Warning: array_fill(): Number of elements can't be negative in %s on line %d
-bool(false)
--- Iteration 3 --
-array(5) {
- [0]=>
- int(100)
- [1]=>
- int(100)
- [2]=>
- int(100)
- [3]=>
- int(100)
- [4]=>
- int(100)
-}
--- Iteration 4 --
-array(0) {
-}
--- Iteration 5 --
-array(0) {
-}
--- Iteration 6 --
-
-Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-array(0) {
-}
--- Iteration 12 --
-array(0) {
-}
--- Iteration 13 --
-array(1) {
- [0]=>
- int(100)
-}
--- Iteration 14 --
-array(0) {
-}
--- Iteration 15 --
-array(1) {
- [0]=>
- int(100)
-}
--- Iteration 16 --
-array(0) {
-}
--- Iteration 17 --
-
-Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_fill() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 22 --
-array(0) {
-}
--- Iteration 23 --
-array(0) {
-}
-Done
diff --git a/ext/standard/tests/array/array_filter_variation1.phpt b/ext/standard/tests/array/array_filter_variation1.phpt
deleted file mode 100644
index f75b03cbed..0000000000
--- a/ext/standard/tests/array/array_filter_variation1.phpt
+++ /dev/null
@@ -1,195 +0,0 @@
---TEST--
-Test array_filter() function : usage variations - Unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : array array_filter(array $input [, callback $callback])
- * Description: Filters elements from the array via the callback.
- * Source code: ext/standard/array.c
-*/
-
-/* Passing different scalar and nonscalar values for 'input' argument
-*/
-echo "*** Testing array_filter() : usage variations - unexpected values for 'input'***\n";
-
-/* Callback function
- * Prototype : bool always_true(array $input)
- * Parameters : array for which each elements needs to be used in function
- * Return value : Returns true for each element
- * Discription : function applied to each element of the passed array and returns true
- */
-function always_true($input)
-{
- return true;
-}
-
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// class definition for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-// resource variable
-$fp = fopen(__FILE__, 'r');
-
-// different values for 'input' argument
-$input_values = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new MyClass(),
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-);
-
-// loop through each element of the array for input
-for($count = 0; $count < count($input_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_filter($input_values[$count],"always_true") );
-};
-
-// closing resource
-fclose($fp);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_filter() : usage variations - unexpected values for 'input'***
--- Iteration 1 --
-
-Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_filter() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_filter() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_filter_variation2.phpt b/ext/standard/tests/array/array_filter_variation2.phpt
deleted file mode 100644
index d47761f470..0000000000
--- a/ext/standard/tests/array/array_filter_variation2.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test array_filter() function : usage variations - Unexpected values for 'callback' function argument
---FILE--
-<?php
-/* Prototype : array array_filter(array $input [, callback $callback])
- * Description: Filters elements from the array via the callback.
- * Source code: ext/standard/array.c
-*/
-
-/* Passing different scalar and nonscalar values in place of 'callback' argument
-*/
-echo "*** Testing array_filter() : usage variations - unexpected values for 'callback' function***\n";
-
-// Initialise variables
-$input = array('value1', 'value2', 'value3', 'value4');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// class definition for object variable
-class MyClass
-{
- public function __toString()
- {
- return 'object';
- }
-}
-
-// resource variable
-$fp = fopen(__FILE__, 'r');
-
-// different scalar and nonscalar values in place of callback function
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/ "",
- '',
-
- // string data
-/*23*/ "string",
- 'string',
-
- // object data
-/*25*/ new MyClass(),
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/*28*/ @$unset_var,
-);
-
-// loop through each element of the 'values' for callback
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count + 1)." --";
- var_dump( array_filter($input, $values[$count]) );
-};
-
-// closing resource
-fclose($fp);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_filter() : usage variations - unexpected values for 'callback' function***
--- Iteration 1 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 15 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 21 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 22 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 23 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 24 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 25 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 26 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 27 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 28 --
-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_flip_variation1.phpt b/ext/standard/tests/array/array_flip_variation1.phpt
deleted file mode 100644
index 98aa459362..0000000000
--- a/ext/standard/tests/array/array_flip_variation1.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test array_flip() function : usage variations - unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : array array_flip(array $input)
- * Description: Return array with key <-> value flipped
- * Source code: ext/standard/array.c
-*/
-
-echo "*** Testing array_flip() : usage variations - unexpected values for 'input' ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//class definition for object variable
-class MyClass
-{
- public function __toString()
- {
- return 'object';
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__,'r');
-
-//array of values for 'input' argument
-$values = array(
- // int data
- /*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
- /*5*/ 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // null data
- /*10*/ NULL,
- null,
-
- // boolean data
- /*12*/ true,
- false,
- TRUE,
- /*15*/ FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- /*20*/ new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- //resource data
- /*23*/ $fp
-);
-
-// loop through each element of $values for 'input' argument
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count + 1). " --\n";
- var_dump( array_flip($values[$count]) );
-};
-
-//closing resource
-fclose($fp);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_flip() : usage variations - unexpected values for 'input' ***
--- Iteration 1 --
-
-Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_flip() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_flip() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_key_exists_variation2.phpt b/ext/standard/tests/array/array_key_exists_variation2.phpt
deleted file mode 100644
index b1e3033002..0000000000
--- a/ext/standard/tests/array/array_key_exists_variation2.phpt
+++ /dev/null
@@ -1,224 +0,0 @@
---TEST--
-Test array_key_exists() function : usage variations - Pass different data types to $search arg
---FILE--
-<?php
-/* Prototype : bool array_key_exists(mixed $key, array $search)
- * Description: Checks if the given key or index exists in the array
- * Source code: ext/standard/array.c
- * Alias to functions: key_exists
- */
-
-/*
- * Pass different data types as $search argument to array_key_exists() to test behaviour
- */
-
-echo "*** Testing array_key_exists() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$key = 'val';
-
-//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 $search 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 array_key_exists()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_key_exists($key, $input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_key_exists() expects parameter 2 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_map_variation18.phpt b/ext/standard/tests/array/array_map_variation18.phpt
deleted file mode 100644
index 4c85d12e88..0000000000
--- a/ext/standard/tests/array/array_map_variation18.phpt
+++ /dev/null
@@ -1,205 +0,0 @@
---TEST--
-Test array_map() function : usage variations - unexpected values for 'arr1' argument
---FILE--
-<?php
-/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
- * Description: Applies the callback to the elements of the given arrays
- * Source code: ext/standard/array.c
- */
-
-/*
- * Test array_map() by passing non array values in place of $arr1
- */
-
-echo "*** Testing array_map() : unexpected values for 'arr1' ***\n";
-
-function callback($a)
-{
- return $a;
-}
-
-//get an unset array variable
-$unset_var1 = array(1, 2);
-unset ($unset_var1);
-
-// get an unset variable
-$unset_var2 = 10;
-unset ($unset_var2);
-
-// 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");
-
-// different scalar/non-scalar values for array input
-$unexpected_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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var1,
- @$unset_var2,
-
- // resource variable
-/*25*/ $fp
-);
-
-// loop through each element of $unexpected_inputs to check the behavior of array_map
-for($count = 0; $count < count($unexpected_inputs); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_map('callback', $unexpected_inputs[$count]));
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_map() : unexpected values for 'arr1' ***
--- Iteration 1 --
-
-Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d
-NULL
--- Iteration 2 --
-
-Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d
-NULL
--- Iteration 3 --
-
-Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d
-NULL
--- Iteration 4 --
-
-Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d
-NULL
--- Iteration 5 --
-
-Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d
-NULL
--- Iteration 6 --
-
-Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d
-NULL
--- Iteration 7 --
-
-Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d
-NULL
--- Iteration 8 --
-
-Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d
-NULL
--- Iteration 9 --
-
-Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d
-NULL
--- Iteration 10 --
-
-Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d
-NULL
--- Iteration 11 --
-
-Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d
-NULL
--- Iteration 12 --
-
-Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d
-NULL
--- Iteration 13 --
-
-Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d
-NULL
--- Iteration 14 --
-
-Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d
-NULL
--- Iteration 15 --
-
-Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d
-NULL
--- Iteration 16 --
-
-Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d
-NULL
--- Iteration 17 --
-
-Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d
-NULL
--- Iteration 18 --
-
-Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d
-NULL
--- Iteration 19 --
-
-Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d
-NULL
--- Iteration 20 --
-
-Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d
-NULL
--- Iteration 21 --
-
-Warning: array_map(): Expected parameter 2 to be an array, object given in %s on line %d%d
-NULL
--- Iteration 22 --
-
-Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d
-NULL
--- Iteration 23 --
-
-Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d
-NULL
--- Iteration 24 --
-
-Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d
-NULL
--- Iteration 25 --
-
-Warning: array_map(): Expected parameter 2 to be an array, resource given in %s on line %d%d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_pad_variation1.phpt b/ext/standard/tests/array/array_pad_variation1.phpt
deleted file mode 100644
index b806139d57..0000000000
--- a/ext/standard/tests/array/array_pad_variation1.phpt
+++ /dev/null
@@ -1,270 +0,0 @@
---TEST--
-Test array_pad() function : usage variations - unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
- * Description: Returns a copy of input array padded with pad_value to size pad_size
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_pad() function by passing values to $input argument other than arrays
-* and see that function outputs proper warning messages wherever expected.
-* The $pad_size and $pad_value arguments passed are fixed values.
-*/
-
-echo "*** Testing array_pad() : passing non array values to \$input argument ***\n";
-
-// Initialise $pad_size and $pad_value
-$pad_size = 10;
-$pad_value = 1;
-
-//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 $input 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of array_pad()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --";
- var_dump( array_pad($input, $pad_size, $pad_value) ); // positive 'pad_size'
- var_dump( array_pad($input, -$pad_size, $pad_value) ); // negative 'pad_size'
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_pad() : passing non array values to $input argument ***
-
--- Iteration 1 --
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_pad() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_pad() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_pad_variation2.phpt b/ext/standard/tests/array/array_pad_variation2.phpt
deleted file mode 100644
index c95303974d..0000000000
--- a/ext/standard/tests/array/array_pad_variation2.phpt
+++ /dev/null
@@ -1,258 +0,0 @@
---TEST--
-Test array_pad() function : usage variations - unexpected values for 'pad_size' argument(Bug#43482)
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
- * Description: Returns a copy of input array padded with pad_value to size pad_size
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing array_pad() function by passing values to $pad_size argument other than integers
-* and see that function outputs proper warning messages wherever expected.
-* The $input and $pad_value arguments passed are fixed values.
-*/
-
-echo "*** Testing array_pad() : passing non integer values to \$pad_size argument ***\n";
-
-// Initialise $input and $pad_value arguments
-$input = array(1, 2);
-$pad_value = 1;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-//array of values to iterate over
-$pad_sizes = array(
-
- // float data
-/*1*/ 10.5,
- -10.5,
- 12.3456789000e10,
- -12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // array data
-/*6*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
-
- // string data
-/*19*/ "string",
- 'string',
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-);
-
-// loop through each element of $pad_sizes to check the behavior of array_pad()
-$iterator = 1;
-foreach($pad_sizes as $pad_size) {
- echo "-- Iteration $iterator --\n";
- var_dump( array_pad($input, $pad_size, $pad_value) );
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_pad() : passing non integer values to $pad_size argument ***
--- Iteration 1 --
-array(10) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(1)
- [5]=>
- int(1)
- [6]=>
- int(1)
- [7]=>
- int(1)
- [8]=>
- int(1)
- [9]=>
- int(1)
-}
--- Iteration 2 --
-array(10) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(1)
- [5]=>
- int(1)
- [6]=>
- int(1)
- [7]=>
- int(1)
- [8]=>
- int(1)
- [9]=>
- int(2)
-}
--- Iteration 3 --
-
-Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
-bool(false)
--- Iteration 5 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 7 --
-
-Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 13 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 14 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 15 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 16 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 17 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 18 --
-
-Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_pad() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 23 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 24 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
diff --git a/ext/standard/tests/array/array_product_variation5.phpt b/ext/standard/tests/array/array_product_variation5.phpt
deleted file mode 100644
index 09284d9096..0000000000
--- a/ext/standard/tests/array/array_product_variation5.phpt
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test array_product() function : usage variation
---FILE--
-<?php
-/* Prototype : mixed array_product(array input)
- * Description: Returns the product of the array entries
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_product() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for input
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_product($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_product() : usage variation ***
-
---int 0--
-
-Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d
-NULL
-
---int 1--
-
-Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d
-NULL
-
---float .5--
-
-Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_product() expects parameter 1 to be array, object given in %sarray_product_variation5.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_product() expects parameter 1 to be array, object given in %sarray_product_variation5.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d
-NULL
-
---unset var--
-
-Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_push_variation1.phpt b/ext/standard/tests/array/array_push_variation1.phpt
deleted file mode 100644
index c04cf4073f..0000000000
--- a/ext/standard/tests/array/array_push_variation1.phpt
+++ /dev/null
@@ -1,225 +0,0 @@
---TEST--
-Test array_push() function : usage variations - Pass different data types as $stack arg
---FILE--
-<?php
-/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
- * Description: Pushes elements onto the end of the array
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $stack argument to array_push() to test behaviour
- */
-
-echo "*** Testing array_push() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$var = '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 $stack 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 array_push()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_push($input, $var) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_push() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_push() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_push() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_push() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_push() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_push() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_push() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_push() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_push() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_push() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_push() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_push() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-int(1)
-
--- Iteration 19 --
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_push() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_push() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_push() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_push() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_rand_variation1.phpt b/ext/standard/tests/array/array_rand_variation1.phpt
deleted file mode 100644
index 7aaf48f99f..0000000000
--- a/ext/standard/tests/array/array_rand_variation1.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test array_rand() function : usage variations - unexpected values for 'input' parameter
---FILE--
-<?php
-/* Prototype : mixed array_rand(array input [, int num_req])
- * Description: Return key/keys for random entry/entries in the array
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Test array_rand() with different types of values other than arrays passed to the 'input' parameter
-* to see that function works with unexpeced data and generates warning message as required.
-*/
-
-echo "*** Testing array_rand() : unexpected values for 'input' parameter ***\n";
-
-// Initialise function arguments
-$num_req = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//define a class
-class test
-{
- var $t = 10;
- function __toString()
- {
- return "object";
- }
-}
-
-//array of different values for 'input' parameter
-$values = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new test(),
-
- // resource data
-/*21*/ $fp,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-);
-
-/* loop through each element of the array to test array_rand() function
- * for different values for 'input' argument
-*/
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump( array_rand($value,$num_req) );
- $count++;
-};
-
-// closing the resource
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_rand() : unexpected values for 'input' parameter ***
-
--- Iteration 1 --
-
-Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_rand() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_rand() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_rand_variation2.phpt b/ext/standard/tests/array/array_rand_variation2.phpt
deleted file mode 100644
index 1182d1aeea..0000000000
--- a/ext/standard/tests/array/array_rand_variation2.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test array_rand() function : usage variations - unexpected values for 'num_req' parameter
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : mixed array_rand(array input [, int num_req])
- * Description: Return key/keys for random entry/entries in the array
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Test array_rand() with different types of values other than int passed to 'num_req' argument
-* to see that function works with unexpeced data and generates warning message as required.
-*/
-
-echo "*** Testing array_rand() : unexpected values for 'num_req' parameter ***\n";
-
-// Initialise function arguments
-$input = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//define a class
-class test
-{
- var $t = 10;
- function __toString()
- {
- return "3object";
- }
-}
-
-//array of values to iterate over
-$values = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new test(),
-
- // undefined data
-/*21*/ @$undefined_var,
-
- // unset data
-/*22*/ @$unset_var,
-);
-
-
-// loop through each element of the array for different values for 'num_req' argument
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump( array_rand($input,$value) );
- $count++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_rand() : unexpected values for 'num_req' parameter ***
-
--- Iteration 1 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 2 --
-int(%d)
-
--- Iteration 3 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 5 --
-array(10) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
- [4]=>
- int(%d)
- [5]=>
- int(%d)
- [6]=>
- int(%d)
- [7]=>
- int(%d)
- [8]=>
- int(%d)
- [9]=>
- int(%d)
-}
-
--- Iteration 6 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 12 --
-int(%d)
-
--- Iteration 13 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 14 --
-int(%d)
-
--- Iteration 15 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_rand() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_reverse_variation1.phpt b/ext/standard/tests/array/array_reverse_variation1.phpt
deleted file mode 100644
index b2936c171c..0000000000
--- a/ext/standard/tests/array/array_reverse_variation1.phpt
+++ /dev/null
@@ -1,340 +0,0 @@
---TEST--
-Test array_reverse() function : usage variations - unexpected values for 'array' argument
---FILE--
-<?php
-/* Prototype : array array_reverse(array $array [, bool $preserve_keys])
- * Description: Return input as a new array with the order of the entries reversed
- * Source code: ext/standard/array.c
-*/
-
-echo "*** Testing array_reverse() : usage variations - unexpected values for 'array' argument ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//get a class
-class classA
-{
- public function __toString(){
- return "Class A object";
- }
-}
-
-//get a heredoc string
-$heredoc_string = <<<EOT
-Hello world\t\n
-EOT;
-
-//array of values to iterate over
-$arrays = array (
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
- 'Hello world',
- "Hello world",
- $heredoc_string,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
-/*24*/ $fp
-
-);
-
-// loop through each element of the array $arrays to check the behavior of array_reverse()
-$iterator = 1;
-foreach($arrays as $array) {
- echo "\n-- Iteration $iterator --";
- // with default argument
- var_dump( array_reverse($array) );
- // with all possible arguments
- var_dump( array_reverse($array, true) );
- var_dump( array_reverse($array, false) );
- $iterator++;
-};
-
-// close the file resource used
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_reverse() : usage variations - unexpected values for 'array' argument ***
-
--- Iteration 1 --
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_reverse_variation2.phpt b/ext/standard/tests/array/array_reverse_variation2.phpt
deleted file mode 100644
index 1cc9a3088e..0000000000
--- a/ext/standard/tests/array/array_reverse_variation2.phpt
+++ /dev/null
@@ -1,414 +0,0 @@
---TEST--
-Test array_reverse() function : usage variations - unexpected values for 'preserve_keys' argument
---FILE--
-<?php
-/* Prototype : array array_reverse(array $array [, bool $preserve_keys])
- * Description: Return input as a new array with the order of the entries reversed
- * Source code: ext/standard/array.c
-*/
-
-/*
- * testing the functionality of array_reverse() by giving unexpected values for $preserve_keys argument
-*/
-
-echo "*** Testing array_reverse() : usage variations ***\n";
-
-// Initialise the array
-$array = array("a" => "green", "red", "blue", "red", "orange", "pink");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//get a class
-class classA
-{
- public function __toString(){
- return "Class A object";
- }
-}
-
-//array of values to iterate over
-$preserve_keys = array (
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/
- "",
- '',
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
-/*26*/ $fp
-
-);
-
-// loop through each element of the array $preserve_keys to check the behavior of array_reverse()
-$iterator = 1;
-foreach($preserve_keys as $preserve_key) {
- echo "-- Iteration $iterator --\n";
- var_dump( array_reverse($array, $preserve_key) );
- $iterator++;
-};
-
-// close the file resouce used
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_reverse() : usage variations ***
--- Iteration 1 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 2 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 3 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 4 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 5 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 6 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 7 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 8 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 9 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 10 --
-
-Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d
-NULL
--- Iteration 15 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 16 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 17 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 18 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 19 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 20 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 21 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 22 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 23 --
-
-Warning: array_reverse() expects parameter 2 to be bool, object given in %s on line %d
-NULL
--- Iteration 24 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 25 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 26 --
-
-Warning: array_reverse() expects parameter 2 to be bool, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_shift_variation1.phpt b/ext/standard/tests/array/array_shift_variation1.phpt
deleted file mode 100644
index 5734da4fb9..0000000000
--- a/ext/standard/tests/array/array_shift_variation1.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test array_shift() function : usage variations - Pass different data types as $stack arg
---FILE--
-<?php
-/* Prototype : mixed array_shift(array &$stack)
- * Description: Pops an element off the beginning of the array
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $stack argument to array_shift() to test behaviour
- */
-
-echo "*** Testing array_shift() : usage variations ***\n";
-
-//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 $stack 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of array_shift()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_shift($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_shift() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_shift() expects parameter 1 to be array, resource given in %s on line 85
-NULL
-Done
diff --git a/ext/standard/tests/array/array_slice_variation4.phpt b/ext/standard/tests/array/array_slice_variation4.phpt
deleted file mode 100644
index 6591e113af..0000000000
--- a/ext/standard/tests/array/array_slice_variation4.phpt
+++ /dev/null
@@ -1,326 +0,0 @@
---TEST--
-Test array_slice() function : usage variations - Pass different data types as $preserve_keys arg
---FILE--
-<?php
-/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
- * Description: Returns elements specified by offset and length
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $preserve_keys argument to array_slice() to test behaviour
- */
-
-echo "*** Testing array_slice() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$input_array = array('one' => 1, 2, 99 => 3, 4);
-$offset = 0;
-$length = 3;
-
-//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;
-
-// unexpected values to be passed to $preserve_keys 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,
-);
-
-// loop through each element of $inputs to check the behavior of array_slice()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_slice($input_array, $offset, $length, $input) );
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Iteration 1 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 2 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 3 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 4 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 5 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 6 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 7 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 8 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 9 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 10 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 11 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 12 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 13 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 14 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 15 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 16 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 17 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 18 --
-
-Warning: array_slice() expects parameter 4 to be bool, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 20 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 21 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 22 --
-
-Warning: array_slice() expects parameter 4 to be bool, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 24 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-Done
diff --git a/ext/standard/tests/array/array_sum_variation1.phpt b/ext/standard/tests/array/array_sum_variation1.phpt
deleted file mode 100644
index 30e2847004..0000000000
--- a/ext/standard/tests/array/array_sum_variation1.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test array_sum() function : usage variations - unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : mixed array_sum(array $input)
- * Description: Returns the sum of the array entries
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Passing different scalar/nonscalar values as 'input' argument to array_sum()
-*/
-
-echo "*** Testing array_sum() : unexpected values for 'input' ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// Class definition
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-// different scalar/non scalar values for 'input' argument
-$input_values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new MyClass(),
-
- // resource data
-/*21*/ $fp = fopen(__FILE__,'r'),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-);
-
-// loop through each element of the array for input
-for($count = 0; $count < count($input_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_sum($input_values[$count]) );
-};
-
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_sum() : unexpected values for 'input' ***
--- Iteration 1 --
-
-Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_sum() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_sum() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_unique_variation1.phpt b/ext/standard/tests/array/array_unique_variation1.phpt
deleted file mode 100644
index cc9a695c86..0000000000
--- a/ext/standard/tests/array/array_unique_variation1.phpt
+++ /dev/null
@@ -1,195 +0,0 @@
---TEST--
-Test array_unique() function : usage variations - unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : array array_unique(array $input)
- * Description: Removes duplicate values from array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Passing non array values to 'input' argument of array_unique() and see
- * that the function outputs proper warning messages wherever expected.
-*/
-
-echo "*** Testing array_unique() : Passing non array values to \$input argument ***\n";
-
-//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 $input 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs and check the behavior of array_unique()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $iterator --\n";
- var_dump( array_unique($input) );
- $iterator++;
-}
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_unique() : Passing non array values to $input argument ***
--- Iteration 1 --
-
-Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_unique() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_unique() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_unshift_variation1.phpt b/ext/standard/tests/array/array_unshift_variation1.phpt
deleted file mode 100644
index f80fc0ebc6..0000000000
--- a/ext/standard/tests/array/array_unshift_variation1.phpt
+++ /dev/null
@@ -1,338 +0,0 @@
---TEST--
-Test array_unshift() function : usage variations - unexpected values for 'array' argument
---FILE--
-<?php
-/* Prototype : int array_unshift(array $array, mixed $var [, mixed ...])
- * Description: Pushes elements onto the beginning of the array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Testing the behavior of array_unshift() by giving values
- * other than array values for $array argument
-*/
-
-echo "*** Testing array_unshift() : unexpected values for \$array argument ***\n";
-
-// Initialise $var argument
-$var = 12;
-
-// 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");
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// array of unexpected values to be passed to $array argument
-$arrays = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $arrays to test the functionality of array_unshift()
-$iterator = 1;
-foreach($arrays as $array) {
- echo "\n-- Iteration $iterator --";
-
- /* with default arguments */
- // returns element count in the resulting array after arguments are pushed to
- // beginning of the given array
- $temp_array = $array;
- var_dump( array_unshift($temp_array, $var) );
-
- // dump the resulting array
- var_dump($temp_array);
-
- /* with optional arguments */
- // returns element count in the resulting array after arguments are pushed to
- // beginning of the given array
- $temp_array = $array;
- var_dump( array_unshift($temp_array, $var, "hello", 'world') );
-
- // dump the resulting array
- var_dump($temp_array);
- $iterator++;
-};
-
-// close the file resource used
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_unshift() : unexpected values for $array argument ***
-
--- Iteration 1 --
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(0)
-
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(0)
-
--- Iteration 2 --
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(1)
-
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(1)
-
--- Iteration 3 --
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(12345)
-
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(12345)
-
--- Iteration 4 --
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(-2345)
-
-Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-int(-2345)
-
--- Iteration 5 --
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(10.5)
-
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(10.5)
-
--- Iteration 6 --
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(-10.5)
-
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(-10.5)
-
--- Iteration 7 --
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(123456789000)
-
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(123456789000)
-
--- Iteration 8 --
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(1.23456789E-9)
-
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(1.23456789E-9)
-
--- Iteration 9 --
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(0.5)
-
-Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d
-NULL
-float(0.5)
-
--- Iteration 10 --
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
--- Iteration 11 --
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
--- Iteration 12 --
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(true)
-
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(true)
-
--- Iteration 13 --
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(false)
-
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(false)
-
--- Iteration 14 --
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(true)
-
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(true)
-
--- Iteration 15 --
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(false)
-
-Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-bool(false)
-
--- Iteration 16 --
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(0) ""
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(0) ""
-
--- Iteration 17 --
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(0) ""
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(0) ""
-
--- Iteration 18 --
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(6) "string"
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(6) "string"
-
--- Iteration 19 --
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(6) "string"
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(6) "string"
-
--- Iteration 20 --
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(11) "hello world"
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-string(11) "hello world"
-
--- Iteration 21 --
-Warning: array_unshift() expects parameter 1 to be array, object given in %s on line %d
-NULL
-object(classA)#1 (0) {
-}
-
-Warning: array_unshift() expects parameter 1 to be array, object given in %s on line %d
-NULL
-object(classA)#1 (0) {
-}
-
--- Iteration 22 --
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
--- Iteration 23 --
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
-Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-NULL
-
--- Iteration 24 --
-Warning: array_unshift() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-resource(%d) of type (stream)
-
-Warning: array_unshift() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-resource(%d) of type (stream)
-Done
diff --git a/ext/standard/tests/array/array_values_variation1.phpt b/ext/standard/tests/array/array_values_variation1.phpt
deleted file mode 100644
index 0ee93e2a12..0000000000
--- a/ext/standard/tests/array/array_values_variation1.phpt
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test array_values() function : usage variations - Pass different data types as $input arg
---FILE--
-<?php
-/* Prototype : array array_values(array $input)
- * Description: Return just the values from the input array
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $input argument to array_values() to test behaviour
- */
-
-echo "*** Testing array_values() : usage variations ***\n";
-
-//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 $input 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 array_values()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_values($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_values() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_values() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_values() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_values() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_values() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_values() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_values() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_values() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_values() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_values() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_values() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_values() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation1.phpt b/ext/standard/tests/array/array_walk_recursive_variation1.phpt
deleted file mode 100644
index 56abaca83d..0000000000
--- a/ext/standard/tests/array/array_walk_recursive_variation1.phpt
+++ /dev/null
@@ -1,250 +0,0 @@
---TEST--
-Test array_walk_recursive() function : usage variations - unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
- * Description: Apply a user function to every member of an array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Passing different scalar/nonscalar values in place of 'input' argument
-*/
-
-echo "*** Testing array_walk_recursive() : unexpected values for 'input' argument ***\n";
-
-// callback function
-/* Prototype : callback(mixed $value, mixed $key)
- * Parameters : $value - values given in input array
- * $key - keys given in input array
- * Description : Function prints each element of an array with key
- */
-function callback($value, $key)
-{
- echo "key : ";
- var_dump($key);
- echo "value : ";
- var_dump($value);
-}
-
-// extra parameter passed to array_walk_recursive()
-$user_data = 10;
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get resource variable
-$fp = fopen(__FILE__, 'r');
-
-// different scalar/nonscalar values to be used in place of an 'input' argument
-$input_values = array(
-
- // int data
-/* 1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/* 5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // null data
-/* 10*/ NULL,
- null,
-
- // boolean data
-/* 12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/* 16*/ "",
- '',
-
- // string data
-/* 18*/ "string",
- 'string',
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/* 22*/ @$unset_var,
-);
-
-
-for($count = 0; $count < count($input_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_walk_recursive($input_values[$count], "callback") );
- var_dump( array_walk_recursive($input_values[$count], "callback", $user_data) );
-}
-
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_walk_recursive() : unexpected values for 'input' argument ***
--- Iteration 1 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, int 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
--- Iteration 2 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, int 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
--- Iteration 3 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, int 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
--- Iteration 4 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, int 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
--- Iteration 5 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation2.phpt b/ext/standard/tests/array/array_walk_recursive_variation2.phpt
deleted file mode 100644
index 5c8c56dcc2..0000000000
--- a/ext/standard/tests/array/array_walk_recursive_variation2.phpt
+++ /dev/null
@@ -1,268 +0,0 @@
---TEST--
-Test array_walk_recursive() function : usage variations - unexpected values in place of 'funcname' argument
---FILE--
-<?php
-/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
- * Description: Apply a user function to every member of an array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Passing different scalar/nonscalar values in place of 'funcname' argument
-*/
-
-echo "*** Testing array_walk_recursive() : unexpected values for 'funcname' argument ***\n";
-
-$input = array(1, array(2, 3));
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$user_data = 20;
-
-// class definition
-class MyClass
-{
- public function __toString()
- {
- return 'object';
- }
-}
-
-// different scalar/nonscalar values to be used in place of callback function
-$funcname_values = array(
-
- // int data
-/* 1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/* 5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
-/* 10*/ array(),
- array(0),
- array(1),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/* 14*/ NULL,
- null,
-
- // boolean data
-/* 16*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/* 20*/ "",
- '',
-
- // object data
- new MyClass(),
-
- // resource data
-/* 23*/ $fp = fopen(__FILE__, 'r'),
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/* 25*/ @$unset_var,
-);
-
-for($count = 0; $count < count($funcname_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_walk_recursive($input, $funcname_values[$count]) );
- var_dump( array_walk_recursive($input, $funcname_values[$count], $user_data ));
-}
-
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_walk_recursive() : unexpected values for 'funcname' argument ***
--- Iteration 1 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-
-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
-
-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
--- Iteration 21 --
-
-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
-
-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
--- Iteration 22 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() 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_walk_variation1.phpt b/ext/standard/tests/array/array_walk_variation1.phpt
deleted file mode 100644
index 5fc3e62f2a..0000000000
--- a/ext/standard/tests/array/array_walk_variation1.phpt
+++ /dev/null
@@ -1,250 +0,0 @@
---TEST--
-Test array_walk() function : usage variations - unexpected values for 'input' argument
---FILE--
-<?php
-/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
- * Description: Apply a user function to every member of an array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Passing different scalar/nonscalar values in place of 'input' argument
-*/
-
-echo "*** Testing array_walk() : unexpected values for 'input' argument ***\n";
-
-// callback function
-/* Prototype : callback(mixed $value, mixed $key)
- * Parameters : $value - values given in input array
- * $key - keys given in input array
- * Description : Function prints each element of an array with key
- */
-function callback($value, $key)
-{
- echo "key : ";
- var_dump($key);
- echo "value : ";
- var_dump($value);
-}
-
-// extra parameter passed to array_walk()
-$user_data = 10;
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get resource variable
-$fp = fopen(__FILE__, 'r');
-
-// different scalar/nonscalar values to be used in place of an 'input' argument
-$input_values = array(
-
- // int data
-/* 1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/* 5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // null data
-/* 10*/ NULL,
- null,
-
- // boolean data
-/* 12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/* 16*/ "",
- '',
-
- // string data
-/* 18*/ "string",
- 'string',
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/* 22*/ @$unset_var,
-);
-
-
-for($count = 0; $count < count($input_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_walk($input_values[$count], "callback") );
- var_dump( array_walk($input_values[$count], "callback", $user_data) );
-}
-
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_walk() : unexpected values for 'input' argument ***
--- Iteration 1 --
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-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, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-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, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-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, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-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, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_walk() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/array_walk_variation2.phpt b/ext/standard/tests/array/array_walk_variation2.phpt
deleted file mode 100644
index 1780f66bae..0000000000
--- a/ext/standard/tests/array/array_walk_variation2.phpt
+++ /dev/null
@@ -1,268 +0,0 @@
---TEST--
-Test array_walk() function : usage variations - unexpected values in place of 'funcname' argument
---FILE--
-<?php
-/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
- * Description: Apply a user function to every member of an array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Passing different scalar/nonscalar values in place of 'funcname' argument
-*/
-
-echo "*** Testing array_walk() : unexpected values for 'funcname' argument ***\n";
-
-$input = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$user_data = 20;
-
-// class definition
-class MyClass
-{
- public function __toString()
- {
- return 'object';
- }
-}
-
-// different scalar/nonscalar values to be used in place of callback function
-$funcname_values = array(
-
- // int data
-/* 1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/* 5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
-/* 10*/ array(),
- array(0),
- array(1),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/* 14*/ NULL,
- null,
-
- // boolean data
-/* 16*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/* 20*/ "",
- '',
-
- // object data
- new MyClass(),
-
- // resource data
-/* 23*/ $fp = fopen(__FILE__, 'r'),
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/* 25*/ @$unset_var,
-);
-
-for($count = 0; $count < count($funcname_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_walk($input, $funcname_values[$count]) );
- var_dump( array_walk($input, $funcname_values[$count], $user_data ));
-}
-
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing array_walk() : unexpected values for 'funcname' argument ***
--- Iteration 1 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-
-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
-NULL
-
-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
-NULL
--- Iteration 14 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name 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
--- Iteration 21 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name 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
--- Iteration 22 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() 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/arsort_variation1.phpt b/ext/standard/tests/array/arsort_variation1.phpt
deleted file mode 100644
index d5547efe95..0000000000
--- a/ext/standard/tests/array/arsort_variation1.phpt
+++ /dev/null
@@ -1,399 +0,0 @@
---TEST--
-Test arsort() function : usage variations - unexpected values for 'array_arg' argument
---FILE--
-<?php
-/* Prototype : bool arsort(array &array_arg [, int sort_flags])
- * Description: Sort an array and maintain index association
- Elements will be arranged from highest to lowest when this function has completed.
- * Source code: ext/standard/array.c
-*/
-
-/*
- * testing arsort() by providing different unexpected values for array argument with following flag values.
- * 1. flag value as defualt
- * 2. SORT_REGULAR - compare items normally
- * 3. SORT_NUMERIC - compare items numerically
- * 4. SORT_STRING - compare items as strings
-*/
-
-echo "*** Testing arsort() : usage variations ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-//array of values with indices to iterate over
-$unexpected_values = array (
-
- // int data
- 0 => 0,
- 1 => 1,
- 2 => 12345,
- 3 => -2345,
-
- // float data
- 4 => 10.5,
- 5 => -10.5,
- 6 => 10.5e3,
- 7 => 10.6E-2,
- 8 => .5,
-
- // null data
- 9 => NULL,
- 10 => null,
-
- // boolean data
- 11 => true,
- 12 => false,
- 13 => TRUE,
- 14 => FALSE,
-
- // empty data
- 15 => "",
- 16 => '',
-
- // string data
- 17 => "string",
- 18 => 'string',
-
- // object data
- 19 => new stdclass(),
-
- // undefined data
- 20 => @undefined_var,
-
- // unset data
- 21 => @unset_var,
-
- // resource variable
- 22 => $fp
-
-);
-
-// loop though each element of the array and check the working of arsort()
-// when $array argument is supplied with different values from $unexpected_values
-echo "\n-- Testing arsort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- var_dump( arsort($value) ); // expecting : bool(false)
- var_dump( arsort($value, SORT_REGULAR) ); // expecting : bool(false)
- var_dump( arsort($value, SORT_NUMERIC) ); // expecting : bool(false)
- var_dump( arsort($value, SORT_STRING) ); // expecting : bool(false)
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/arsort_variation2.phpt b/ext/standard/tests/array/arsort_variation2.phpt
deleted file mode 100644
index e6674774ee..0000000000
--- a/ext/standard/tests/array/arsort_variation2.phpt
+++ /dev/null
@@ -1,308 +0,0 @@
---TEST--
-Test arsort() function : usage variations - unexpected values for 'sort_flags' argument
---FILE--
-<?php
-/* Prototype : proto bool arsort(array &array_arg [, int sort_flags])
- * Description: Sort an array and maintain index association
- Elements will be arranged from highest to lowest when this function has completed.
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Testing arsort() by providing different unexpected values for flag argument
-*/
-
-echo "*** Testing arsort() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// temperory array for checking unexpected behavior
-$unsorted_values = array(1 => 10, 2 => 2, 3 => 45);
-
-//array of values to iterate over
-$unexpected_values = array(
-
- // int data
-/*1*/ -2345,
-
- // float data
-/*2*/ 10.5,
- -10.5,
- 10.5e2,
- 10.6E-2,
- .5,
-
- // null data
-/*7*/ NULL,
- null,
-
- // boolean data
-/*9*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*13*/ "",
- '',
-
- // string data
-/*15*/ "string",
- 'string',
-
- // object data
-/*16*/ new stdclass(),
-
- // undefined data
-/*17*/ @undefined_var,
-
- // unset data
-/*18*/ @unset_var,
-
- // resource variable
-/*19*/ $fp
-
-);
-
-// loop though each element of the array and check the working of arsort()
-// when $flag argument is supplied with different values from $unexpected_values
-echo "\n-- Testing arsort() by supplying different unexpected values for 'sort_flags' argument --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- $temp_array = $unsorted_values;
- var_dump( arsort($temp_array, $value) );
- var_dump($temp_array);
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [2]=>
- int(2)
- [1]=>
- int(10)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 13 --
-
-Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: arsort() expects parameter 2 to be int, object given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: arsort() expects parameter 2 to be int, resource given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
-Done
diff --git a/ext/standard/tests/array/asort_variation1.phpt b/ext/standard/tests/array/asort_variation1.phpt
deleted file mode 100644
index 4594a3d171..0000000000
--- a/ext/standard/tests/array/asort_variation1.phpt
+++ /dev/null
@@ -1,399 +0,0 @@
---TEST--
-Test asort() function : usage variations - unexpected values for 'array_arg' argument
---FILE--
-<?php
-/* Prototype : bool asort(array &array_arg [, int sort_flags])
- * Description: Sort an array and maintain index association
- Elements will be arranged from lowest to highest when this function has completed.
- * Source code: ext/standard/array.c
-*/
-
-/*
- * testing asort() by providing different unexpected values for array argument with following flag values.
- * 1. flag value as defualt
- * 2. SORT_REGULAR - compare items normally
- * 3. SORT_NUMERIC - compare items numerically
- * 4. SORT_STRING - compare items as strings
-*/
-
-echo "*** Testing asort() : usage variations ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-//array of values with indices to iterate over
-$unexpected_values = array (
-
- // int data
- 0 => 0,
- 1 => 1,
- 2 => 12345,
- 3 => -2345,
-
- // float data
- 4 => 10.5,
- 5 => -10.5,
- 6 => 10.5e3,
- 7 => 10.6E-2,
- 8 => .5,
-
- // null data
- 9 => NULL,
- 10 => null,
-
- // boolean data
- 11 => true,
- 12 => false,
- 13 => TRUE,
- 14 => FALSE,
-
- // empty data
- 15 => "",
- 16 => '',
-
- // string data
- 17 => "string",
- 18 => 'string',
-
- // object data
- 19 => new stdclass(),
-
- // undefined data
- 20 => @undefined_var,
-
- // unset data
- 21 => @unset_var,
-
- // resource variable
- 22 => $fp
-
-);
-
-// loop though each element of the array and check the working of asort()
-// when $array argument is supplied with different values from $unexpected_values
-echo "\n-- Testing asort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- var_dump( asort($value) ); // expecting : bool(false)
- var_dump( asort($value, SORT_REGULAR) ); // expecting : bool(false)
- var_dump( asort($value, SORT_NUMERIC) ); // expecting : bool(false)
- var_dump( asort($value, SORT_STRING) ); // expecting : bool(false)
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/asort_variation2.phpt b/ext/standard/tests/array/asort_variation2.phpt
deleted file mode 100644
index e8dda190df..0000000000
--- a/ext/standard/tests/array/asort_variation2.phpt
+++ /dev/null
@@ -1,308 +0,0 @@
---TEST--
-Test asort() function : usage variations - unexpected values for 'sort_flags' argument
---FILE--
-<?php
-/* Prototype : proto bool asort(array &array_arg [, int sort_flags])
- * Description: Sort an array and maintain index association
- Elements will be arranged from lowest to highest when this function has completed.
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Testing asort() by providing different unexpected values for flag argument
-*/
-
-echo "*** Testing asort() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// temperory array for checking unexpected behavior
-$unsorted_values = array(1 => 10, 2 => 2, 3 => 45);
-
-//array of values to iterate over
-$unexpected_values = array(
-
- // int data
-/*1*/ -2345,
-
- // float data
-/*2*/ 10.5,
- -10.5,
- 10.5e2,
- 10.6E-2,
- .5,
-
- // null data
-/*7*/ NULL,
- null,
-
- // boolean data
-/*9*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*13*/ "",
- '',
-
- // string data
-/*15*/ "string",
- 'string',
-
- // object data
-/*16*/ new stdclass(),
-
- // undefined data
-/*17*/ @undefined_var,
-
- // unset data
-/*18*/ @unset_var,
-
- // resource variable
-/*19*/ $fp
-
-);
-
-// loop though each element of the array and check the working of asort()
-// when $flag argument is supplied with different values from $unexpected_values
-echo "\n-- Testing asort() by supplying different unexpected values for 'sort_flags' argument --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- $temp_array = $unsorted_values;
- var_dump( asort($temp_array, $value) );
- var_dump($temp_array);
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 13 --
-
-Warning: asort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: asort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: asort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: asort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: asort() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: asort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: asort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: asort() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
-Done
diff --git a/ext/standard/tests/array/count_variation1.phpt b/ext/standard/tests/array/count_variation1.phpt
deleted file mode 100644
index 10406f71ff..0000000000
--- a/ext/standard/tests/array/count_variation1.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test count() function : usage variations - Pass different data types as $var arg
---FILE--
-<?php
-/* Prototype : int count(mixed $var [, int $mode])
- * Description: Count the number of elements in a variable (usually an array)
- * Source code: ext/standard/array.c
- */
-
-/*
- * aPass different data types as $var argument to count() to test behaviour
- */
-
-echo "*** Testing count() : usage variations ***\n";
-
-//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 $var 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of count()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( count($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing count() : usage variations ***
-
--- Iteration 1 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 2 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 3 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 4 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 5 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 6 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 7 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 8 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 9 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 10 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(0)
-
--- Iteration 11 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(0)
-
--- Iteration 12 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 13 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 14 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 15 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 16 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 17 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 18 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 19 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 20 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 21 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-
--- Iteration 22 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(0)
-
--- Iteration 23 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(0)
-
--- Iteration 24 --
-
-Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
-int(1)
-Done
diff --git a/ext/standard/tests/array/count_variation2.phpt b/ext/standard/tests/array/count_variation2.phpt
deleted file mode 100644
index 0a654be183..0000000000
--- a/ext/standard/tests/array/count_variation2.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-Test count() function : usage variations - Pass different data types as $mode arg
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : int count(mixed $var [, int $mode])
- * Description: Count the number of elements in a variable (usually an array)
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $mode argument to count() to test behaviour
- */
-
-echo "*** Testing count() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$var = array(1, 2, array ('one', 'two'));
-
-//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 $mode 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of count()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( count($var, $input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing count() : usage variations ***
-
--- Iteration 1 --
-int(3)
-
--- Iteration 2 --
-int(5)
-
--- Iteration 3 --
-int(3)
-
--- Iteration 4 --
-int(3)
-
--- Iteration 5 --
-int(3)
-
--- Iteration 6 --
-int(3)
-
--- Iteration 7 --
-int(3)
-
--- Iteration 8 --
-int(3)
-
--- Iteration 9 --
-int(3)
-
--- Iteration 10 --
-int(3)
-
--- Iteration 11 --
-int(3)
-
--- Iteration 12 --
-int(5)
-
--- Iteration 13 --
-int(3)
-
--- Iteration 14 --
-int(5)
-
--- Iteration 15 --
-int(3)
-
--- Iteration 16 --
-
-Warning: count() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: count() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: count() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: count() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: count() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: count() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-int(3)
-
--- Iteration 23 --
-int(3)
-
--- Iteration 24 --
-
-Warning: count() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/current_variation1.phpt b/ext/standard/tests/array/current_variation1.phpt
deleted file mode 100644
index c6c66f43c9..0000000000
--- a/ext/standard/tests/array/current_variation1.phpt
+++ /dev/null
@@ -1,217 +0,0 @@
---TEST--
-Test current() function : usage variations - Pass different data types as $array_arg arg
---FILE--
-<?php
-/* Prototype : mixed current(array $array_arg)
- * Description: Return the element currently pointed to by the internal array pointer
- * Source code: ext/standard/array.c
- * Alias to functions: pos
- */
-
-/*
- * Pass different data types as $array_arg argument to current() to test behaviour
- */
-
-echo "*** Testing current() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- var $var1;
- 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 $array_arg 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of current()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( current($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing current() : usage variations ***
-
--- Iteration 1 --
-
-Warning: current() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: current() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: current() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: current() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: current() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: current() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: current() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: current() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-NULL
-
--- Iteration 22 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: current() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/end_variation1.phpt b/ext/standard/tests/array/end_variation1.phpt
deleted file mode 100644
index 2b7f4cd9d4..0000000000
--- a/ext/standard/tests/array/end_variation1.phpt
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test end() function : usage variations - Pass different data types as $array_arg
---FILE--
-<?php
-/* Prototype : mixed end(array $array_arg)
- * Description: Advances array argument's internal pointer to the last element and return it
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg to test behaviour of end()
- */
-
-echo "*** Testing end() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- var $foo = 'hello, world';
- 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 $array_arg 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 end()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( end($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing end() : usage variations ***
-
--- Iteration 1 --
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: end() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: end() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: end() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: end() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: end() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: end() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: end() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: end() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: end() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-string(12) "hello, world"
-
--- Iteration 23 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: end() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/key_variation1.phpt b/ext/standard/tests/array/key_variation1.phpt
deleted file mode 100644
index 12a97e1421..0000000000
--- a/ext/standard/tests/array/key_variation1.phpt
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test key() function : usage variations - Pass different data types as $array_arg arg.
---FILE--
-<?php
-/* Prototype : mixed key(array $array_arg)
- * Description: Return the key of the element currently pointed to by the internal array pointer
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to test behaviour of key()
- */
-
-echo "*** Testing key() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- var $var1;
- 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 $array_arg 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 key()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( key($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing key() : usage variations ***
-
--- Iteration 1 --
-
-Warning: key() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: key() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: key() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: key() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: key() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: key() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: key() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: key() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-NULL
-
--- Iteration 19 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-string(4) "var1"
-
--- Iteration 23 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: key() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/krsort_variation1.phpt b/ext/standard/tests/array/krsort_variation1.phpt
deleted file mode 100644
index 8b44de314e..0000000000
--- a/ext/standard/tests/array/krsort_variation1.phpt
+++ /dev/null
@@ -1,397 +0,0 @@
---TEST--
-Test krsort() function : usage variations - unexpected values for 'array' argument
---FILE--
-<?php
-/* Prototype : bool krsort(array &array_arg [, int sort_flags])
- * Description: Sort an array by key in reverse order, maintaining key to data correlation
- * Source code: ext/standard/array.c
-*/
-
-/*
- * testing krsort() by providing different unexpected values for array argument
- * with following flag values:
- * 1.flag value as defualt
- * 2.SORT_REGULAR - compare items normally
- * 3.SORT_NUMERIC - compare items numerically
- * 4.SORT_STRING - compare items as strings
-*/
-
-echo "*** Testing krsort() : usage variations ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-$unexpected_values = array (
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e3,
- 10.6E-2,
- 0.5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*11*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*15*/ "",
- '',
-
- // string data
-/*17*/ "string",
- 'string',
-
- // object data
-/*19*/ new stdclass(),
-
- // undefined data
-/*20*/ @undefined_var,
-
- // unset data
-/*21*/ @unset_var,
-
- // resource variable
-/*22*/ $fp
-);
-
-// loop though each element of the array and check the working of krsort()
-// when $array argument is supplied with different values from $unexpected_values
-echo "\n-- Testing krsort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- var_dump( krsort($value) ); // expecting : bool(false)
- var_dump( krsort($value, SORT_REGULAR) ); // expecting : bool(false)
- var_dump( krsort($value, SORT_NUMERIC) ); // expecting : bool(false)
- var_dump( krsort($value, SORT_STRING) ); // expecting : bool(false)
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/krsort_variation2.phpt b/ext/standard/tests/array/krsort_variation2.phpt
deleted file mode 100644
index 95080b5507..0000000000
--- a/ext/standard/tests/array/krsort_variation2.phpt
+++ /dev/null
@@ -1,307 +0,0 @@
---TEST--
-Test krsort() function : usage variations - unexpected values for 'sort_flags' argument
---FILE--
-<?php
-/* Prototype : bool krsort(array &array_arg [, int sort_flags])
- * Description: Sort an array by key in reverse order, maintaining key to data correlation
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Testing krsort() by providing different unexpected values for flag argument
-*/
-
-echo "*** Testing krsort() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// an array for checking unexpected behavior
-$unsorted_values = array(10 => 10, 2 => 2, 45 => 45);
-
-//array of unexpected values to iterate over
-$unexpected_values = array (
-
- // int data
-/*1*/ -2345,
-
- // float data
-/*2*/ 10.5,
- -10.5,
- 10.5e2,
- 10.6E-2,
- .5,
-
- // null data
-/*7*/ NULL,
- null,
-
- // boolean data
-/*9*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*13*/ "",
- '',
-
- // string data
-/*15*/ "string",
- 'string',
-
- // object data
-/*16*/ new stdclass(),
-
- // undefined data
-/*17*/ @undefined_var,
-
- // unset data
-/*18*/ @unset_var,
-
- // resource variable
-/*19*/ $fp
-
-);
-
-// loop though each element of the array and check the working of krsort()
-// when 'sort_flags' argument is supplied with different values
-echo "\n-- Testing krsort() by supplying different unexpected values for 'sort_flags' argument --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- $temp_array = $unsorted_values;
- var_dump( krsort($temp_array, $value) );
- var_dump($temp_array);
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [2]=>
- int(2)
- [10]=>
- int(10)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 13 --
-
-Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: krsort() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: krsort() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
-Done
diff --git a/ext/standard/tests/array/ksort_variation1.phpt b/ext/standard/tests/array/ksort_variation1.phpt
deleted file mode 100644
index 185fac760c..0000000000
--- a/ext/standard/tests/array/ksort_variation1.phpt
+++ /dev/null
@@ -1,397 +0,0 @@
---TEST--
-Test ksort() function : usage variations - unexpected values for 'array' argument
---FILE--
-<?php
-/* Prototype : bool ksort(array &array [, int sort_flags])
- * Description: Sort an array by key, maintaining key to data correlation
- * Source code: ext/standard/array.c
-*/
-
-/*
- * testing ksort() by providing different unexpected values for array argument with following flag values:
- * 1. flag value as defualt
- * 2. SORT_REGULAR - compare items normally
- * 3. SORT_NUMERIC - compare items numerically
- * 4. SORT_STRING - compare items as strings
-*/
-
-echo "*** Testing ksort() : usage variations ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-$unexpected_values = array (
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e3,
- 10.6E-2,
- 0.5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*11*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*15*/ "",
- '',
-
- // string data
-/*17*/ "string",
- 'string',
-
- // object data
-/*19*/ new stdclass(),
-
- // undefined data
-/*20*/ @undefined_var,
-
- // unset data
-/*21*/ @unset_var,
-
- // resource variable
-/*22*/ $fp
-
-);
-
-// loop though each element of the array and check the working of ksort()
-// when $array argument is supplied with different values from $unexpected_values
-echo "\n-- Testing ksort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- var_dump( ksort($value) ); // expecting : bool(false)
- var_dump( ksort($value, SORT_REGULAR) ); // expecting : bool(false)
- var_dump( ksort($value, SORT_NUMERIC) ); // expecting : bool(false)
- var_dump( ksort($value, SORT_STRING) ); // expecting : bool(false)
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/ksort_variation2.phpt b/ext/standard/tests/array/ksort_variation2.phpt
deleted file mode 100644
index c80541ea27..0000000000
--- a/ext/standard/tests/array/ksort_variation2.phpt
+++ /dev/null
@@ -1,307 +0,0 @@
---TEST--
-Test ksort() function : usage variations - unexpected values for 'sort_flags' argument
---FILE--
-<?php
-/* Prototype : bool ksort(array &array_arg [, int sort_flags])
- * Description: Sort an array by key, maintaining key to data correlation
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Testing ksort() by providing different unexpected values for flag argument
-*/
-
-echo "*** Testing ksort() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// an array for checking unexpected behavior
-$unsorted_values = array(10 => 10, 2 => 2, 45 => 45);
-
-//array of unexpected values to iterate over
-$unexpected_values = array (
-
- // int data
-/*1*/ -2345,
-
- // float data
-/*2*/ 10.5,
- -10.5,
- 10.5e2,
- 10.6E-2,
- .5,
-
- // null data
-/*7*/ NULL,
- null,
-
- // boolean data
-/*9*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*13*/ "",
- '',
-
- // string data
-/*15*/ "string",
- 'string',
-
- // object data
-/*16*/ new stdclass(),
-
- // undefined data
-/*17*/ @undefined_var,
-
- // unset data
-/*18*/ @unset_var,
-
- // resource variable
-/*19*/ $fp
-
-);
-
-// loop though each element of the array and check the working of ksort()
-// when 'sort_flags' argument is supplied with different values
-echo "\n-- Testing ksort() by supplying different unexpected values for 'sort_flags' argument --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- $temp_array = $unsorted_values;
- var_dump( ksort($temp_array, $value) );
- var_dump($temp_array);
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 13 --
-
-Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: ksort() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: ksort() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
-Done
diff --git a/ext/standard/tests/array/natcasesort_variation1.phpt b/ext/standard/tests/array/natcasesort_variation1.phpt
deleted file mode 100644
index 98d6297a3f..0000000000
--- a/ext/standard/tests/array/natcasesort_variation1.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test natcasesort() function : usage variations - Pass different data types as $array_arg arg
---FILE--
-<?php
-/* Prototype : bool natcasesort(array &$array_arg)
- * Description: Sort an array using case-insensitive natural sort
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to natcasesort() to test behaviour
- */
-
-echo "*** Testing natcasesort() : usage variation ***\n";
-
-//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 $array_arg 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 natcasesort()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( natcasesort($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing natcasesort() : usage variation ***
-
--- Iteration 1 --
-
-Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(true)
-
--- Iteration 19 --
-
-Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: natcasesort() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: natcasesort() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/next_variation1.phpt b/ext/standard/tests/array/next_variation1.phpt
deleted file mode 100644
index 405f34a435..0000000000
--- a/ext/standard/tests/array/next_variation1.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test next() function : usage variation - Pass different data types as $array_arg
---FILE--
-<?php
-/* Prototype : mixed next(array $array_arg)
- * Description: Move array argument's internal pointer to the next element and return it
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to next() to test behaviour
- */
-
-echo "*** Testing next() : variation ***\n";
-
-//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 $array_arg 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 next()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( next($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing next() : variation ***
-
--- Iteration 1 --
-
-Warning: next() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: next() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: next() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: next() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: next() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: next() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: next() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: next() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: next() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/prev_variation1.phpt b/ext/standard/tests/array/prev_variation1.phpt
deleted file mode 100644
index 01156d8239..0000000000
--- a/ext/standard/tests/array/prev_variation1.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test prev() function : usage variation - Pass different data types as $array_arg
---FILE--
-<?php
-/* Prototype : mixed prev(array $array_arg)
- * Description: Move array argument's internal pointer to the previous element and return it
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to prev() to test behaviour
- */
-
-echo "*** Testing prev() : variation ***\n";
-
-//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 $array_arg 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 prev()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( prev($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing prev() : variation ***
-
--- Iteration 1 --
-
-Warning: prev() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: prev() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: prev() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: prev() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: prev() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: prev() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: prev() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: prev() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: prev() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: prev() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: prev() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: prev() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: prev() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: prev() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: prev() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: prev() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: prev() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: prev() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: prev() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: prev() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: prev() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: prev() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: prev() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/reset_variation1.phpt b/ext/standard/tests/array/reset_variation1.phpt
deleted file mode 100644
index f273324902..0000000000
--- a/ext/standard/tests/array/reset_variation1.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test reset() function : usage variations - Pass different data types as $array_arg arg.
---FILE--
-<?php
-/* Prototype : mixed reset(array $array_arg)
- * Description: Set array argument's internal pointer to the first element and return it
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to reset() to test behaviour
- */
-
-echo "*** Testing reset() : usage variations ***\n";
-
-//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 $array_arg 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 reset()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( reset($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing reset() : usage variations ***
-
--- Iteration 1 --
-
-Warning: reset() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: reset() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: reset() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: reset() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: reset() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: reset() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: reset() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: reset() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: reset() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/rsort_variation1.phpt b/ext/standard/tests/array/rsort_variation1.phpt
deleted file mode 100644
index 5b83c89a29..0000000000
--- a/ext/standard/tests/array/rsort_variation1.phpt
+++ /dev/null
@@ -1,513 +0,0 @@
---TEST--
-Test rsort() function : usage variations - Pass different data types as $array_arg arg
---FILE--
-<?php
-/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
- * Description: Sort an array in reverse order
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to rsort() to test behaviour
- */
-
-echo "*** Testing rsort() : variation ***\n";
-
-//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 $array_arg 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of rsort()
-$iterator = 1;
-foreach ($inputs as $input) {
- echo "-- Iteration $iterator --\n";
- echo "Flag = default:\n";
- var_dump( rsort($input) );
- echo "Flag = SORT_REGULAR:\n";
- var_dump( rsort($input, SORT_REGULAR) );
- echo "Flag = SORT_NUMERIC:\n";
- var_dump( rsort($input, SORT_NUMERIC) );
- echo "Flag = SORT_STRING:\n";
- var_dump( rsort($input, SORT_STRING) );
- $iterator++;
-}
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing rsort() : variation ***
--- Iteration 1 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 2 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 4 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 5 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 6 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 7 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 8 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 9 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 10 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 13 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 14 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 15 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 16 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 21 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 22 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 23 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 24 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/rsort_variation2.phpt b/ext/standard/tests/array/rsort_variation2.phpt
deleted file mode 100644
index d2b3e0e423..0000000000
--- a/ext/standard/tests/array/rsort_variation2.phpt
+++ /dev/null
@@ -1,485 +0,0 @@
---TEST--
-Test rsort() function : usage variations - Pass different data types as $sort_flags arg
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
- * Description: Sort an array in reverse order
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $sort_flags argument to rsort() to test behaviour
- * Where possible, 'SORT_NUMERIC' has been entered as a string value
- */
-
-echo "*** Testing rsort() : variation ***\n";
-
-// Initialise function arguments not being substituted
-$array_arg = array (1, 5, 2, 3, 1);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "SORT_NUMERIC";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-SORT_NUMERIC
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $sort_flags 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*/ "",
- '',
-
- // string data
-/*18*/ "SORT_NUMERIC",
- 'SORT_NUMERIC',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of rsort()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
-
- //create temporary array in case rsort() works
- $temp = $array_arg;
-
- var_dump( rsort($temp, $input) );
- var_dump($temp);
- $iterator++;
-
- $temp = null;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing rsort() : variation ***
-
--- Iteration 1 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 2 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 3 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 4 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 5 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 6 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 7 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 8 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 9 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 10 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 11 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 12 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 13 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 14 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 15 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 16 --
-
-Warning: rsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 17 --
-
-Warning: rsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 18 --
-
-Warning: rsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 19 --
-
-Warning: rsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 20 --
-
-Warning: rsort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 21 --
-
-Warning: rsort() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 22 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 23 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 24 --
-
-Warning: rsort() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-Done
diff --git a/ext/standard/tests/array/shuffle_variation1.phpt b/ext/standard/tests/array/shuffle_variation1.phpt
deleted file mode 100644
index 3c0ab5051a..0000000000
--- a/ext/standard/tests/array/shuffle_variation1.phpt
+++ /dev/null
@@ -1,213 +0,0 @@
---TEST--
-Test shuffle() function : usage variations - unexpected values for 'array_arg' argument
---FILE--
-<?php
-/* Prototype : bool shuffle(array $array_arg)
- * Description: Randomly shuffle the contents of an array
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Test behaviour of shuffle() when unexpected values are passed for 'array_arg'
-* argument and verify that function outputs required warning messages wherever applicable
-*/
-
-echo "*** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n";
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//define a class
-class test
-{
- var $t = 10;
- function __toString()
- {
- return "object";
- }
-}
-
-//array of values to iterate over
-$values = 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*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new test(),
-
- // undefined data
-/*21*/ @$undefined_var,
-
- // unset data
-/*22*/ @$unset_var,
-
-/*23*/ // resource data
- $fp
-);
-
-// loop through the array to test shuffle() function
-// with each element of the array
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump( shuffle($value) );
- $count++;
-};
-
-// closing the resource
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing shuffle() : with unexpected values for 'array_arg' argument ***
-
--- Iteration 1 --
-
-Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: shuffle() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: shuffle() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/sort_variation1.phpt b/ext/standard/tests/array/sort_variation1.phpt
deleted file mode 100644
index 9eca22c680..0000000000
--- a/ext/standard/tests/array/sort_variation1.phpt
+++ /dev/null
@@ -1,398 +0,0 @@
---TEST--
-Test sort() function : usage variations - unexpected values for 'array_arg' argument
---FILE--
-<?php
-/* Prototype : bool sort(array &array_arg [, int $sort_flags])
- * Description: Sort an array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * testing sort() by providing different unexpected values for array argument
- * with following flag values.
- * 1. flag value as defualt
- * 2. SORT_REGULAR - compare items normally
- * 3. SORT_NUMERIC - compare items numerically
- * 4. SORT_STRING - compare items as strings
-*/
-
-echo "*** Testing sort() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$unexpected_values = array (
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.5e3,
- 10.6E-2,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // object data
-/*20*/ new stdclass(),
-
- // undefined data
-/*21*/ @undefined_var,
-
- // unset data
-/*22*/ @unset_var,
-
- // resource variable
-/*23*/ $fp
-);
-
-// loop though each element of the array and check the working of sort()
-// when $array argument is supplied with different values from $unexpected_values
-echo "\n-- Testing sort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
- $value = $unexpected_values [$index];
- var_dump( sort($value) ); // expecting : bool(false)
- var_dump( sort($value, SORT_REGULAR) ); // expecting : bool(false)
- var_dump( sort($value, SORT_NUMERIC) ); // expecting : bool(false)
- var_dump( sort($value, SORT_STRING) ); // expecting : bool(false)
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, int given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, float given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, bool given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/array/sort_variation2.phpt b/ext/standard/tests/array/sort_variation2.phpt
deleted file mode 100644
index 02e6af21af..0000000000
--- a/ext/standard/tests/array/sort_variation2.phpt
+++ /dev/null
@@ -1,311 +0,0 @@
---TEST--
-Test sort() function : usage variations - unexpected values for 'sort_flags' argument
---FILE--
-<?php
-/* Prototype : bool sort(array &array_arg [, int $sort_flags])
- * Description: Sort an array
- * Source code: ext/standard/array.c
-*/
-
-/*
- * Testing sort() by providing different unexpected values for flag argument
-*/
-
-echo "*** Testing sort() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// temperory array for checking unexpected behavior
-$unsorted_values = array(10, 2, 45);
-
-//array of values to iterate over
-$unexpected_values = array(
-
- // int data
-/*1*/ -2345,
-
- // float data
-/*2*/ 10.5,
- -10.5,
- 10.5e2,
- 10.6E-2,
- .5,
-
- // null data
-/*7*/ NULL,
- null,
-
- // boolean data
-/*9*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*13*/ "",
- '',
-
- // string data
-/*15*/ "string",
- 'string',
-
- // object data
-/*16*/ new stdclass(),
-
- // undefined data
-/*17*/ @undefined_var,
-
- // unset data
-/*18*/ @unset_var,
-
- // resource variable
-/*19*/ $fp
-
-);
-
-// loop though each element of the array and check the working of sort()
-// when $flag argument is supplied with different values
-echo "\n-- Testing sort() by supplying different unexpected values for 'flag' argument --\n";
-
-$counter = 1;
-for($index = 0; $index < count($unexpected_values); $index ++) {
- echo "-- Iteration $counter --\n";
-
- // sort the array, retain a temp. copy of input array for next iteration
- $value = $unexpected_values [$index];
- $temp_array = $unsorted_values;
- var_dump( sort($temp_array, $value) );
-
- //dump the sorted array
- var_dump($temp_array);
- $counter++;
-}
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying different unexpected values for 'flag' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 13 --
-
-Warning: sort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: sort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: sort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: sort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: sort() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: sort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: sort() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: sort() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
-Done
diff --git a/ext/standard/tests/array/uasort_variation1.phpt b/ext/standard/tests/array/uasort_variation1.phpt
deleted file mode 100644
index f3a849b938..0000000000
--- a/ext/standard/tests/array/uasort_variation1.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test uasort() function : usage variations - unexpected values for 'array_arg' argument
---FILE--
-<?php
-/* Prototype : bool uasort(array $array_arg, string $cmp_function)
- * Description: Sort an array with a user-defined comparison function and maintain index association
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing uasort() function by passing different scalar/nonscalar values as 'array_arg' argument
-*/
-
-echo "*** Testing uasort() : unexpected values for 'array_arg' ***\n";
-
-// Comparison function
-/* Prototype : int cmp_function(mixed $value1, mixed $value2)
- * Parameters : $value1 and $value2 - values to be compared
- * Return value : 0 - if both values are same
- * 1 - if value1 is greater than value2
- * -1 - if value1 is less than value2
- * Description : compares value1 and value2
- */
-function cmp_function($value1, $value2)
-{
- if($value1 == $value2) {
- return 0;
- }
- else if($value1 > $value2) {
- return 1;
- }
- else {
- return -1;
- }
-}
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get resource variable
-$fp = fopen(__FILE__,'r');
-
-//array of values to iterate over
-$input_values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
-
- // resource data
-/*20*/ $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/*22*/ @$unset_var,
-);
-
-// loop through each value of input_values
-for($count = 0; $count < count($input_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( uasort($input_values[$count], 'cmp_function') );
-};
-
-//closing resource
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing uasort() : unexpected values for 'array_arg' ***
--- Iteration 1 --
-
-Warning: uasort() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: uasort() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: uasort() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: uasort() expects parameter 1 to be array, int given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: uasort() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: uasort() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: uasort() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: uasort() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: uasort() expects parameter 1 to be array, float given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: uasort() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/uasort_variation2.phpt b/ext/standard/tests/array/uasort_variation2.phpt
deleted file mode 100644
index e5278fbab7..0000000000
--- a/ext/standard/tests/array/uasort_variation2.phpt
+++ /dev/null
@@ -1,212 +0,0 @@
---TEST--
-Test uasort() function : usage variations - unexpected values for 'cmp_function' argument
---FILE--
-<?php
-/* Prototype : bool uasort(array $array_arg, string $cmp_function)
- * Description: Sort an array with a user-defined comparison function and maintain index association
- * Source code: ext/standard/array.c
-*/
-
-/*
-* Testing uasort() function with different scalar and nonscalar values in place of 'cmp_function'
-*/
-
-echo "*** Testing uasort() : Unexpected values in place of comparison function ***\n";
-
-// Class definition for object variable
-class MyClass
-{
- public function __toString()
- {
- return 'object';
- }
-}
-
-$array_arg = array(0 => 1, 1 => -1, 2 => 3, 3 => 10, 4 => 4, 5 => 2, 6 => 8, 7 => 5);
-
-// Get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// Get resource variable
-$fp = fopen(__FILE__,'r');
-
-// different values for 'cmp_function'
-$cmp_values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/ "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
-/*25*/ new MyClass(),
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/*28*/ @$unset_var,
-);
-
-// loop through each element of the cmp_values for 'cmp_function'
-for($count = 0; $count < count($cmp_values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( uasort($array_arg, $cmp_values[$count]) );
-};
-
-//closing resource
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing uasort() : Unexpected values in place of comparison function ***
--- Iteration 1 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 26 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 27 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 28 --
-
-Warning: uasort() 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/uksort_variation1.phpt b/ext/standard/tests/array/uksort_variation1.phpt
deleted file mode 100644
index 21210dee7b..0000000000
--- a/ext/standard/tests/array/uksort_variation1.phpt
+++ /dev/null
@@ -1,224 +0,0 @@
---TEST--
-Test uksort() function : usage variation
---FILE--
-<?php
-/* Prototype : bool uksort(array array_arg, string cmp_function)
- * Description: Sort an array by keys using a user-defined comparison function
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing uksort() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$cmp_function = 'string_val';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for array_arg
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( uksort($value, $cmp_function) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing uksort() : usage variation ***
-
---int 0--
-
-Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d
-NULL
-
---int 1--
-
-Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d
-NULL
-
---int 12345--
-
-Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d
-NULL
-
---int -12345--
-
-Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d
-NULL
-
---float 10.5--
-
-Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d
-NULL
-
---float -10.5--
-
-Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d
-NULL
-
---float .5--
-
-Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d
-NULL
-
---lowercase null--
-
-Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d
-NULL
-
---lowercase true--
-
-Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d
-NULL
-
---lowercase false--
-
-Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d
-NULL
-
---string DQ--
-
-Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d
-NULL
-
---string SQ--
-
-Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d
-NULL
-
---mixed case string--
-
-Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d
-NULL
-
---heredoc--
-
-Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: uksort() expects parameter 1 to be array, object given in %suksort_variation1.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: uksort() expects parameter 1 to be array, object given in %suksort_variation1.php on line %d
-NULL
-
---undefined var--
-
-Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d
-NULL
-
---unset var--
-
-Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/uksort_variation2.phpt b/ext/standard/tests/array/uksort_variation2.phpt
deleted file mode 100644
index 5ac32f02b8..0000000000
--- a/ext/standard/tests/array/uksort_variation2.phpt
+++ /dev/null
@@ -1,224 +0,0 @@
---TEST--
-Test uksort() function : usage variation
---FILE--
-<?php
-/* Prototype : bool uksort(array array_arg, string cmp_function)
- * Description: Sort an array by keys using a user-defined comparison function
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing uksort() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$array_arg = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for cmp_function
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( uksort($array_arg, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing uksort() : usage variation ***
-
---int 0--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---int 1--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---int 12345--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---int -12345--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---float 10.5--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---float -10.5--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---float .5--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---empty array--
-
-Warning: uksort() expects parameter 2 to be a valid callback, array must have exactly two members in %suksort_variation2.php on line %d
-NULL
-
---int indexed array--
-
-Warning: uksort() expects parameter 2 to be a valid callback, array must have exactly two members in %suksort_variation2.php on line %d
-NULL
-
---associative array--
-
-Warning: uksort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %suksort_variation2.php on line %d
-NULL
-
---nested arrays--
-
-Warning: uksort() expects parameter 2 to be a valid callback, array must have exactly two members in %suksort_variation2.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---lowercase null--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---lowercase true--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---lowercase false--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: uksort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %suksort_variation2.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: uksort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %suksort_variation2.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---undefined var--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-
---unset var--
-
-Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation1.phpt b/ext/standard/tests/array/usort_variation1.phpt
deleted file mode 100644
index 14d740dd86..0000000000
--- a/ext/standard/tests/array/usort_variation1.phpt
+++ /dev/null
@@ -1,236 +0,0 @@
---TEST--
-Test usort() function : usage variations - Pass different data types as $array_arg arg
---FILE--
-<?php
-/* Prototype : bool usort(array $array_arg, string $cmp_function)
- * Description: Sort an array by values using a user-defined comparison function
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $array_arg argument to usort() to test behaviour
- */
-
-echo "*** Testing usort() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-function cmp_function($value1, $value2)
-{
- if($value1 == $value2) {
- return 0;
- }
- else if($value1 > $value2) {
- return 1;
- }
- else {
- return -1;
- }
-}
-
-//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 $array_arg 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 usort()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( usort($input, 'cmp_function') );
- $iterator++;
-};
-
-//closing resource
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing usort() : usage variations ***
-
--- Iteration 1 --
-
-Warning: usort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: usort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: usort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: usort() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: usort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: usort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: usort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: usort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: usort() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: usort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: usort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: usort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: usort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: usort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: usort() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: usort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: usort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(true)
-
--- Iteration 19 --
-
-Warning: usort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: usort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: usort() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: usort() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: usort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: usort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: usort() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation2.phpt b/ext/standard/tests/array/usort_variation2.phpt
deleted file mode 100644
index 9e31b2fcbf..0000000000
--- a/ext/standard/tests/array/usort_variation2.phpt
+++ /dev/null
@@ -1,242 +0,0 @@
---TEST--
-Test usort() function : usage variations - Pass different data types as $cmp_function arg
---FILE--
-<?php
-/* Prototype : bool usort(array $array_arg, string $cmp_function)
- * Description: Sort an array by values using a user-defined comparison function
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different data types as $cmp_function argument to usort() to test behaviour
- */
-
-echo "*** Testing usort() : usage variation ***\n";
-
-// Class definition for object variable
-class MyClass
-{
- public function __toString()
- {
- return 'object';
- }
-}
-
-$array_arg = array(0 => 1, 1 => -1, 2 => 3, 3 => 10, 4 => 4, 5 => 2, 6 => 8, 7 => 5);
-
-// Get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// Get resource variable
-$fp = fopen(__FILE__,'r');
-
-// different values for $cmp_function
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/ "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
-/*25*/ new MyClass(),
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/*28*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behavior of usort()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( usort($array_arg, $input) );
- $iterator++;
-};
-
-//closing resource
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing usort() : usage variation ***
-
--- Iteration 1 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: usort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: usort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: usort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: usort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: usort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: usort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: usort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: usort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: usort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 26 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 27 --
-
-Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 28 --
-
-Warning: usort() 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/class_object/class_exists_variation_001.phpt b/ext/standard/tests/class_object/class_exists_variation_001.phpt
deleted file mode 100644
index 561a77fa2c..0000000000
--- a/ext/standard/tests/class_object/class_exists_variation_001.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test class_exists() function : usage variations - unexpected types for argument 1
---FILE--
-<?php
-/* Prototype : proto bool class_exists(string classname [, bool autoload])
- * Description: Checks if the class exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-spl_autoload_register(function ($className) {
- echo "In autoload($className)\n";
-});
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing class_exists() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$autoload = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for classname
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( class_exists($value, $autoload) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing class_exists() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(67)
-Error: 8 - Undefined variable: unset_var, %s(70)
-
-Arg value 0
-In autoload(0)
-bool(false)
-
-Arg value 1
-In autoload(1)
-bool(false)
-
-Arg value 12345
-In autoload(12345)
-bool(false)
-
-Arg value -2345
-bool(false)
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-In autoload(101234567000)
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(1)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(1)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
-
-Arg value
-Error: 2 - class_exists() expects parameter 1 to be string, object given, %s(77)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/class_object/class_exists_variation_002.phpt b/ext/standard/tests/class_object/class_exists_variation_002.phpt
deleted file mode 100644
index 4b77d032ea..0000000000
--- a/ext/standard/tests/class_object/class_exists_variation_002.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test class_exists() function : usage variations - unexpected types for argument 2
---FILE--
-<?php
-/* Prototype : proto bool class_exists(string classname [, bool autoload])
- * Description: Checks if the class exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-spl_autoload_register(function ($className) {
- echo "In autoload($className)\n";
-});
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing class_exists() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$classname = 'string_val';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for autoload
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( class_exists($classname, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing class_exists() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(71)
-Error: 8 - Undefined variable: unset_var, %s(74)
-
-Arg value 0
-bool(false)
-
-Arg value 1
-In autoload(string_val)
-bool(false)
-
-Arg value 12345
-In autoload(string_val)
-bool(false)
-
-Arg value -2345
-In autoload(string_val)
-bool(false)
-
-Arg value 10.5
-In autoload(string_val)
-bool(false)
-
-Arg value -10.5
-In autoload(string_val)
-bool(false)
-
-Arg value 101234567000
-In autoload(string_val)
-bool(false)
-
-Arg value 1.07654321E-9
-In autoload(string_val)
-bool(false)
-
-Arg value 0.5
-In autoload(string_val)
-bool(false)
-Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(string_val)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(string_val)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value string
-In autoload(string_val)
-bool(false)
-
-Arg value string
-In autoload(string_val)
-bool(false)
-Error: 4096 - Object of class stdClass could not be converted to string, %s(80)
-
-Arg value
-Error: 2 - class_exists() expects parameter 2 to be bool, object given, %s(81)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/class_object/get_object_vars_variation_003.phpt b/ext/standard/tests/class_object/get_object_vars_variation_003.phpt
deleted file mode 100644
index 10be39bb7f..0000000000
--- a/ext/standard/tests/class_object/get_object_vars_variation_003.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test get_object_vars() function : usage variations - unexpected types for argument 1
---FILE--
-<?php
-/* Prototype : proto array get_object_vars(object obj)
- * Description: Returns an array of object properties
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing get_object_vars() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for obj
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( get_object_vars($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing get_object_vars() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line 56
-
-Notice: Undefined variable: unset_var in %s on line 59
-
-Arg value 0
-
-Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/class_object/interface_exists_variation1.phpt b/ext/standard/tests/class_object/interface_exists_variation1.phpt
deleted file mode 100644
index 3aee5037a5..0000000000
--- a/ext/standard/tests/class_object/interface_exists_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test interface_exists() function : usage variation
---FILE--
-<?php
-/* Prototype : bool interface_exists(string classname [, bool autoload])
- * Description: Checks if the class exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing interface_exists() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$autoload = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for classname
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( interface_exists($value, $autoload) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing interface_exists() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-
-Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d
-NULL
-
---int indexed array--
-
-Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d
-NULL
-
---associative array--
-
-Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d
-NULL
-
---nested arrays--
-
-Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-
-Warning: interface_exists() expects parameter 1 to be string, object given in %sinterface_exists_variation1.php on line %d
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/class_object/interface_exists_variation2.phpt b/ext/standard/tests/class_object/interface_exists_variation2.phpt
deleted file mode 100644
index 1f9a0af422..0000000000
--- a/ext/standard/tests/class_object/interface_exists_variation2.phpt
+++ /dev/null
@@ -1,204 +0,0 @@
---TEST--
-Test interface_exists() function : usage variation
---FILE--
-<?php
-/* Prototype : bool interface_exists(string classname [, bool autoload])
- * Description: Checks if the class exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing interface_exists() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$classname = 'aBogusInterfaceName';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for autoload
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( interface_exists($classname, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing interface_exists() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-
-Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d
-NULL
-
---int indexed array--
-
-Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d
-NULL
-
---associative array--
-
-Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d
-NULL
-
---nested arrays--
-
-Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---string DQ--
-bool(false)
-
---string SQ--
-bool(false)
-
---mixed case string--
-bool(false)
-
---heredoc--
-bool(false)
-
---instance of classWithToString--
-
-Warning: interface_exists() expects parameter 2 to be bool, object given in %sinterface_exists_variation2.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: interface_exists() expects parameter 2 to be bool, object given in %sinterface_exists_variation2.php on line %d
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/class_object/is_a_variation_002.phpt b/ext/standard/tests/class_object/is_a_variation_002.phpt
deleted file mode 100644
index 615a45ba33..0000000000
--- a/ext/standard/tests/class_object/is_a_variation_002.phpt
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test is_a() function : usage variations - wrong type for arg 2
---FILE--
-<?php
-/* Prototype : proto bool is_a(object object, string class_name)
- * Description: Returns true if the object is of this class or has this class as one of its parents
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-class C {
- function __toString() {
- return "C Instance";
- }
-}
-
-echo "*** Testing is_a() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$object = new stdclass();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new C,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for class_name
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( is_a($object, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing is_a() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line 64
-
-Notice: Undefined variable: unset_var in %s on line 67
-
-Arg value 0
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value 12345
-bool(false)
-
-Arg value -2345
-bool(false)
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-
-Arg value Array
-
-Warning: is_a() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: is_a() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: is_a() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: is_a() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: is_a() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value C Instance
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt
deleted file mode 100644
index a7ebab59c5..0000000000
--- a/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt
+++ /dev/null
@@ -1,176 +0,0 @@
---TEST--
-Test is_subclass_of() function : usage variations - unexpected type for arg 2
---FILE--
-<?php
-/* Prototype : proto bool is_subclass_of(object object, string class_name)
- * Description: Returns true if the object has this class as one of its parents
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-spl_autoload_register(function ($className) {
- echo "In autoload($className)\n";
-});
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing is_subclass_of() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$object = new stdclass();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for class_name
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( is_subclass_of($object, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing is_subclass_of() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(67)
-Error: 8 - Undefined variable: unset_var, %s(70)
-
-Arg value 0
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value 12345
-bool(false)
-
-Arg value -2345
-bool(false)
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Error: 4096 - Object of class stdClass could not be converted to string, %s(%d)
-
-Arg value
-Error: 2 - is_subclass_of() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/class_object/method_exists_variation_002.phpt b/ext/standard/tests/class_object/method_exists_variation_002.phpt
deleted file mode 100644
index ad97d49df7..0000000000
--- a/ext/standard/tests/class_object/method_exists_variation_002.phpt
+++ /dev/null
@@ -1,176 +0,0 @@
---TEST--
-Test method_exists() function : usage variations - unexpected type for arg 2
---FILE--
-<?php
-/* Prototype : proto bool method_exists(object object, string method)
- * Description: Checks if the class method exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-spl_autoload_register(function ($className) {
- echo "In autoload($className)\n";
-});
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing method_exists() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$object = new stdclass();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for method
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( method_exists($object, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing method_exists() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(67)
-Error: 8 - Undefined variable: unset_var, %s(70)
-
-Arg value 0
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value 12345
-bool(false)
-
-Arg value -2345
-bool(false)
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
-
-Arg value
-Error: 2 - method_exists() expects parameter 2 to be string, object given, %s(77)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/class_object/trait_exists_variation_001.phpt b/ext/standard/tests/class_object/trait_exists_variation_001.phpt
deleted file mode 100644
index b51126c1ed..0000000000
--- a/ext/standard/tests/class_object/trait_exists_variation_001.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test trait_exists() function : usage variations - unexpected types for argument 1
---FILE--
-<?php
-/* Prototype : proto bool trait_exists(string traitname [, bool autoload])
- * Description: Checks if the trait exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-spl_autoload_register(function ($traitName) {
- echo "In autoload($traitName)\n";
-});
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing trait_exists() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$autoload = true;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for traitname
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( trait_exists($value, $autoload) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing trait_exists() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(67)
-Error: 8 - Undefined variable: unset_var, %s(70)
-
-Arg value 0
-In autoload(0)
-bool(false)
-
-Arg value 1
-In autoload(1)
-bool(false)
-
-Arg value 12345
-In autoload(12345)
-bool(false)
-
-Arg value -2345
-bool(false)
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-In autoload(101234567000)
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(1)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(1)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
-
-Arg value
-Error: 2 - trait_exists() expects parameter 1 to be string, object given, %s(77)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/class_object/trait_exists_variation_002.phpt b/ext/standard/tests/class_object/trait_exists_variation_002.phpt
deleted file mode 100644
index a4a4a209ec..0000000000
--- a/ext/standard/tests/class_object/trait_exists_variation_002.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test trait_exists() function : usage variations - unexpected types for argument 2
---FILE--
-<?php
-/* Prototype : proto bool trait_exists(string traitname [, bool autoload])
- * Description: Checks if the trait exists
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-spl_autoload_register(function ($traitName) {
- echo "In autoload($traitName)\n";
-});
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing trait_exists() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$traitname = 'string_val';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for autoload
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( trait_exists($traitname, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing trait_exists() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(71)
-Error: 8 - Undefined variable: unset_var, %s(74)
-
-Arg value 0
-bool(false)
-
-Arg value 1
-In autoload(string_val)
-bool(false)
-
-Arg value 12345
-In autoload(string_val)
-bool(false)
-
-Arg value -2345
-In autoload(string_val)
-bool(false)
-
-Arg value 10.5
-In autoload(string_val)
-bool(false)
-
-Arg value -10.5
-In autoload(string_val)
-bool(false)
-
-Arg value 101234567000
-In autoload(string_val)
-bool(false)
-
-Arg value 1.07654321E-9
-In autoload(string_val)
-bool(false)
-
-Arg value 0.5
-In autoload(string_val)
-bool(false)
-Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d)
-
-Arg value Array
-Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(string_val)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-In autoload(string_val)
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value string
-In autoload(string_val)
-bool(false)
-
-Arg value string
-In autoload(string_val)
-bool(false)
-Error: 4096 - Object of class stdClass could not be converted to string, %s(80)
-
-Arg value
-Error: 2 - trait_exists() expects parameter 2 to be bool, object given, %s(81)
-NULL
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-Done
diff --git a/ext/standard/tests/file/basename_variation3.phpt b/ext/standard/tests/file/basename_variation3.phpt
deleted file mode 100644
index 684e538d76..0000000000
--- a/ext/standard/tests/file/basename_variation3.phpt
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test basename() function : first parameter type variations
---FILE--
-<?php
-/* Prototype : string basename(string path [, string suffix])
- * Description: Returns the filename component of the path
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing basename() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( basename($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing basename() : usage variation ***
-
---int 0--
-string(1) "0"
-
---int 1--
-string(1) "1"
-
---int 12345--
-string(5) "12345"
-
---int -12345--
-string(5) "-2345"
-
---float 10.5--
-string(4) "10.5"
-
---float -10.5--
-string(5) "-10.5"
-
---float 12.3456789000e10--
-string(12) "123456789000"
-
---float -12.3456789000e10--
-string(13) "-123456789000"
-
---float .5--
-string(3) "0.5"
-
---empty array--
-Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(0) ""
-
---lowercase null--
-string(0) ""
-
---lowercase true--
-string(1) "1"
-
---lowercase false--
-string(0) ""
-
---uppercase TRUE--
-string(1) "1"
-
---uppercase FALSE--
-string(0) ""
-
---empty string DQ--
-string(0) ""
-
---empty string SQ--
-string(0) ""
-
---instance of classWithToString--
-string(14) "Class A object"
-
---instance of classWithoutToString--
-Error: 2 - basename() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-string(0) ""
-
---unset var--
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/file/basename_variation4.phpt b/ext/standard/tests/file/basename_variation4.phpt
deleted file mode 100644
index 2bb94870df..0000000000
--- a/ext/standard/tests/file/basename_variation4.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test basename() function : second parameter type variation
---FILE--
-<?php
-/* Prototype : string basename(string path [, string suffix])
- * Description: Returns the filename component of the path
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing basename() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted
-$path = 'path';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for suffix
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( basename($path, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing basename() : usage variation ***
-
---int 0--
-string(4) "path"
-
---int 1--
-string(4) "path"
-
---int 12345--
-string(4) "path"
-
---int -12345--
-string(4) "path"
-
---float 10.5--
-string(4) "path"
-
---float -10.5--
-string(4) "path"
-
---float 12.3456789000e10--
-string(4) "path"
-
---float -12.3456789000e10--
-string(4) "path"
-
---float .5--
-string(4) "path"
-
---empty array--
-Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(4) "path"
-
---lowercase null--
-string(4) "path"
-
---lowercase true--
-string(4) "path"
-
---lowercase false--
-string(4) "path"
-
---uppercase TRUE--
-string(4) "path"
-
---uppercase FALSE--
-string(4) "path"
-
---empty string DQ--
-string(4) "path"
-
---empty string SQ--
-string(4) "path"
-
---instance of classWithToString--
-string(4) "path"
-
---instance of classWithoutToString--
-Error: 2 - basename() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-string(4) "path"
-
---unset var--
-string(4) "path"
-===DONE===
diff --git a/ext/standard/tests/file/chmod_variation3.phpt b/ext/standard/tests/file/chmod_variation3.phpt
deleted file mode 100644
index bc6f0dc860..0000000000
--- a/ext/standard/tests/file/chmod_variation3.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test chmod() function : first parameter variation
---FILE--
-<?php
-/* Prototype : bool chmod(string filename, int mode)
- * Description: Change file mode
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing chmod() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$mode = 0777;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for filename
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( chmod($value, $mode) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing chmod() : usage variation ***
-
---int 0--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - chmod(): No such file or directory, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - chmod() expects parameter 1 to be a valid path, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - chmod(): %s, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/chmod_variation4.phpt b/ext/standard/tests/file/chmod_variation4.phpt
deleted file mode 100644
index e0da9f66ee..0000000000
--- a/ext/standard/tests/file/chmod_variation4.phpt
+++ /dev/null
@@ -1,202 +0,0 @@
---TEST--
-Test chmod() function : second parameter variation
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : bool chmod(string filename, int mode)
- * Description: Change file mode
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing chmod() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted
-$filename = __FILE__ . ".tmp";
-$fd = fopen($filename, "w+");
-fclose($fd);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for mode
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( chmod($filename, $value) );
-};
-
-chmod($filename, 0777);
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing chmod() : usage variation ***
-
---float 10.5--
-bool(true)
-
---float -10.5--
-bool(true)
-
---float 12.3456789000e10--
-bool(true)
-
---float -12.3456789000e10--
-bool(true)
-
---float .5--
-bool(true)
-
---empty array--
-Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-bool(true)
-
---lowercase false--
-bool(true)
-
---uppercase TRUE--
-bool(true)
-
---uppercase FALSE--
-bool(true)
-
---empty string DQ--
-Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - chmod() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - chmod() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/dirname_variation1.phpt b/ext/standard/tests/file/dirname_variation1.phpt
deleted file mode 100644
index 5e97982a9a..0000000000
--- a/ext/standard/tests/file/dirname_variation1.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-Test dirname() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : string dirname(string path)
- * Description: Returns the directory name component of the path
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing dirname() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( dirname($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing dirname() : usage variation ***
-
---int 0--
-string(1) "."
-
---int 1--
-string(1) "."
-
---int 12345--
-string(1) "."
-
---int -12345--
-string(1) "."
-
---float 10.5--
-string(1) "."
-
---float -10.5--
-string(1) "."
-
---float 12.3456789000e10--
-string(1) "."
-
---float -12.3456789000e10--
-string(1) "."
-
---float .5--
-string(1) "."
-
---empty array--
-Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(0) ""
-
---lowercase null--
-string(0) ""
-
---lowercase true--
-string(1) "."
-
---lowercase false--
-string(0) ""
-
---uppercase TRUE--
-string(1) "."
-
---uppercase FALSE--
-string(0) ""
-
---empty string DQ--
-string(0) ""
-
---empty string SQ--
-string(0) ""
-
---instance of classWithToString--
-string(1) "."
-
---instance of classWithoutToString--
-Error: 2 - dirname() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-string(0) ""
-
---unset var--
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation3.phpt b/ext/standard/tests/file/file_get_contents_variation3.phpt
deleted file mode 100644
index 9e8de27f3f..0000000000
--- a/ext/standard/tests/file/file_get_contents_variation3.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test file_get_contents() function : usage variation - different type for use_include_path
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])
- * Description: Read the entire file into a string
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file_get_contents() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'FileGetContentsVar3.tmp';
-$absFile = dirname(__FILE__).'/'.$filename;
-$h = fopen($absFile,"w");
-fwrite($h, "contents read");
-fclose($h);
-
-
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for use_include_path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file_get_contents($absFile, $value) );
-};
-
-unlink($absFile);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file_get_contents() : usage variation ***
-
---int 0--
-string(13) "contents read"
-
---int 1--
-string(13) "contents read"
-
---int 12345--
-string(%d) "contents read"
-
---int -12345--
-string(%d) "contents read"
-
---float 10.5--
-string(%d) "contents read"
-
---float -10.5--
-string(%d) "contents read"
-
---float 12.3456789000e10--
-string(%d) "contents read"
-
---float -12.3456789000e10--
-string(%d) "contents read"
-
---float .5--
-string(%d) "contents read"
-
---empty array--
-Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(%d) "contents read"
-
---lowercase null--
-string(%d) "contents read"
-
---lowercase true--
-string(%d) "contents read"
-
---lowercase false--
-string(%d) "contents read"
-
---uppercase TRUE--
-string(%d) "contents read"
-
---uppercase FALSE--
-string(%d) "contents read"
-
---empty string DQ--
-string(%d) "contents read"
-
---empty string SQ--
-string(%d) "contents read"
-
---string DQ--
-string(%d) "contents read"
-
---string SQ--
-string(%d) "contents read"
-
---mixed case string--
-string(%d) "contents read"
-
---heredoc--
-string(%d) "contents read"
-
---instance of classWithToString--
-Error: 2 - file_get_contents() expects parameter 2 to be bool, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file_get_contents() expects parameter 2 to be bool, object given, %s(%d)
-NULL
-
---undefined var--
-string(%d) "contents read"
-
---unset var--
-string(%d) "contents read"
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation4.phpt b/ext/standard/tests/file/file_get_contents_variation4.phpt
deleted file mode 100644
index 0ca7a6bf20..0000000000
--- a/ext/standard/tests/file/file_get_contents_variation4.phpt
+++ /dev/null
@@ -1,251 +0,0 @@
---TEST--
-Test file_get_contents() function : usage variation - different types for context.
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])
- * Description: Read the entire file into a string
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file_get_contents() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'FileGetContentsVar4.tmp';
-$absFile = dirname(__FILE__).'/'.$filename;
-$h = fopen($absFile,"w");
-fwrite($h, "contents read");
-fclose($h);
-
-$fileRes = fopen(__FILE__,'r');
-$strContext = stream_context_create();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //non context resource
- 'file resource' => $fileRes,
-
- //valid stream context
- 'stream context' => $strContext,
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file_get_contents($absFile, false, $value) );
-};
-
-unlink($absFile);
-fclose($fileRes);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file_get_contents() : usage variation ***
-
---int 0--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---int 1--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---int 12345--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---int -12345--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---float 10.5--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float -10.5--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float 12.3456789000e10--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float .5--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---empty array--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(%d) "contents read"
-
---lowercase null--
-string(%d) "contents read"
-
---lowercase true--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---lowercase false--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---uppercase TRUE--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---uppercase FALSE--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---empty string DQ--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file_get_contents() expects parameter 3 to be resource, object given, %s(%d)
-NULL
-
---undefined var--
-string(%d) "contents read"
-
---unset var--
-string(%d) "contents read"
-
---file resource--
-Error: 2 - file_get_contents(): supplied resource is not a valid Stream-Context resource, %s(%d)
-string(%d) "contents read"
-
---stream context--
-string(%d) "contents read"
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt
deleted file mode 100644
index 6cc2054589..0000000000
--- a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt
+++ /dev/null
@@ -1,236 +0,0 @@
---TEST--
-Test file_get_contents() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])
- * Description: Read the entire file into a string
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file_get_contents() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'FileGetContentsVar5.tmp';
-$absFile = dirname(__FILE__).'/'.$filename;
-$h = fopen($absFile,"w");
-fwrite($h, "contents read");
-fclose($h);
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
- 'int -10' => -10,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float -22.5' => -22.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for offset
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file_get_contents($absFile, false, null, $value) );
-};
-
-unlink($absFile);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file_get_contents() : usage variation ***
-
---int 0--
-string(%d) "contents read"
-
---int 1--
-string(%d) "ontents read"
-
---int 12345--
-string(%d) ""
-
---int -12345--
-Error: 2 - file_get_contents(): Failed to seek to position -12345 in the stream, %s(%d)
-bool(false)
-
---int -10--
-string(10) "tents read"
-
---float 10.5--
-string(3) "ead"
-
---float -10.5--
-string(10) "tents read"
-
---float -22.5--
-Error: 2 - file_get_contents(): Failed to seek to position -22 in the stream, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - file_get_contents() expects parameter 4 to be int, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - file_get_contents() expects parameter 4 to be int, float given, %s(%d)
-NULL
-
---float .5--
-string(%d) "contents read"
-
---empty array--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(%d) "contents read"
-
---lowercase null--
-string(%d) "contents read"
-
---lowercase true--
-string(12) "ontents read"
-
---lowercase false--
-string(%d) "contents read"
-
---uppercase TRUE--
-string(12) "ontents read"
-
---uppercase FALSE--
-string(%d) "contents read"
-
---empty string DQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-string(%d) "contents read"
-
---unset var--
-string(%d) "contents read"
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt
deleted file mode 100644
index d0b74757d2..0000000000
--- a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt
+++ /dev/null
@@ -1,235 +0,0 @@
---TEST--
-Test file_get_contents() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])
- * Description: Read the entire file into a string
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file_get_contents() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'FileGetContentsVar5.tmp';
-$absFile = dirname(__FILE__).'/'.$filename;
-$h = fopen($absFile,"w");
-fwrite($h, "contents read");
-fclose($h);
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
- 'int -10' => -10,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float -22.5' => -22.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for offset
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file_get_contents($absFile, false, null, $value) );
-};
-
-unlink($absFile);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file_get_contents() : usage variation ***
-
---int 0--
-string(%d) "contents read"
-
---int 1--
-string(%d) "ontents read"
-
---int 12345--
-string(%d) ""
-
---int -12345--
-Error: 2 - file_get_contents(): Failed to seek to position -12345 in the stream, %s(%d)
-bool(false)
-
---int -10--
-string(10) "tents read"
-
---float 10.5--
-string(3) "ead"
-
---float -10.5--
-string(10) "tents read"
-
---float -22.5--
-Error: 2 - file_get_contents(): Failed to seek to position -22 in the stream, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-string(%d) %s
-
---float -12.3456789000e10--
-Error: 2 - file_get_contents(): Failed to seek to position -123456789000 in the stream, %s(%d)
-bool(false)
-
---float .5--
-string(%d) "contents read"
-
---empty array--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(%d) "contents read"
-
---lowercase null--
-string(%d) "contents read"
-
---lowercase true--
-string(12) "ontents read"
-
---lowercase false--
-string(%d) "contents read"
-
---uppercase TRUE--
-string(12) "ontents read"
-
---uppercase FALSE--
-string(%d) "contents read"
-
---empty string DQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-string(%d) "contents read"
-
---unset var--
-string(%d) "contents read"
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation6.phpt b/ext/standard/tests/file/file_get_contents_variation6.phpt
deleted file mode 100644
index f30cac10d2..0000000000
--- a/ext/standard/tests/file/file_get_contents_variation6.phpt
+++ /dev/null
@@ -1,215 +0,0 @@
---TEST--
-Test file_get_contents() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])
- * Description: Read the entire file into a string
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file_get_contents() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'FileGetContentsVar5.tmp';
-$absFile = dirname(__FILE__).'/'.$filename;
-$h = fopen($absFile,"w");
-fwrite($h, "contents read");
-fclose($h);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for maxlen
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file_get_contents($absFile, false, null, 0, $value) );
-};
-
-unlink($absFile);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file_get_contents() : usage variation ***
-
---int 0--
-string(%d) ""
-
---int 1--
-string(%d) "c"
-
---int 12345--
-string(%d) "contents read"
-
---int -12345--
-Error: 2 - file_get_contents(): length must be greater than or equal to zero, %s(%d)
-bool(false)
-
---float 10.5--
-string(%d) "contents r"
-
---float -10.5--
-Error: 2 - file_get_contents(): length must be greater than or equal to zero, %s(%d)
-bool(false)
-
---float .5--
-string(%d) ""
-
---empty array--
-Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(%d) ""
-
---lowercase null--
-string(%d) ""
-
---lowercase true--
-string(%d) "c"
-
---lowercase false--
-string(%d) ""
-
---uppercase TRUE--
-string(%d) "c"
-
---uppercase FALSE--
-string(%d) ""
-
---empty string DQ--
-Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - file_get_contents() expects parameter 5 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file_get_contents() expects parameter 5 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-string(%d) ""
-
---unset var--
-string(%d) ""
-===DONE===
diff --git a/ext/standard/tests/file/file_variation2.phpt b/ext/standard/tests/file/file_variation2.phpt
deleted file mode 100644
index 9c3ad0e546..0000000000
--- a/ext/standard/tests/file/file_variation2.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test file() function : first parameter variation
---FILE--
-<?php
-/* Prototype : array file(string filename [, int flags[, resource context]])
- * Description: Read entire file into an array
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted
-$flags = 0;
-$context = stream_context_create();
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for filename
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file($value, $flags, $context) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file() : usage variation ***
-
---int 0--
-Error: 2 - file(0): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - file(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - file(12345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - file(-2345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - file(10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - file(-10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - file(123456789000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - file(-123456789000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - file(0.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - file(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - file(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - file(Class A object): failed to open stream: %s, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - file() expects parameter 1 to be a valid path, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - file(): Filename cannot be empty, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/file_variation3.phpt b/ext/standard/tests/file/file_variation3.phpt
deleted file mode 100644
index 014adec6d8..0000000000
--- a/ext/standard/tests/file/file_variation3.phpt
+++ /dev/null
@@ -1,296 +0,0 @@
---TEST--
-Test file() function : second parameter variation
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : array file(string filename [, int flags[, resource context]])
- * Description: Read entire file into an array
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted
-$filename = __FILE__ . ".tmp";
-$fd = fopen($filename, "w+");
-fwrite($fd, "Line 1\nLine 2\nLine 3");
-fclose($fd);
-
-$context = stream_context_create();
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for flags
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file($filename, $value, $context) );
-};
-
-unlink(__FILE__ . ".tmp");
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file() : usage variation ***
-
---float 10.5--
-array(3) {
- [0]=>
- string(6) "Line 1"
- [1]=>
- string(6) "Line 2"
- [2]=>
- string(6) "Line 3"
-}
-
---float -10.5--
-Error: 2 - file(): '-10' flag is not supported, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - file(): '%i' flag is not supported, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - file(): '%i' flag is not supported, %s(%d)
-bool(false)
-
---float .5--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---empty array--
-Error: 2 - file() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---lowercase null--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---lowercase true--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---lowercase false--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---uppercase TRUE--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---uppercase FALSE--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---empty string DQ--
-Error: 2 - file() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - file() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - file() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - file() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - file() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - file() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - file() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---unset var--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-===DONE===
diff --git a/ext/standard/tests/file/file_variation4.phpt b/ext/standard/tests/file/file_variation4.phpt
deleted file mode 100644
index 103c2b0af6..0000000000
--- a/ext/standard/tests/file/file_variation4.phpt
+++ /dev/null
@@ -1,291 +0,0 @@
---TEST--
-Test file() function : third parameter variation
---FILE--
-<?php
-/* Prototype : array file(string filename [, int flags[, resource context]])
- * Description: Read entire file into an array
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing file() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted
-$filename = __FILE__ . ".tmp";
-$fd = fopen($filename, "w+");
-fwrite($fd, "Line 1\nLine 2\nLine 3");
-fclose($fd);
-
-$flags = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// create a file stream resource
-$tmp_filename = __FILE__ . ".tmp2";
-$file_stream_resource = fopen($tmp_filename, "w+");
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // file stream resource
- 'file stream resource' => $file_stream_resource,
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( file($filename, $flags, $value) );
-};
-
-fclose($file_stream_resource);
-unlink($tmp_filename);
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing file() : usage variation ***
-
---int 0--
-Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---int 1--
-Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---int 12345--
-Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---int -12345--
-Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d)
-NULL
-
---float 10.5--
-Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float -10.5--
-Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float 12.3456789000e10--
-Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---float .5--
-Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d)
-NULL
-
---empty array--
-Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d)
-NULL
-
---uppercase NULL--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---lowercase null--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---lowercase true--
-Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---lowercase false--
-Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---uppercase TRUE--
-Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---uppercase FALSE--
-Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d)
-NULL
-
---empty string DQ--
-Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - file() expects parameter 3 to be resource, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - file() expects parameter 3 to be resource, object given, %s(%d)
-NULL
-
---undefined var--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---unset var--
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-
---file stream resource--
-Error: 2 - file(): supplied resource is not a valid Stream-Context resource, %s(%d)
-array(3) {
- [0]=>
- string(7) "Line 1
-"
- [1]=>
- string(7) "Line 2
-"
- [2]=>
- string(6) "Line 3"
-}
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation3.phpt b/ext/standard/tests/file/fopen_variation3.phpt
deleted file mode 100644
index fb00b243fc..0000000000
--- a/ext/standard/tests/file/fopen_variation3.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test fopen() function : usage variation different datatypes for use_include_path
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : resource fopen(string filename, string mode [, bool use_include_path [, resource context]])
- * Description: Open a file or a URL and return a file pointer
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing fopen() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = __FILE__;
-$mode = 'r';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for use_include_path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $h = fopen($filename, $mode, $value);
- if ($h !== false) {
- echo "ok\n";
- fclose($h);
- }
- else {
- var_dump($h);
- }
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing fopen() : usage variation ***
-
---int 0--
-ok
-
---int 1--
-ok
-
---int 12345--
-ok
-
---int -12345--
-ok
-
---float 10.5--
-ok
-
---float -10.5--
-ok
-
---float 12.3456789000e10--
-ok
-
---float -12.3456789000e10--
-ok
-
---float .5--
-ok
-
---empty array--
-Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-ok
-
---lowercase null--
-ok
-
---lowercase true--
-ok
-
---lowercase false--
-ok
-
---uppercase TRUE--
-ok
-
---uppercase FALSE--
-ok
-
---empty string DQ--
-ok
-
---empty string SQ--
-ok
-
---string DQ--
-ok
-
---string SQ--
-ok
-
---mixed case string--
-ok
-
---heredoc--
-ok
-
---instance of classWithToString--
-Error: 2 - fopen() expects parameter 3 to be bool, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - fopen() expects parameter 3 to be bool, object given, %s(%d)
-bool(false)
-
---undefined var--
-ok
-
---unset var--
-ok
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation4.phpt b/ext/standard/tests/file/fopen_variation4.phpt
deleted file mode 100644
index 15f9e60c5a..0000000000
--- a/ext/standard/tests/file/fopen_variation4.phpt
+++ /dev/null
@@ -1,247 +0,0 @@
---TEST--
-Test fopen() function : usage variation different datatypes for stream context
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : resource fopen(string filename, string mode [, bool use_include_path [, resource context]])
- * Description: Open a file or a URL and return a file pointer
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing fopen() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = __FILE__;
-$mode = 'r';
-$use_include_path = false;
-$fileresource = fopen($filename, $mode);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- //file resource
- 'file resource' => $fileresource
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $h = fopen($filename, $mode, false, $value);
- if ($h !== false) {
- echo "ok\n";
- fclose($h);
- }
- else {
- var_dump($h);
- }
-};
-
-fclose($fileresource);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing fopen() : usage variation ***
-
---int 0--
-Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-ok
-
---lowercase null--
-ok
-
---lowercase true--
-Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d)
-bool(false)
-
---string DQ--
-Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d)
-bool(false)
-
---string SQ--
-Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d)
-bool(false)
-
---mixed case string--
-Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d)
-bool(false)
-
---heredoc--
-Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - fopen() expects parameter 4 to be resource, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - fopen() expects parameter 4 to be resource, object given, %s(%d)
-bool(false)
-
---undefined var--
-ok
-
---unset var--
-ok
-
---file resource--
-Error: 2 - fopen(): supplied resource is not a valid Stream-Context resource, %s(%d)
-ok
-===DONE===
diff --git a/ext/standard/tests/file/fpassthru_variation1.phpt b/ext/standard/tests/file/fpassthru_variation1.phpt
deleted file mode 100644
index 2df9b1ce20..0000000000
--- a/ext/standard/tests/file/fpassthru_variation1.phpt
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test fpassthru() function : usage variations - different parameter types
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : proto int fpassthru(resource fp)
- * Description: Output all remaining data from a file pointer
- * Source code: ext/standard/file.c
- * Alias to functions: gzpassthru
- */
-
-echo "*** Testing fpassthru() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-class testClass {
- public function __toString() {
- return "testClass";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new testClass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for fp
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( fpassthru($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing fpassthru() : usage variations ***
-
-Arg value 0
-
-Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
-Arg value 1
-
-Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
-Arg value 12345
-
-Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
-Arg value -2345
-
-Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
-Arg value 10.5
-
-Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Arg value -10.5
-
-Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Arg value 101234567000
-
-Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-
-Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Arg value 0.5
-
-Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Arg value 1
-
-Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
-
-Arg value 1
-
-Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Arg value testClass
-
-Warning: fpassthru() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fseek_variation1.phpt b/ext/standard/tests/file/fseek_variation1.phpt
deleted file mode 100644
index 0736d232c8..0000000000
--- a/ext/standard/tests/file/fseek_variation1.phpt
+++ /dev/null
@@ -1,197 +0,0 @@
---TEST--
-Test fseek() function : usage variations - different types for offset
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : proto int fseek(resource fp, int offset [, int whence])
- * Description: Seek on a file pointer
- * Source code: ext/standard/file.c
- * Alias to functions: gzseek
- */
-
-echo "*** Testing fseek() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-// Initialise function arguments not being substituted (if any)
-
-$fp = fopen(__FILE__, 'r');
-$whence = SEEK_SET;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-class testClass {
- public function __toString() {
- return "testClass";
- }
-}
-
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new testClass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for offset
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( fseek($fp, $value, $whence) );
- var_dump( ftell($fp));
-};
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing fseek() : usage variations ***
-
-Arg value 10.5
-int(0)
-int(10)
-
-Arg value -10.5
-int(-1)
-int(10)
-
-Arg value 1.07654321E-9
-int(0)
-int(0)
-
-Arg value 0.5
-int(0)
-int(0)
-
-Arg value Array
-
-Warning: fseek() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-int(0)
-
-Arg value Array
-
-Warning: fseek() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-int(0)
-
-Arg value Array
-
-Warning: fseek() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-int(0)
-
-Arg value Array
-
-Warning: fseek() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-int(0)
-
-Arg value Array
-
-Warning: fseek() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-int(0)
-
-Arg value
-int(0)
-int(0)
-
-Arg value
-int(0)
-int(0)
-
-Arg value 1
-int(0)
-int(1)
-
-Arg value
-int(0)
-int(0)
-
-Arg value 1
-int(0)
-int(1)
-
-Arg value
-int(0)
-int(0)
-
-Arg value
-
-Warning: fseek() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-int(0)
-
-Arg value
-
-Warning: fseek() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-int(0)
-
-Arg value string
-
-Warning: fseek() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-int(0)
-
-Arg value string
-
-Warning: fseek() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-int(0)
-
-Arg value testClass
-
-Warning: fseek() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-int(0)
-
-Arg value
-int(0)
-int(0)
-
-Arg value
-int(0)
-int(0)
-Done
diff --git a/ext/standard/tests/file/fseek_variation2.phpt b/ext/standard/tests/file/fseek_variation2.phpt
deleted file mode 100644
index 38f9561394..0000000000
--- a/ext/standard/tests/file/fseek_variation2.phpt
+++ /dev/null
@@ -1,160 +0,0 @@
---TEST--
-Test fseek() function : usage variations - different types for whence
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : proto int fseek(resource fp, int offset [, int whence])
- * Description: Seek on a file pointer
- * Source code: ext/standard/file.c
- * Alias to functions: gzseek
- */
-
-echo "*** Testing fseek() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-$fp = fopen(__FILE__, 'r');
-$offset = 3;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // outside of whence range
- -100,
- 100,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for whence
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( fseek($fp, $offset, $value) );
- var_dump( ftell($fp));
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing fseek() : usage variations ***
-
-Arg value -100
-int(-1)
-int(0)
-
-Arg value 100
-int(-1)
-int(0)
-
-Arg value 10.5
-int(-1)
-int(0)
-
-Arg value -10.5
-int(-1)
-int(0)
-
-Arg value 101234567000
-int(-1)
-int(0)
-
-Arg value 1.07654321E-9
-int(0)
-int(3)
-
-Arg value 0.5
-int(0)
-int(3)
-
-Arg value
-int(0)
-int(3)
-
-Arg value
-int(0)
-int(3)
-
-Arg value 1
-int(0)
-int(6)
-
-Arg value
-int(0)
-int(3)
-
-Arg value 1
-int(0)
-int(6)
-
-Arg value
-int(0)
-int(3)
-
-Arg value
-
-Warning: fseek() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-int(3)
-
-Arg value
-
-Warning: fseek() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-int(3)
-
-Arg value string
-
-Warning: fseek() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-int(3)
-
-Arg value string
-
-Warning: fseek() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
-int(3)
-
-Arg value
-int(0)
-int(3)
-
-Arg value
-int(0)
-int(3)
-Done
diff --git a/ext/standard/tests/file/fstat_variation3.phpt b/ext/standard/tests/file/fstat_variation3.phpt
deleted file mode 100644
index 829f5ba075..0000000000
--- a/ext/standard/tests/file/fstat_variation3.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test function fstat() by substituting argument 1 with emptyUnsetUndefNull values.
---FILE--
-<?php
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(fstat( $var ) );
-}
-?>
-===DONE===
---EXPECTF--
-Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/mkdir_variation1-win32.phpt b/ext/standard/tests/file/mkdir_variation1-win32.phpt
deleted file mode 100644
index cee03858cb..0000000000
--- a/ext/standard/tests/file/mkdir_variation1-win32.phpt
+++ /dev/null
@@ -1,122 +0,0 @@
---TEST--
-Test mkdir() function : usage variation: try invalid pathname
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != "WIN")
- die("skip Only valid for Windows");
-?>
---FILE--
-<?php
-/* Prototype : bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])
- * Description: Create a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing mkdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase false' =>false,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // other
- // php.net bug outputs message File Exists
- 'single space' => ' ',
-);
-
-// loop through each element of the array for pathname
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = mkdir($value);
- if ($res == true) {
- echo "directory created\n";
- rmdir($value);
- }
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mkdir() : usage variation ***
-
---uppercase NULL--
-Error: 2 - mkdir(): %s, %s(%d)
-
---lowercase null--
-Error: 2 - mkdir(): %s, %s(%d)
-
---lowercase false--
-Error: 2 - mkdir(): %s, %s(%d)
-
---uppercase FALSE--
-Error: 2 - mkdir(): %s, %s(%d)
-
---empty string DQ--
-Error: 2 - mkdir(): %s, %s(%d)
-
---empty string SQ--
-Error: 2 - mkdir(): %s, %s(%d)
-
---undefined var--
-Error: 2 - mkdir(): %s, %s(%d)
-
---unset var--
-Error: 2 - mkdir(): %s, %s(%d)
-
---single space--
-Error: 2 - mkdir(): %s, %s(%d)
-===DONE===
diff --git a/ext/standard/tests/file/mkdir_variation1.phpt b/ext/standard/tests/file/mkdir_variation1.phpt
deleted file mode 100644
index c77c66b531..0000000000
--- a/ext/standard/tests/file/mkdir_variation1.phpt
+++ /dev/null
@@ -1,121 +0,0 @@
---TEST--
-Test mkdir() function : usage variation: try invalid pathname
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) == "WIN")
- die("skip Not valid for Windows");
-?>
---FILE--
-<?php
-/* Prototype : bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])
- * Description: Create a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing mkdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase false' =>false,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // other
- 'single space' => ' ',
-);
-
-// loop through each element of the array for pathname
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = mkdir($value);
- if ($res == true) {
- echo "directory created\n";
- rmdir($value);
- }
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mkdir() : usage variation ***
-
---uppercase NULL--
-Error: 2 - mkdir(): %s, %s(%d)
-
---lowercase null--
-Error: 2 - mkdir(): %s, %s(%d)
-
---lowercase false--
-Error: 2 - mkdir(): %s, %s(%d)
-
---uppercase FALSE--
-Error: 2 - mkdir(): %s, %s(%d)
-
---empty string DQ--
-Error: 2 - mkdir(): %s, %s(%d)
-
---empty string SQ--
-Error: 2 - mkdir(): %s, %s(%d)
-
---undefined var--
-Error: 2 - mkdir(): %s, %s(%d)
-
---unset var--
-Error: 2 - mkdir(): %s, %s(%d)
-
---single space--
-directory created
-===DONE===
diff --git a/ext/standard/tests/file/mkdir_variation2.phpt b/ext/standard/tests/file/mkdir_variation2.phpt
deleted file mode 100644
index 51a1c39c17..0000000000
--- a/ext/standard/tests/file/mkdir_variation2.phpt
+++ /dev/null
@@ -1,191 +0,0 @@
---TEST--
-Test mkdir() function : usage variation: different types for mode
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])
- * Description: Create a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing mkdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$pathname = 'mkdirVar2.tmp';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for mode
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $h = mkdir($pathname, $value);
- if ($h === true) {
- echo "Directory created\n";
- rmdir($pathname);
- }
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mkdir() : usage variation ***
-
---float 10.5--
-Directory created
-
---float -10.5--
-Directory created
-
---float 12.3456789000e10--
-Directory created
-
---float -12.3456789000e10--
-Directory created
-
---float .5--
-Directory created
-
---empty array--
-Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d)
-
---int indexed array--
-Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d)
-
---associative array--
-Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d)
-
---nested arrays--
-Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d)
-
---uppercase NULL--
-Directory created
-
---lowercase null--
-Directory created
-
---lowercase true--
-Directory created
-
---lowercase false--
-Directory created
-
---uppercase TRUE--
-Directory created
-
---uppercase FALSE--
-Directory created
-
---empty string DQ--
-Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d)
-
---empty string SQ--
-Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d)
-
---string DQ--
-Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d)
-
---string SQ--
-Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d)
-
---mixed case string--
-Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d)
-
---heredoc--
-Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d)
-
---instance of classWithToString--
-Error: 2 - mkdir() expects parameter 2 to be int, object given, %s(%d)
-
---instance of classWithoutToString--
-Error: 2 - mkdir() expects parameter 2 to be int, object given, %s(%d)
-
---undefined var--
-Directory created
-
---unset var--
-Directory created
-===DONE===
diff --git a/ext/standard/tests/file/mkdir_variation3.phpt b/ext/standard/tests/file/mkdir_variation3.phpt
deleted file mode 100644
index 4c037b6bca..0000000000
--- a/ext/standard/tests/file/mkdir_variation3.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test mkdir() function : usage variation: different types for recursive
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])
- * Description: Create a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing mkdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$pathname = 'mkdirVar3.tmp';
-$mode = 0777;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for recursive
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $h = mkdir($pathname, $mode, $value);
- if ($h === true) {
- echo "Directory created\n";
- rmdir($pathname);
- }
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mkdir() : usage variation ***
-
---int 0--
-Directory created
-
---int 1--
-Directory created
-
---int 12345--
-Directory created
-
---int -12345--
-Directory created
-
---float 10.5--
-Directory created
-
---float -10.5--
-Directory created
-
---float 12.3456789000e10--
-Directory created
-
---float -12.3456789000e10--
-Directory created
-
---float .5--
-Directory created
-
---empty array--
-Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d)
-
---int indexed array--
-Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d)
-
---associative array--
-Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d)
-
---nested arrays--
-Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d)
-
---uppercase NULL--
-Directory created
-
---lowercase null--
-Directory created
-
---lowercase true--
-Directory created
-
---lowercase false--
-Directory created
-
---uppercase TRUE--
-Directory created
-
---uppercase FALSE--
-Directory created
-
---empty string DQ--
-Directory created
-
---empty string SQ--
-Directory created
-
---string DQ--
-Directory created
-
---string SQ--
-Directory created
-
---mixed case string--
-Directory created
-
---heredoc--
-Directory created
-
---instance of classWithToString--
-Error: 2 - mkdir() expects parameter 3 to be bool, object given, %s(%d)
-
---instance of classWithoutToString--
-Error: 2 - mkdir() expects parameter 3 to be bool, object given, %s(%d)
-
---undefined var--
-Directory created
-
---unset var--
-Directory created
-===DONE===
diff --git a/ext/standard/tests/file/mkdir_variation4.phpt b/ext/standard/tests/file/mkdir_variation4.phpt
deleted file mode 100644
index a31ae722c6..0000000000
--- a/ext/standard/tests/file/mkdir_variation4.phpt
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test mkdir() function : usage variation: different types for context
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])
- * Description: Create a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing mkdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$pathname = 'mkdirVar4.tmp';
-$mode = 0777;
-$recursive = false;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-$fileRes = fopen(__FILE__,'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // non stream context resource
- 'file resource' => $fileRes,
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $h = mkdir($pathname, $mode, $recursive, $value);
- if ($h === true) {
- echo "Directory created\n";
- rmdir($pathname);
- }
-};
-
-fclose($fileRes);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing mkdir() : usage variation ***
-
---int 0--
-Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d)
-
---int 1--
-Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d)
-
---int 12345--
-Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d)
-
---int -12345--
-Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d)
-
---float 10.5--
-Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d)
-
---float -10.5--
-Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d)
-
---float 12.3456789000e10--
-Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d)
-
---float -12.3456789000e10--
-Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d)
-
---float .5--
-Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d)
-
---empty array--
-Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d)
-
---int indexed array--
-Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d)
-
---associative array--
-Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d)
-
---nested arrays--
-Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d)
-
---uppercase NULL--
-Directory created
-
---lowercase null--
-Directory created
-
---lowercase true--
-Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d)
-
---lowercase false--
-Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d)
-
---uppercase TRUE--
-Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d)
-
---uppercase FALSE--
-Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d)
-
---empty string DQ--
-Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d)
-
---empty string SQ--
-Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d)
-
---string DQ--
-Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d)
-
---string SQ--
-Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d)
-
---mixed case string--
-Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d)
-
---heredoc--
-Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d)
-
---instance of classWithToString--
-Error: 2 - mkdir() expects parameter 4 to be resource, object given, %s(%d)
-
---instance of classWithoutToString--
-Error: 2 - mkdir() expects parameter 4 to be resource, object given, %s(%d)
-
---undefined var--
-Directory created
-
---unset var--
-Directory created
-
---file resource--
-Error: 2 - mkdir(): supplied resource is not a valid Stream-Context resource, %s(%d)
-Directory created
-===DONE===
diff --git a/ext/standard/tests/file/parse_ini_file_variation4.phpt b/ext/standard/tests/file/parse_ini_file_variation4.phpt
deleted file mode 100644
index 15acc9c3c5..0000000000
--- a/ext/standard/tests/file/parse_ini_file_variation4.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test parse_ini_file() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : array parse_ini_file(string filename [, bool process_sections])
- * Description: Parse configuration file
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing parse_ini_file() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$process_sections = false;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for filename
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( parse_ini_file($value, $process_sections) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing parse_ini_file() : usage variation ***
-
---int 0--
-Error: 2 - parse_ini_file(0): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - parse_ini_file(12345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - parse_ini_file(-2345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - parse_ini_file(10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - parse_ini_file(-10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - parse_ini_file(123456789000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - parse_ini_file(-123456789000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - parse_ini_file(0.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - parse_ini_file(Class A object): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, object given, %s(%d)
-bool(false)
-
---undefined var--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/parse_ini_file_variation5.phpt b/ext/standard/tests/file/parse_ini_file_variation5.phpt
deleted file mode 100644
index 4cfc2a661f..0000000000
--- a/ext/standard/tests/file/parse_ini_file_variation5.phpt
+++ /dev/null
@@ -1,253 +0,0 @@
---TEST--
-Test parse_ini_file() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : array parse_ini_file(string filename [, bool process_sections])
- * Description: Parse configuration file
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing parse_ini_file() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = __FILE__."ParseIniFileVar5.ini";
-$contents = "a=test";
-@unlink($filename);
-file_put_contents($filename, $contents);
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for process_sections
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( parse_ini_file($filename, $value) );
-};
-
-unlink($filename);
-?>
-===DONE===
---EXPECTF--
-*** Testing parse_ini_file() : usage variation ***
-
---int 0--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---int 1--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---int 12345--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---int -12345--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---float 10.5--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---float -10.5--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---float 12.3456789000e10--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---float -12.3456789000e10--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---float .5--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---empty array--
-Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---lowercase null--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---empty string DQ--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---empty string SQ--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---string DQ--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---string SQ--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---mixed case string--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---heredoc--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---instance of classWithToString--
-Error: 2 - parse_ini_file() expects parameter 2 to be bool, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - parse_ini_file() expects parameter 2 to be bool, object given, %s(%d)
-bool(false)
-
---undefined var--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-
---unset var--
-array(1) {
- ["a"]=>
- string(4) "test"
-}
-===DONE===
diff --git a/ext/standard/tests/file/pathinfo_variation1.phpt b/ext/standard/tests/file/pathinfo_variation1.phpt
deleted file mode 100644
index 36d9bab5ae..0000000000
--- a/ext/standard/tests/file/pathinfo_variation1.phpt
+++ /dev/null
@@ -1,190 +0,0 @@
---TEST--
-Test pathinfo() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : array pathinfo(string path[, int options])
- * Description: Returns information about a certain string
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing pathinfo() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$options = PATHINFO_DIRNAME;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( pathinfo($value, $options) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing pathinfo() : usage variation ***
-
---int 0--
-string(1) "."
-
---int 1--
-string(1) "."
-
---int 12345--
-string(1) "."
-
---int -12345--
-string(1) "."
-
---float 10.5--
-string(1) "."
-
---float -10.5--
-string(1) "."
-
---float 12.3456789000e10--
-string(1) "."
-
---float -12.3456789000e10--
-string(1) "."
-
---float .5--
-string(1) "."
-
---empty array--
-Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(0) ""
-
---lowercase null--
-string(0) ""
-
---lowercase true--
-string(1) "."
-
---lowercase false--
-string(0) ""
-
---uppercase TRUE--
-string(1) "."
-
---uppercase FALSE--
-string(0) ""
-
---empty string DQ--
-string(0) ""
-
---empty string SQ--
-string(0) ""
-
---instance of classWithToString--
-string(1) "."
-
---instance of classWithoutToString--
-Error: 2 - pathinfo() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-string(0) ""
-
---unset var--
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/file/pathinfo_variation2.phpt b/ext/standard/tests/file/pathinfo_variation2.phpt
deleted file mode 100644
index a39543b18f..0000000000
--- a/ext/standard/tests/file/pathinfo_variation2.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test pathinfo() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : array pathinfo(string path[, int options])
- * Description: Returns information about a certain string
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing pathinfo() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$path = '/usr/include/arpa/inet.h';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for options
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( pathinfo($path, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing pathinfo() : usage variation ***
-
---float 10.5--
-string(6) "inet.h"
-
---float -10.5--
-string(6) "inet.h"
-
---float 12.3456789000e10--
-string(%d) %s
-
---float -12.3456789000e10--
-string(%d) %s
-
---float .5--
-string(%d) %s
-
---empty array--
-Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-string(0) ""
-
---lowercase null--
-string(0) ""
-
---lowercase true--
-string(17) "/usr/include/arpa"
-
---lowercase false--
-string(0) ""
-
---uppercase TRUE--
-string(17) "/usr/include/arpa"
-
---uppercase FALSE--
-string(0) ""
-
---empty string DQ--
-Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - pathinfo() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - pathinfo() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-string(0) ""
-
---unset var--
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/file/pclose_variation1.phpt b/ext/standard/tests/file/pclose_variation1.phpt
deleted file mode 100644
index 7c22389646..0000000000
--- a/ext/standard/tests/file/pclose_variation1.phpt
+++ /dev/null
@@ -1,231 +0,0 @@
---TEST--
-Test pclose() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : int pclose(resource fp)
- * Description: Close a file pointer opened by popen()
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing pclose() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for fp
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( pclose($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing pclose() : usage variation ***
-
---int 0--
-Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d)
-bool(false)
-
---string DQ--
-Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d)
-bool(false)
-
---string SQ--
-Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d)
-bool(false)
-
---mixed case string--
-Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d)
-bool(false)
-
---heredoc--
-Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - pclose() expects parameter 1 to be resource, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - pclose() expects parameter 1 to be resource, object given, %s(%d)
-bool(false)
-
---undefined var--
-Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/readfile_variation4.phpt b/ext/standard/tests/file/readfile_variation4.phpt
deleted file mode 100644
index 99ee79e40b..0000000000
--- a/ext/standard/tests/file/readfile_variation4.phpt
+++ /dev/null
@@ -1,251 +0,0 @@
---TEST--
-Test readfile() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : int readfile(string filename [, bool use_include_path[, resource context]])
- * Description: Output a file or a URL
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing readfile() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'readFileVar4.tmp';
-$use_include_path = false;
-$h = fopen($filename,'wb');
-fwrite($h, "testing readfile");
-fclose($h);
-
-
-$fileRes = fopen(__FILE__, 'r');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // file resource
- 'file resource' => $fileRes,
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $h = readfile($filename, $use_include_path, $value);
- if ($h == false) {
- echo "file not read\n";
- }
- else {
- echo "\n";
- }
-};
-
-unlink($filename);
-fclose($fileRes);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing readfile() : usage variation ***
-
---int 0--
-Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d)
-file not read
-
---int 1--
-Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d)
-file not read
-
---int 12345--
-Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d)
-file not read
-
---int -12345--
-Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d)
-file not read
-
---float 10.5--
-Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d)
-file not read
-
---float -10.5--
-Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d)
-file not read
-
---float 12.3456789000e10--
-Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d)
-file not read
-
---float -12.3456789000e10--
-Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d)
-file not read
-
---float .5--
-Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d)
-file not read
-
---empty array--
-Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d)
-file not read
-
---int indexed array--
-Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d)
-file not read
-
---associative array--
-Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d)
-file not read
-
---nested arrays--
-Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d)
-file not read
-
---uppercase NULL--
-testing readfile
-
---lowercase null--
-testing readfile
-
---lowercase true--
-Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d)
-file not read
-
---lowercase false--
-Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d)
-file not read
-
---uppercase TRUE--
-Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d)
-file not read
-
---uppercase FALSE--
-Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d)
-file not read
-
---empty string DQ--
-Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d)
-file not read
-
---empty string SQ--
-Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d)
-file not read
-
---string DQ--
-Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d)
-file not read
-
---string SQ--
-Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d)
-file not read
-
---mixed case string--
-Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d)
-file not read
-
---heredoc--
-Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d)
-file not read
-
---instance of classWithToString--
-Error: 2 - readfile() expects parameter 3 to be resource, object given, %s(%d)
-file not read
-
---instance of classWithoutToString--
-Error: 2 - readfile() expects parameter 3 to be resource, object given, %s(%d)
-file not read
-
---undefined var--
-testing readfile
-
---unset var--
-testing readfile
-
---file resource--
-Error: 2 - readfile(): supplied resource is not a valid Stream-Context resource, %s(%d)
-testing readfile
-===DONE===
diff --git a/ext/standard/tests/file/readfile_variation5.phpt b/ext/standard/tests/file/readfile_variation5.phpt
deleted file mode 100644
index bc9c064055..0000000000
--- a/ext/standard/tests/file/readfile_variation5.phpt
+++ /dev/null
@@ -1,221 +0,0 @@
---TEST--
-Test readfile() function : usage variation
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : int readfile(string filename [, bool use_include_path[, resource context]])
- * Description: Output a file or a URL
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing readfile() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'readFileVar5.tmp';
-$use_include_path = false;
-$h = fopen($filename,'wb');
-fwrite($h, "testing readfile");
-fclose($h);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for use_include_path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = readfile($filename, $value);
- if ($res == false) {
- echo "File not read\n";
- }
- else {
- echo "\n";
- }
-};
-
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing readfile() : usage variation ***
-
---int 0--
-testing readfile
-
---int 1--
-testing readfile
-
---int 12345--
-testing readfile
-
---int -12345--
-testing readfile
-
---float 10.5--
-testing readfile
-
---float -10.5--
-testing readfile
-
---float 12.3456789000e10--
-testing readfile
-
---float -12.3456789000e10--
-testing readfile
-
---float .5--
-testing readfile
-
---empty array--
-Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d)
-File not read
-
---int indexed array--
-Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d)
-File not read
-
---associative array--
-Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d)
-File not read
-
---nested arrays--
-Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d)
-File not read
-
---uppercase NULL--
-testing readfile
-
---lowercase null--
-testing readfile
-
---lowercase true--
-testing readfile
-
---lowercase false--
-testing readfile
-
---uppercase TRUE--
-testing readfile
-
---uppercase FALSE--
-testing readfile
-
---empty string DQ--
-testing readfile
-
---empty string SQ--
-testing readfile
-
---string DQ--
-testing readfile
-
---string SQ--
-testing readfile
-
---mixed case string--
-testing readfile
-
---heredoc--
-testing readfile
-
---instance of classWithToString--
-Error: 2 - readfile() expects parameter 2 to be bool, object given, %s(%d)
-File not read
-
---instance of classWithoutToString--
-Error: 2 - readfile() expects parameter 2 to be bool, object given, %s(%d)
-File not read
-
---undefined var--
-testing readfile
-
---unset var--
-testing readfile
-===DONE===
diff --git a/ext/standard/tests/file/rename_variation10.phpt b/ext/standard/tests/file/rename_variation10.phpt
deleted file mode 100644
index 8ee59168b1..0000000000
--- a/ext/standard/tests/file/rename_variation10.phpt
+++ /dev/null
@@ -1,249 +0,0 @@
---TEST--
-Test rename() function : usage variation - different types for context
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : bool rename(string old_name, string new_name[, resource context])
- * Description: Rename a file
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing rename() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$old_name = __FILE__.'.tmp';
-$new_name = __FILE__.'.renamed';
-
-//file resource
-$fileRes = fopen(__FILE__, 'r');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // file resource
- 'file resource' => $fileRes,
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- touch($old_name);
- $res = rename($old_name, $new_name, $value);
- var_dump($res);
- if ($res == true) {
- unlink($new_name);
- }
- else {
- unlink($old_name);
- }
-};
-
-fclose($fileRes);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing rename() : usage variation ***
-
---int 0--
-Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d)
-bool(false)
-
---string DQ--
-Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d)
-bool(false)
-
---string SQ--
-Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d)
-bool(false)
-
---mixed case string--
-Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d)
-bool(false)
-
---heredoc--
-Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - rename() expects parameter 3 to be resource, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - rename() expects parameter 3 to be resource, object given, %s(%d)
-bool(false)
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-
---file resource--
-Error: 2 - rename(): supplied resource is not a valid Stream-Context resource, %s(%d)
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/rmdir_variation1-win32.phpt b/ext/standard/tests/file/rmdir_variation1-win32.phpt
deleted file mode 100644
index 5a958631d9..0000000000
--- a/ext/standard/tests/file/rmdir_variation1-win32.phpt
+++ /dev/null
@@ -1,127 +0,0 @@
---TEST--
-Test rmdir() function : usage variation - invalid filenames
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != "WIN")
- die("skip Only valid for Windows");
-?>
---FILE--
-<?php
-/* Prototype : bool rmdir(string dirname[, resource context])
- * Description: Remove a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing rmdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase false' =>false,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // other
- // php outputs Permission Denied, p8 outputs no suck file or dir
- 'single space' => ' ',
-);
-
-// loop through each element of the array for dirname
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( rmdir($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing rmdir() : usage variation ***
-
---uppercase NULL--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---undefined var--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---single space--
-Error: 2 - rmdir( ): %s, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/rmdir_variation1.phpt b/ext/standard/tests/file/rmdir_variation1.phpt
deleted file mode 100644
index 0556266efa..0000000000
--- a/ext/standard/tests/file/rmdir_variation1.phpt
+++ /dev/null
@@ -1,127 +0,0 @@
---TEST--
-Test rmdir() function : usage variation - invalid file names
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) == "WIN")
- die("skip Not valid for Windows");
-?>
---FILE--
-<?php
-/* Prototype : bool rmdir(string dirname[, resource context])
- * Description: Remove a directory
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing rmdir() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase false' =>false,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // other
- 'single space' => ' ',
-);
-
-// loop through each element of the array for dirname
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump(rmdir($value));
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing rmdir() : usage variation ***
-
---uppercase NULL--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---undefined var--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - rmdir(): %s, %s(%d)
-bool(false)
-
---single space--
-Error: 2 - rmdir( ): %s, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation3-win32-mb.phpt b/ext/standard/tests/file/touch_variation3-win32-mb.phpt
deleted file mode 100644
index cebf6f6c95..0000000000
--- a/ext/standard/tests/file/touch_variation3-win32-mb.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test touch() function : usage variation - different types for time
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only for Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype : bool touch(string filename [, int time [, int atime]])
- * Description: Set modification time of file
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing touch() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'touchVar2_私はガラスを食べられます.tmp';
-$atime = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for time
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( touch($filename, $value, $atime) );
-};
-
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing touch() : usage variation ***
-
---float 10.5--
-bool(true)
-
---float 12.3456789000e10--
-bool(true)
-
---float .5--
-bool(true)
-
---empty array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-bool(true)
-
---lowercase false--
-bool(true)
-
---uppercase TRUE--
-bool(true)
-
---uppercase FALSE--
-bool(true)
-
---empty string DQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation3-win32.phpt b/ext/standard/tests/file/touch_variation3-win32.phpt
deleted file mode 100644
index a781ffae2f..0000000000
--- a/ext/standard/tests/file/touch_variation3-win32.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test touch() function : usage variation - different types for time
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only for Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype : bool touch(string filename [, int time [, int atime]])
- * Description: Set modification time of file
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing touch() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'touchVar2.tmp';
-$atime = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for time
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( touch($filename, $value, $atime) );
-};
-
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing touch() : usage variation ***
-
---float 10.5--
-bool(true)
-
---float 12.3456789000e10--
-bool(true)
-
---float .5--
-bool(true)
-
---empty array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-bool(true)
-
---lowercase false--
-bool(true)
-
---uppercase TRUE--
-bool(true)
-
---uppercase FALSE--
-bool(true)
-
---empty string DQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation3.phpt b/ext/standard/tests/file/touch_variation3.phpt
deleted file mode 100644
index 5eb6ad315e..0000000000
--- a/ext/standard/tests/file/touch_variation3.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test touch() function : usage variation - different types for time
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not for Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype : bool touch(string filename [, int time [, int atime]])
- * Description: Set modification time of file
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing touch() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'touchVar2.tmp';
-$atime = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for time
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( touch($filename, $value, $atime) );
-};
-
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing touch() : usage variation ***
-
---float 10.5--
-bool(true)
-
---float 12.3456789000e10--
-bool(true)
-
---float .5--
-bool(true)
-
---empty array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-bool(true)
-
---lowercase false--
-bool(true)
-
---uppercase TRUE--
-bool(true)
-
---uppercase FALSE--
-bool(true)
-
---empty string DQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation4-win32.phpt b/ext/standard/tests/file/touch_variation4-win32.phpt
deleted file mode 100644
index 62816e1ec6..0000000000
--- a/ext/standard/tests/file/touch_variation4-win32.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test touch() function : usage variation - different types for atime
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only for Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype : bool touch(string filename [, int time [, int atime]])
- * Description: Set modification time of file
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing touch() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'touchVar3.tmp';
-$time = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for atime
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( touch($filename, $time, $value) );
-};
-
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing touch() : usage variation ***
-
---float 10.5--
-bool(true)
-
---float 12.3456789000e10--
-bool(true)
-
---float .5--
-bool(true)
-
---empty array--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-bool(true)
-
---lowercase false--
-bool(true)
-
---uppercase TRUE--
-bool(true)
-
---uppercase FALSE--
-bool(true)
-
---empty string DQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation4.phpt b/ext/standard/tests/file/touch_variation4.phpt
deleted file mode 100644
index 190d0f4b1a..0000000000
--- a/ext/standard/tests/file/touch_variation4.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test touch() function : usage variation - different types for atime
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not for Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype : bool touch(string filename [, int time [, int atime]])
- * Description: Set modification time of file
- * Source code: ext/standard/filestat.c
- * Alias to functions:
- */
-
-echo "*** Testing touch() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = 'touchVar3.tmp';
-$time = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for atime
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( touch($filename, $time, $value) );
-};
-
-unlink($filename);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing touch() : usage variation ***
-
---float 10.5--
-bool(true)
-
---float 12.3456789000e10--
-bool(true)
-
---float .5--
-bool(true)
-
---empty array--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-bool(true)
-
---lowercase false--
-bool(true)
-
---uppercase TRUE--
-bool(true)
-
---uppercase FALSE--
-bool(true)
-
---empty string DQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/unlink_variation7.phpt b/ext/standard/tests/file/unlink_variation7.phpt
deleted file mode 100644
index b4a6bd5a1f..0000000000
--- a/ext/standard/tests/file/unlink_variation7.phpt
+++ /dev/null
@@ -1,242 +0,0 @@
---TEST--
-Test unlink() function : usage variation different types for context
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/* Prototype : bool unlink(string filename[, context context])
- * Description: Delete a file
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
-echo "*** Testing unlink() : usage variation different types for context ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = __FILE__.'tmp';
-$fileRes = fopen(__FILE__, 'r');
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // file resource
- 'file resource' => $fileRes
-);
-
-// loop through each element of the array for context
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- touch($filename); // create if it doesn't exist
- var_dump( unlink($filename, $value) );
-};
-
-if (file_exists($filename)) {
- unlink($filename);
-}
-fclose($fileRes);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing unlink() : usage variation different types for context ***
-
---int 0--
-Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d)
-bool(false)
-
---int indexed array--
-Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d)
-bool(false)
-
---associative array--
-Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d)
-bool(false)
-
---nested arrays--
-Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d)
-bool(false)
-
---uppercase NULL--
-bool(true)
-
---lowercase null--
-bool(true)
-
---lowercase true--
-Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d)
-bool(false)
-
---string DQ--
-Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d)
-bool(false)
-
---string SQ--
-Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d)
-bool(false)
-
---mixed case string--
-Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d)
-bool(false)
-
---heredoc--
-Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - unlink() expects parameter 2 to be resource, object given, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - unlink() expects parameter 2 to be resource, object given, %s(%d)
-bool(false)
-
---undefined var--
-bool(true)
-
---unset var--
-bool(true)
-
---file resource--
-Error: 2 - unlink(): supplied resource is not a valid Stream-Context resource, %s(%d)
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt
deleted file mode 100644
index 51a079ad53..0000000000
--- a/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test call_user_func_array() function : first parameter variation
---FILE--
-<?php
-/* Prototype : mixed call_user_func_array(string function_name, array parameters)
- * Description: Call a user function which is the first parameter with the arguments contained in array
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing call_user_func_array() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$parameters = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for function_name
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( call_user_func_array($value, $parameters) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing call_user_func_array() : usage variation ***
-
---int 0--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---int 1--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---int 12345--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---int -12345--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float 10.5--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float -10.5--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float 12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float .5--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---empty array--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d)
-NULL
-
---associative array--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---lowercase null--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---lowercase true--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---lowercase false--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---uppercase TRUE--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---uppercase FALSE--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---empty string DQ--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---unset var--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt
deleted file mode 100644
index c8c8ce6604..0000000000
--- a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test call_user_func_array() function : second parameter variation
---FILE--
-<?php
-/* Prototype : mixed call_user_func_array(string function_name, array parameters)
- * Description: Call a user function which is the first parameter with the arguments contained in array
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing call_user_func_array() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-function test_func() {
-}
-$function_name = 'test_func';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for parameters
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( call_user_func_array($function_name, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing call_user_func_array() : usage variation ***
-
---int 0--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---int 1--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---int 12345--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---int -12345--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---float 10.5--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float -10.5--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float 12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float .5--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-
---lowercase null--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-
---lowercase true--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---lowercase false--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---uppercase TRUE--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---uppercase FALSE--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---empty string DQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-
---unset var--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt b/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt
deleted file mode 100644
index ac4568c621..0000000000
--- a/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt
+++ /dev/null
@@ -1,137 +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() function: with unexpected inputs for 'module_name' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $str
-$inputs = array (
-
- // integer values
- 0,
- 1,
- 255,
- 256,
- PHP_INT_MAX,
- -PHP_INT_MAX,
-
- // float values
- 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
- array(),
- array(0),
- array(1, 2),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // null values
- NULL,
- null,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop through with each element of the $inputs array to test get_extension_funcs() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( get_extension_funcs($input) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing get_extension_funcs() function: with unexpected inputs for 'module_name' argument ***
--- Iteration 1 --
-bool(false)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(false)
--- Iteration 7 --
-bool(false)
--- Iteration 8 --
-bool(false)
--- Iteration 9 --
-bool(false)
--- Iteration 10 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-bool(false)
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-bool(false)
--- Iteration 20 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/general_functions/getrusage_variation1.phpt b/ext/standard/tests/general_functions/getrusage_variation1.phpt
deleted file mode 100644
index 0c072ed6e0..0000000000
--- a/ext/standard/tests/general_functions/getrusage_variation1.phpt
+++ /dev/null
@@ -1,142 +0,0 @@
---TEST--
-Test getrusage() function : usage variation - diff data types as $who arg
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (!function_exists("getrusage")) die("skip");
-?>
---FILE--
-<?php
-/* Prototype : array getrusage ([ int $who ] )
- * Description: Gets the current resource usages
- * Source code: ext/standard/microtime.c
- * Alias to functions:
- */
-
-
-/*
- * Pass different data types as $who argument to test behaviour of getrusage()
- */
-
-echo "*** Testing getrusage() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-
-// unexpected values to be passed to $stream_id 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,
-
- // string data
-/*16*/ "0",
- '1',
- "1232456",
- "1.23E4",
-
- // undefined data
-/*20*/ @$undefined_var,
-
- // unset data
-/*21*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behavior of getrusage()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = getrusage($input);
- echo "User time used (microseconds) " . $res["ru_utime.tv_usec"] . "\n";
- $iterator++;
-}
-?>
-===DONE===
---EXPECTF--
-*** Testing getrusage() : usage variations ***
-
--- Iteration 1 --
-User time used (microseconds) %d
-
--- Iteration 2 --
-User time used (microseconds) %d
-
--- Iteration 3 --
-User time used (microseconds) %d
-
--- Iteration 4 --
-User time used (microseconds) %d
-
--- Iteration 5 --
-User time used (microseconds) %d
-
--- Iteration 6 --
-User time used (microseconds) %d
-
--- Iteration 7 --
-User time used (microseconds) %d
-
--- Iteration 8 --
-User time used (microseconds) %d
-
--- Iteration 9 --
-User time used (microseconds) %d
-
--- Iteration 10 --
-User time used (microseconds) %d
-
--- Iteration 11 --
-User time used (microseconds) %d
-
--- Iteration 12 --
-User time used (microseconds) %d
-
--- Iteration 13 --
-User time used (microseconds) %d
-
--- Iteration 14 --
-User time used (microseconds) %d
-
--- Iteration 15 --
-User time used (microseconds) %d
-
--- Iteration 16 --
-User time used (microseconds) %d
-
--- Iteration 17 --
-User time used (microseconds) %d
-
--- Iteration 18 --
-User time used (microseconds) %d
-
--- Iteration 19 --
-User time used (microseconds) %d
-
--- Iteration 20 --
-User time used (microseconds) %d
-
--- Iteration 21 --
-User time used (microseconds) %d
-===DONE===
diff --git a/ext/standard/tests/general_functions/intval_variation2.phpt b/ext/standard/tests/general_functions/intval_variation2.phpt
deleted file mode 100644
index 6a295308af..0000000000
--- a/ext/standard/tests/general_functions/intval_variation2.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test intval() function : usage variation
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : int intval(mixed var [, int base])
- * Description: Get the integer value of a variable using the optional base for the conversion
- * Source code: ext/standard/type.c
- * Alias to functions:
- */
-
-echo "*** Testing intval() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$var = 1;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for base
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( intval($var, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing intval() : usage variation ***
-
---float 10.5--
-int(1)
-
---float -10.5--
-int(1)
-
---float 12.3456789000e10--
-Error: 2 - intval() expects parameter 2 to be int, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - intval() expects parameter 2 to be int, float given, %s(%d)
-NULL
-
---float .5--
-int(1)
-
---empty array--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-int(1)
-
---lowercase null--
-int(1)
-
---lowercase true--
-int(1)
-
---lowercase false--
-int(1)
-
---uppercase TRUE--
-int(1)
-
---uppercase FALSE--
-int(1)
-
---empty string DQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - intval() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - intval() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-int(1)
-
---unset var--
-int(1)
-===DONE===
diff --git a/ext/standard/tests/general_functions/php_uname_variation1.phpt b/ext/standard/tests/general_functions/php_uname_variation1.phpt
deleted file mode 100644
index d5b86c7b5c..0000000000
--- a/ext/standard/tests/general_functions/php_uname_variation1.phpt
+++ /dev/null
@@ -1,112 +0,0 @@
---TEST--
-Test php_uname() function - usage variations
---FILE--
-<?php
-/* Prototype: string php_uname ([ string $mode ] )
- * Description: Returns information about the operating system PHP is running on
-*/
-
-echo "*** Testing php_uname() - usage variations\n";
-// Prevent notices about undefines variables
-error_reporting(E_ALL & ~E_NOTICE);
-
-$unset_var = 10;
-unset ($unset_var);
-
-class fooClass {
- function __toString() {
- return "m";
- }
-}
-
-$values = array(
-
- // int data
- "0" => 0,
- "1" => 1,
- "12345" => 12345,
- "-2345" => -2345,
-
- // float data
- "10.5" => 10.5,
- "-10.5" => -10.5,
- "10.1234567e10" => 10.1234567e10,
- "10.7654321E-10" => 10.7654321E-10,
- ".5" => .5,
-
- // null data
- "NULL" => NULL,
- "null" => null,
-
- // boolean data
- "true" => true,
- "false" => false,
- "TRUE" => TRUE,
- "FALSE" => FALSE,
-
- // empty data
- "\"\"" => "",
- "''" => '',
-
- // object data
- "new fooClass()" => new fooClass(),
-
- // undefined data
- "undefined var" => $undefined_var,
-
- // unset data
- "unset var" => $unset_var,
-);
-
-// loop through each element of the array for data
-
-foreach($values as $key => $value) {
- echo "-- Iterator $key --\n";
- var_dump( php_uname($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing php_uname() - usage variations
--- Iterator 0 --
-string(%d) "%s"
--- Iterator 1 --
-string(%d) "%s"
--- Iterator 12345 --
-string(%d) "%s"
--- Iterator -2345 --
-string(%d) "%s"
--- Iterator 10.5 --
-string(%d) "%s"
--- Iterator -10.5 --
-string(%d) "%s"
--- Iterator 10.1234567e10 --
-string(%d) "%s"
--- Iterator 10.7654321E-10 --
-string(%d) "%s"
--- Iterator .5 --
-string(%d) "%s"
--- Iterator NULL --
-string(%d) "%s"
--- Iterator null --
-string(%d) "%s"
--- Iterator true --
-string(%d) "%s"
--- Iterator false --
-string(%d) "%s"
--- Iterator TRUE --
-string(%d) "%s"
--- Iterator FALSE --
-string(%d) "%s"
--- Iterator "" --
-string(%d) "%s"
--- Iterator '' --
-string(%d) "%s"
--- Iterator new fooClass() --
-string(%d) "%s"
--- Iterator undefined var --
-string(%d) "%s"
--- Iterator unset var --
-string(%d) "%s"
-===DONE===
diff --git a/ext/standard/tests/general_functions/proc_nice_variation3.phpt b/ext/standard/tests/general_functions/proc_nice_variation3.phpt
deleted file mode 100644
index c5626dd50f..0000000000
--- a/ext/standard/tests/general_functions/proc_nice_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function proc_nice() by substituting argument 1 with emptyUnsetUndefNull values.
---CREDITS--
-Italian PHP TestFest 2009 Cesena 19-20-21 june
-Fabio Fabbrucci (fabbrucci@grupporetina.com)
-Michele Orselli (mo@ideato.it)
-Simone Gentili (sensorario@gmail.com)
---SKIPIF--
-<?php
-if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
-?>
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(proc_nice( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(true)
-bool(true)
-
-Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-bool(true)
-bool(true)
diff --git a/ext/standard/tests/image/getimagesize_variation1.phpt b/ext/standard/tests/image/getimagesize_variation1.phpt
deleted file mode 100644
index 3d3814414e..0000000000
--- a/ext/standard/tests/image/getimagesize_variation1.phpt
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test getimagesize() function : usage variations - unexpected type for arg 1
---FILE--
-<?php
-/* Prototype : proto array getimagesize(string imagefile [, array info])
- * Description: Get the size of an image as 4-element array
- * Source code: ext/standard/image.c
- * Alias to functions:
- */
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing getimagesize() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$info = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- "0" => 0,
- "1" => 1,
- "12345" => 12345,
- "-2345" => -2345,
-
- // float data
- "10.5" => 10.5,
- "-10.5" => -10.5,
- "10.1234567e5" => 10.1234567e10,
- "10.7654321e-5" => 10.7654321E-5,
- .5,
-
- // array data
- "array()" => array(),
- "array(0)" => array(0),
- "array(1)" => array(1),
- "array(1, 2)" => array(1, 2),
- "array('color' => 'red', 'item' => 'pen')" => array('color' => 'red', 'item' => 'pen'),
-
- // null data
- "NULL" => NULL,
- "null" => null,
-
- // boolean data
- "true" => true,
- "false" => false,
- "TRUE" => TRUE,
- "FALSE" => FALSE,
-
- // empty data
- "\"\"" => "",
- "''" => '',
-
- // object data
- "new stdclass()" => new stdclass(),
-
- // undefined data
- "undefined_var" => $undefined_var,
-
- // unset data
- "unset_var" => $unset_var,
-);
-
-// loop through each element of the array for imagefile
-
-foreach($values as $key => $value) {
- echo "\n-- Arg value: $key --\n";
- var_dump( getimagesize($value, $info) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing getimagesize() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(%d)
-Error: 8 - Undefined variable: unset_var, %s(%d)
-
--- Arg value: 0 --
-Error: 2 - getimagesize(0): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: 1 --
-Error: 2 - getimagesize(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: 12345 --
-Error: 2 - getimagesize(12345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: -2345 --
-Error: 2 - getimagesize(-2345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: 10.5 --
-Error: 2 - getimagesize(10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: -10.5 --
-Error: 2 - getimagesize(-10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: 10.1234567e5 --
-Error: 2 - getimagesize(101234567000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: 10.7654321e-5 --
-Error: 2 - getimagesize(0.000107654321): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: 12346 --
-Error: 2 - getimagesize(0.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: array() --
-Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value: array(0) --
-Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value: array(1) --
-Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value: array(1, 2) --
-Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value: array('color' => 'red', 'item' => 'pen') --
-Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value: NULL --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: null --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: true --
-Error: 2 - getimagesize(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: false --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: TRUE --
-Error: 2 - getimagesize(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
--- Arg value: FALSE --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: "" --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: '' --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: new stdclass() --
-Error: 2 - getimagesize() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
--- Arg value: undefined_var --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-
--- Arg value: unset_var --
-Error: 2 - getimagesize(): Filename cannot be empty, %s(%d)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt
deleted file mode 100644
index d6276cf559..0000000000
--- a/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt
+++ /dev/null
@@ -1,154 +0,0 @@
---TEST--
-Test image_type_to_mime_type() function : usage variations - Pass different data types as imagetype
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : string image_type_to_mime_type(int imagetype)
- * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype
- * Source code: ext/standard/image.c
- */
-
-echo "*** Testing image_type_to_mime_type() : usage variations ***\n";
-
-error_reporting(E_ALL ^ E_NOTICE);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-class MyClass
-{
- function __toString() {
- return "MyClass";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 100.5,
- -100.5,
- 100.1234567e10,
- 100.7654321E-10,
- .5,
-
- // array data
- array(),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-);
-
-// loop through each element of the array for imagetype
-$iterator = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( image_type_to_mime_type($value) );
- $iterator++;
-};
-?>
-===DONE===
---EXPECTF--
-*** Testing image_type_to_mime_type() : usage variations ***
-
--- Iteration 1 --
-string(24) "application/octet-stream"
-
--- Iteration 2 --
-string(24) "application/octet-stream"
-
--- Iteration 3 --
-string(24) "application/octet-stream"
-
--- Iteration 4 --
-string(24) "application/octet-stream"
-
--- Iteration 5 --
-string(24) "application/octet-stream"
-
--- Iteration 6 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
--- Iteration 8 --
-string(24) "application/octet-stream"
-
--- Iteration 9 --
-string(24) "application/octet-stream"
-
--- Iteration 10 --
-string(9) "image/gif"
-
--- Iteration 11 --
-string(24) "application/octet-stream"
-
--- Iteration 12 --
-string(9) "image/gif"
-
--- Iteration 13 --
-string(24) "application/octet-stream"
-
--- Iteration 14 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: image_type_to_mime_type() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
--- Iteration 19 --
-string(24) "application/octet-stream"
-
--- Iteration 20 --
-string(24) "application/octet-stream"
-===DONE===
diff --git a/ext/standard/tests/mail/ezmlm_hash_variation1.phpt b/ext/standard/tests/mail/ezmlm_hash_variation1.phpt
deleted file mode 100644
index 123195e5ec..0000000000
--- a/ext/standard/tests/mail/ezmlm_hash_variation1.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test explode() function : usage variations - test values for $delimiter argument
---FILE--
-<?php
-
-/* Prototype : array explode ( string $delimiter , string $string [, int $limit ] )
- * Description: Split a string by string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing explode() function: with unexpected inputs for 'delimiter' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $delimiter
-$delimiters = array (
-
- // integer values
- 0,
- 1,
- 255,
- 256,
- PHP_INT_MAX,
- -PHP_INT_MAX,
-
- // float values
- 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
- array(),
- array(0),
- array(1, 2),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // null values
- NULL,
- null,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop through with each element of the $delimiters array to test explode() function
-$count = 1;
-$string = "piece1 piece2 piece3 piece4 piece5 piece6";
-$limit = 5;
-foreach($delimiters as $delimiter) {
- echo "-- Iteration $count --\n";
- var_dump( explode($delimiter, $string, $limit) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===Done===
---EXPECTF--
-*** Testing explode() function: with unexpected inputs for 'delimiter' argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- string(5) "piece"
- [1]=>
- string(35) " piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 3 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 4 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 5 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 6 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 7 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 8 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 9 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 10 --
-
-Warning: explode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: explode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: explode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-array(2) {
- [0]=>
- string(5) "piece"
- [1]=>
- string(35) " piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 14 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 15 --
-array(2) {
- [0]=>
- string(5) "piece"
- [1]=>
- string(35) " piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 16 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 19 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 20 --
-
-Warning: explode() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/standard/tests/math/atan2_variation1.phpt b/ext/standard/tests/math/atan2_variation1.phpt
deleted file mode 100644
index a2bc481ad2..0000000000
--- a/ext/standard/tests/math/atan2_variation1.phpt
+++ /dev/null
@@ -1,187 +0,0 @@
---TEST--
-Test atan2() function : usage variations - different data types as $y arg
---INI--
-precision = 10
---FILE--
-<?php
-/* Prototype : float atan2 ( float $y , float $x )
- * Description: Arc tangent of two variables.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing atan2() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12,
- -12,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 1.234567e2,
- 1.234567E-2,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of atan2()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(atan2($input, 23));
- $iterator++;
-};
-
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing atan2() : usage variations ***
-
--- Iteration 1 --
-float(0)
-
--- Iteration 2 --
-float(0.04345089539)
-
--- Iteration 3 --
-float(0.4808872802)
-
--- Iteration 4 --
-float(-0.4808872802)
-
--- Iteration 5 --
-float(1.570796316)
-
--- Iteration 6 --
-float(0.4282641529)
-
--- Iteration 7 --
-float(-0.4282641529)
-
--- Iteration 8 --
-float(1.386607742)
-
--- Iteration 9 --
-float(0.0005367682093)
-
--- Iteration 10 --
-float(0.02173570684)
-
--- Iteration 11 --
-float(0)
-
--- Iteration 12 --
-float(0)
-
--- Iteration 13 --
-float(0.04345089539)
-
--- Iteration 14 --
-float(0)
-
--- Iteration 15 --
-float(0.04345089539)
-
--- Iteration 16 --
-float(0)
-
--- Iteration 17 --
-
-Warning: atan2() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: atan2() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: atan2() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: atan2() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: atan2() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: atan2() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: atan2() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(0)
-
--- Iteration 25 --
-float(0)
-
--- Iteration 26 --
-
-Warning: atan2() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/atan2_variation2.phpt b/ext/standard/tests/math/atan2_variation2.phpt
deleted file mode 100644
index 45c0215ea3..0000000000
--- a/ext/standard/tests/math/atan2_variation2.phpt
+++ /dev/null
@@ -1,186 +0,0 @@
---TEST--
-Test atan2() function : usage variations - different data types as $x arg
---INI--
-precision = 10
---FILE--
-<?php
-/* Prototype : float atan2 ( float $y , float $x )
- * Description: Arc tangent of two variables.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing atan2() : basic functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12,
- -12,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 1.234567e2,
- 1.234567E-2,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of atan2()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(atan2(23, $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing atan2() : basic functionality ***
-
--- Iteration 1 --
-float(1.570796327)
-
--- Iteration 2 --
-float(1.527345431)
-
--- Iteration 3 --
-float(1.089909047)
-
--- Iteration 4 --
-float(2.051683607)
-
--- Iteration 5 --
-float(1.071020961E-8)
-
--- Iteration 6 --
-float(1.142532174)
-
--- Iteration 7 --
-float(1.99906048)
-
--- Iteration 8 --
-float(0.1841885846)
-
--- Iteration 9 --
-float(1.570259559)
-
--- Iteration 10 --
-float(1.54906062)
-
--- Iteration 11 --
-float(1.570796327)
-
--- Iteration 12 --
-float(1.570796327)
-
--- Iteration 13 --
-float(1.527345431)
-
--- Iteration 14 --
-float(1.570796327)
-
--- Iteration 15 --
-float(1.527345431)
-
--- Iteration 16 --
-float(1.570796327)
-
--- Iteration 17 --
-
-Warning: atan2() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: atan2() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: atan2() expects parameter 2 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: atan2() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: atan2() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: atan2() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: atan2() expects parameter 2 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(1.570796327)
-
--- Iteration 25 --
-float(1.570796327)
-
--- Iteration 26 --
-
-Warning: atan2() expects parameter 2 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/base_convert_variation2.phpt b/ext/standard/tests/math/base_convert_variation2.phpt
deleted file mode 100644
index 23e74c621d..0000000000
--- a/ext/standard/tests/math/base_convert_variation2.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test base_convert() function : usage variations - different data types as $frombase argument
---FILE--
-<?php
-/* Prototype : string base_convert ( string $number , int $frombase , int $tobase )
- * Description: Convert a number between arbitrary bases.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing base_convert() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- -1,
- -12,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 1.234567e2,
- 1.234567E-2,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // undefined data
-/*23*/ @$undefined_var,
-
- // unset data
-/*24*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behaviour of base_convert()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(base_convert(25, $input, 8));
- $iterator++;
-};
-?>
-===Done===
---EXPECTF--
-*** Testing base_convert() : usage variations ***
-
--- Iteration 1 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: base_convert(): Invalid `from base' (1) in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: base_convert(): Invalid `from base' (-1) in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: base_convert(): Invalid `from base' (-12) in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: base_convert(): Invalid `from base' (2147483647) in %s on line %d
-bool(false)
-
--- Iteration 6 --
-string(2) "31"
-
--- Iteration 7 --
-
-Warning: base_convert(): Invalid `from base' (-10) in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: base_convert(): Invalid `from base' (123) in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: base_convert(): Invalid `from base' (1) in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: base_convert(): Invalid `from base' (1) in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: base_convert() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: base_convert(): Invalid `from base' (0) in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/standard/tests/math/base_convert_variation3.phpt b/ext/standard/tests/math/base_convert_variation3.phpt
deleted file mode 100644
index d4b96fb1f2..0000000000
--- a/ext/standard/tests/math/base_convert_variation3.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test base_convert() function : usage variations - different data types as $tobase argument
---FILE--
-<?php
-/* Prototype : string base_convert ( string $number , int $frombase , int $tobase )
- * Description: Convert a number between arbitrary bases.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing base_convert() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- -1,
- -12,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 1.234567e2,
- 1.234567E-2,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // undefined data
-/*23*/ @$undefined_var,
-
- // unset data
-/*24*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behaviour of base_convert()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(base_convert(25, 10, $input));
- $iterator++;
-};
-?>
-===Done===
---EXPECTF--
-*** Testing base_convert() : usage variations ***
-
--- Iteration 1 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: base_convert(): Invalid `to base' (1) in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: base_convert(): Invalid `to base' (-1) in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: base_convert(): Invalid `to base' (-12) in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: base_convert(): Invalid `to base' (2147483647) in %s on line %d
-bool(false)
-
--- Iteration 6 --
-string(2) "25"
-
--- Iteration 7 --
-
-Warning: base_convert(): Invalid `to base' (-10) in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: base_convert(): Invalid `to base' (123) in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: base_convert(): Invalid `to base' (1) in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: base_convert(): Invalid `to base' (1) in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: base_convert() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: base_convert(): Invalid `to base' (0) in %s on line %d
-bool(false)
-===Done===
diff --git a/ext/standard/tests/math/exp_variation1.phpt b/ext/standard/tests/math/exp_variation1.phpt
deleted file mode 100644
index 5305b63660..0000000000
--- a/ext/standard/tests/math/exp_variation1.phpt
+++ /dev/null
@@ -1,187 +0,0 @@
---TEST--
-Test exp() function : usage variations - different data types as $arg argument
---INI--
-precision=14
---FILE--
-<?php
-/* Prototype : float exp ( float $arg )
- * Description: Returns e raised to the power of arg.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing exp() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $arg argument
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of exp()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(exp($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing exp() : usage variations ***
-
--- Iteration 1 --
-float(1)
-
--- Iteration 2 --
-float(2.718281828459)
-
--- Iteration 3 --
-float(INF)
-
--- Iteration 4 --
-float(0)
-
--- Iteration 5 --
-float(INF)
-
--- Iteration 6 --
-float(36315.502674247)
-
--- Iteration 7 --
-float(2.7536449349747E-5)
-
--- Iteration 8 --
-float(INF)
-
--- Iteration 9 --
-float(1.0000000012346)
-
--- Iteration 10 --
-float(1.6487212707001)
-
--- Iteration 11 --
-float(1)
-
--- Iteration 12 --
-float(1)
-
--- Iteration 13 --
-float(2.718281828459)
-
--- Iteration 14 --
-float(1)
-
--- Iteration 15 --
-float(2.718281828459)
-
--- Iteration 16 --
-float(1)
-
--- Iteration 17 --
-
-Warning: exp() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: exp() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: exp() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: exp() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: exp() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: exp() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: exp() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(1)
-
--- Iteration 25 --
-float(1)
-
--- Iteration 26 --
-
-Warning: exp() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/expm1_variation1.phpt b/ext/standard/tests/math/expm1_variation1.phpt
deleted file mode 100644
index 6d93b6eab6..0000000000
--- a/ext/standard/tests/math/expm1_variation1.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test expm1() function : usage variations - different data types as $arg argument
---INI--
-precision=14
---FILE--
-<?php
-
-/* Prototype : float expm1 ( float $arg )
- * Description: Returns exp(number) - 1, computed in a way that is accurate even
- * when the value of number is close to zero.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing expm1() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $arg argument
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789E4,
- 12.3456789E-4,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
- array(),
-
- // string data
-/*19*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // array data
- array(),
- array(1,2,4),
-
- // object data
-/*24*/ new classA(),
-
- // undefined data
-/*25*/ @$undefined_var,
-
- // unset data
-/*26*/ @$unset_var,
-
- // resource variable
-/*27*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of expm1()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(expm1($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing expm1() : usage variations ***
-
--- Iteration 1 --
-float(0)
-
--- Iteration 2 --
-float(1.718281828459)
-
--- Iteration 3 --
-float(INF)
-
--- Iteration 4 --
-float(-1)
-
--- Iteration 5 --
-float(36314.502674247)
-
--- Iteration 6 --
-float(-0.99997246355065)
-
--- Iteration 7 --
-float(INF)
-
--- Iteration 8 --
-float(0.0012353302826471)
-
--- Iteration 9 --
-float(0.64872127070013)
-
--- Iteration 10 --
-float(0)
-
--- Iteration 11 --
-float(0)
-
--- Iteration 12 --
-float(1.718281828459)
-
--- Iteration 13 --
-float(0)
-
--- Iteration 14 --
-float(1.718281828459)
-
--- Iteration 15 --
-float(0)
-
--- Iteration 16 --
-
-Warning: expm1() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: expm1() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: expm1() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: expm1() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: expm1() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: expm1() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: expm1() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: expm1() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: expm1() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 25 --
-float(0)
-
--- Iteration 26 --
-float(0)
-
--- Iteration 27 --
-
-Warning: expm1() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/fmod_variation1.phpt b/ext/standard/tests/math/fmod_variation1.phpt
deleted file mode 100644
index 345d74c431..0000000000
--- a/ext/standard/tests/math/fmod_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test fmod() function : usage variations - different data types as $x argument
---FILE--
-<?php
-/* Prototype : float fmod ( float $x , float $y )
- * Description: Returns the floating point remainder (modulo) of the division of the arguments.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing fmod() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of fmod()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(fmod($input, 2));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing fmod() : usage variations ***
-
--- Iteration 1 --
-float(0)
-
--- Iteration 2 --
-float(1)
-
--- Iteration 3 --
-float(1)
-
--- Iteration 4 --
-float(-1)
-
--- Iteration 5 --
-float(1)
-
--- Iteration 6 --
-float(0.5)
-
--- Iteration 7 --
-float(-0.5)
-
--- Iteration 8 --
-float(0)
-
--- Iteration 9 --
-float(1.23456789E-9)
-
--- Iteration 10 --
-float(0.5)
-
--- Iteration 11 --
-float(0)
-
--- Iteration 12 --
-float(0)
-
--- Iteration 13 --
-float(1)
-
--- Iteration 14 --
-float(0)
-
--- Iteration 15 --
-float(1)
-
--- Iteration 16 --
-float(0)
-
--- Iteration 17 --
-
-Warning: fmod() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: fmod() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: fmod() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: fmod() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: fmod() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: fmod() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: fmod() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(0)
-
--- Iteration 25 --
-float(0)
-
--- Iteration 26 --
-
-Warning: fmod() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/fmod_variation2.phpt b/ext/standard/tests/math/fmod_variation2.phpt
deleted file mode 100644
index 6c5fc82541..0000000000
--- a/ext/standard/tests/math/fmod_variation2.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test fmod() function : usage variations - different data types as $y argument
---FILE--
-<?php
-/* Prototype : float fmod ( float $x , float $y )
- * Description: Returns the floating point remainder (modulo) of the division of the arguments.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing fmod() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of fmod()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(fmod(123456, $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing fmod() : usage variations ***
-
--- Iteration 1 --
-float(NAN)
-
--- Iteration 2 --
-float(0)
-
--- Iteration 3 --
-float(6)
-
--- Iteration 4 --
-float(1516)
-
--- Iteration 5 --
-float(123456)
-
--- Iteration 6 --
-float(7.5)
-
--- Iteration 7 --
-float(7.5)
-
--- Iteration 8 --
-float(123456)
-
--- Iteration 9 --
-float(2.3605615109341E-10)
-
--- Iteration 10 --
-float(0)
-
--- Iteration 11 --
-float(NAN)
-
--- Iteration 12 --
-float(NAN)
-
--- Iteration 13 --
-float(0)
-
--- Iteration 14 --
-float(NAN)
-
--- Iteration 15 --
-float(0)
-
--- Iteration 16 --
-float(NAN)
-
--- Iteration 17 --
-
-Warning: fmod() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: fmod() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: fmod() expects parameter 2 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: fmod() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: fmod() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: fmod() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: fmod() expects parameter 2 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(NAN)
-
--- Iteration 25 --
-float(NAN)
-
--- Iteration 26 --
-
-Warning: fmod() expects parameter 2 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/hypot_variation1.phpt b/ext/standard/tests/math/hypot_variation1.phpt
deleted file mode 100644
index 0fdfa25375..0000000000
--- a/ext/standard/tests/math/hypot_variation1.phpt
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test hypot() function : usage variations - different data types as $x argument
---FILE--
-<?php
-/* Prototype : float hypot ( float $x , float $y )
- * Description: Calculate the length of the hypotenuse of a right-angle triangle
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing hypot() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $arg argument
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of hypot()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(hypot($input, 5));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing hypot() : usage variations ***
-
--- Iteration 1 --
-float(5)
-
--- Iteration 2 --
-float(5.0990195135928)
-
--- Iteration 3 --
-float(12345.001012556)
-
--- Iteration 4 --
-float(2345.0053304843)
-
--- Iteration 5 --
-float(2147483647)
-
--- Iteration 6 --
-float(11.629703349613)
-
--- Iteration 7 --
-float(11.629703349613)
-
--- Iteration 8 --
-float(123456789000)
-
--- Iteration 9 --
-float(5)
-
--- Iteration 10 --
-float(5.0249378105604)
-
--- Iteration 11 --
-float(5)
-
--- Iteration 12 --
-float(5)
-
--- Iteration 13 --
-float(5.0990195135928)
-
--- Iteration 14 --
-float(5)
-
--- Iteration 15 --
-float(5.0990195135928)
-
--- Iteration 16 --
-float(5)
-
--- Iteration 17 --
-
-Warning: hypot() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: hypot() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: hypot() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: hypot() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: hypot() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: hypot() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: hypot() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(5)
-
--- Iteration 25 --
-float(5)
-
--- Iteration 26 --
-
-Warning: hypot() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/hypot_variation2.phpt b/ext/standard/tests/math/hypot_variation2.phpt
deleted file mode 100644
index 3b48b23123..0000000000
--- a/ext/standard/tests/math/hypot_variation2.phpt
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test hypot() function : usage variations - different data types as $y argument
---FILE--
-<?php
-/* Prototype : float hypot ( float $x , float $y )
- * Description: Calculate the length of the hypotenuse of a right-angle triangle
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing hypot() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $arg argument
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of hypot()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(hypot(3, $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing hypot() : usage variations ***
-
--- Iteration 1 --
-float(3)
-
--- Iteration 2 --
-float(3.1622776601684)
-
--- Iteration 3 --
-float(12345.00036452)
-
--- Iteration 4 --
-float(2345.0019189758)
-
--- Iteration 5 --
-float(2147483647)
-
--- Iteration 6 --
-float(10.920164833921)
-
--- Iteration 7 --
-float(10.920164833921)
-
--- Iteration 8 --
-float(123456789000)
-
--- Iteration 9 --
-float(3)
-
--- Iteration 10 --
-float(3.0413812651491)
-
--- Iteration 11 --
-float(3)
-
--- Iteration 12 --
-float(3)
-
--- Iteration 13 --
-float(3.1622776601684)
-
--- Iteration 14 --
-float(3)
-
--- Iteration 15 --
-float(3.1622776601684)
-
--- Iteration 16 --
-float(3)
-
--- Iteration 17 --
-
-Warning: hypot() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: hypot() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: hypot() expects parameter 2 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: hypot() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: hypot() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: hypot() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: hypot() expects parameter 2 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(3)
-
--- Iteration 25 --
-float(3)
-
--- Iteration 26 --
-
-Warning: hypot() expects parameter 2 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/is_finite_variation1.phpt b/ext/standard/tests/math/is_finite_variation1.phpt
deleted file mode 100644
index 498d0b2717..0000000000
--- a/ext/standard/tests/math/is_finite_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test is_finite() function : usage variations - different data types as $val argument
---FILE--
-<?php
-/* Prototype : bool is_finite ( float $val )
- * Description: Finds whether a value is a legal finite number.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing is_finite() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of is_finite()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(is_finite($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing is_finite() : usage variations ***
-
--- Iteration 1 --
-bool(true)
-
--- Iteration 2 --
-bool(true)
-
--- Iteration 3 --
-bool(true)
-
--- Iteration 4 --
-bool(true)
-
--- Iteration 5 --
-bool(true)
-
--- Iteration 6 --
-bool(true)
-
--- Iteration 7 --
-bool(true)
-
--- Iteration 8 --
-bool(true)
-
--- Iteration 9 --
-bool(true)
-
--- Iteration 10 --
-bool(true)
-
--- Iteration 11 --
-bool(true)
-
--- Iteration 12 --
-bool(true)
-
--- Iteration 13 --
-bool(true)
-
--- Iteration 14 --
-bool(true)
-
--- Iteration 15 --
-bool(true)
-
--- Iteration 16 --
-bool(true)
-
--- Iteration 17 --
-
-Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: is_finite() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: is_finite() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-bool(true)
-
--- Iteration 25 --
-bool(true)
-
--- Iteration 26 --
-
-Warning: is_finite() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/is_infinite_variation1.phpt b/ext/standard/tests/math/is_infinite_variation1.phpt
deleted file mode 100644
index 0f57209b98..0000000000
--- a/ext/standard/tests/math/is_infinite_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test is_infinite() function : usage variations - different data types as $val argument
---FILE--
-<?php
-/* Prototype : bool is_finite ( float $val )
- * Description: Finds whether a value is infinite.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing is_infinite() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of is_infinite()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(is_infinite($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing is_infinite() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-
-Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: is_infinite() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: is_infinite() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-bool(false)
-
--- Iteration 25 --
-bool(false)
-
--- Iteration 26 --
-
-Warning: is_infinite() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/is_nan_variation1.phpt b/ext/standard/tests/math/is_nan_variation1.phpt
deleted file mode 100644
index 9cd24cfd91..0000000000
--- a/ext/standard/tests/math/is_nan_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test is_nan() function : usage variations - different data types as $val argument
---FILE--
-<?php
-/* Prototype : bool is_nan ( float $val )
- * Description: Finds whether a value is not a number.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing is_nan() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of is_nan()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(is_nan($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing is_nan() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-
-Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: is_nan() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: is_nan() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-bool(false)
-
--- Iteration 25 --
-bool(false)
-
--- Iteration 26 --
-
-Warning: is_nan() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/log1p_variation1.phpt b/ext/standard/tests/math/log1p_variation1.phpt
deleted file mode 100644
index 2065fb9fba..0000000000
--- a/ext/standard/tests/math/log1p_variation1.phpt
+++ /dev/null
@@ -1,191 +0,0 @@
---TEST--
-Test log1p() function : usage variations - different data types as $arg argument
---INI--
-precision=14
---FILE--
-<?php
-/* Prototype : float log1p ( float $arg )
- * Description: Returns log(1 + number), computed in a way that is accurate even
- * when the value of number is close to zero
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing log1p() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
- -2147483648,
-
- // float data
-/*7*/ 10.5,
- -10.5,
- 12.3456789E4,
- 12.3456789E-4,
- .5,
-
- // null data
-/*12*/ NULL,
- null,
-
- // boolean data
-/*14*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*18*/ "",
- '',
- array(),
-
- // string data
-/*21*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*24*/ new classA(),
-
- // undefined data
-/*25*/ @$undefined_var,
-
- // unset data
-/*26*/ @$unset_var,
-
- // resource variable
-/*27*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of log1p()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(log1p($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing log1p() : usage variations ***
-
--- Iteration 1 --
-float(0)
-
--- Iteration 2 --
-float(0.69314718055995)
-
--- Iteration 3 --
-float(9.4210874029538)
-
--- Iteration 4 --
-float(NAN)
-
--- Iteration 5 --
-float(21.487562597358)
-
--- Iteration 6 --
-float(NAN)
-
--- Iteration 7 --
-float(2.4423470353692)
-
--- Iteration 8 --
-float(NAN)
-
--- Iteration 9 --
-float(11.723654587153)
-
--- Iteration 10 --
-float(0.0012338064377078)
-
--- Iteration 11 --
-float(0.40546510810816)
-
--- Iteration 12 --
-float(0)
-
--- Iteration 13 --
-float(0)
-
--- Iteration 14 --
-float(0.69314718055995)
-
--- Iteration 15 --
-float(0)
-
--- Iteration 16 --
-float(0.69314718055995)
-
--- Iteration 17 --
-float(0)
-
--- Iteration 18 --
-
-Warning: log1p() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: log1p() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: log1p() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: log1p() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: log1p() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: log1p() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: log1p() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 25 --
-float(0)
-
--- Iteration 26 --
-float(0)
-
--- Iteration 27 --
-
-Warning: log1p() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/log_variation1.phpt b/ext/standard/tests/math/log_variation1.phpt
deleted file mode 100644
index 06954d4173..0000000000
--- a/ext/standard/tests/math/log_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test log() function : usage variations - different data types as $arg argument
---FILE--
-<?php
-/* Prototype : float log ( float $arg [, float $base ] )
- * Description: Natural logarithm.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing log() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of log()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(log($input, 10));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing log() : usage variations ***
-
--- Iteration 1 --
-float(-INF)
-
--- Iteration 2 --
-float(0)
-
--- Iteration 3 --
-float(4.091491094268)
-
--- Iteration 4 --
-float(NAN)
-
--- Iteration 5 --
-float(9.3319298653812)
-
--- Iteration 6 --
-float(1.0211892990699)
-
--- Iteration 7 --
-float(NAN)
-
--- Iteration 8 --
-float(11.091514977169)
-
--- Iteration 9 --
-float(-8.9084850228307)
-
--- Iteration 10 --
-float(-0.30102999566398)
-
--- Iteration 11 --
-float(-INF)
-
--- Iteration 12 --
-float(-INF)
-
--- Iteration 13 --
-float(0)
-
--- Iteration 14 --
-float(-INF)
-
--- Iteration 15 --
-float(0)
-
--- Iteration 16 --
-float(-INF)
-
--- Iteration 17 --
-
-Warning: log() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: log() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: log() expects parameter 1 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: log() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: log() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: log() expects parameter 1 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: log() expects parameter 1 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(-INF)
-
--- Iteration 25 --
-float(-INF)
-
--- Iteration 26 --
-
-Warning: log() expects parameter 1 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/log_variation2.phpt b/ext/standard/tests/math/log_variation2.phpt
deleted file mode 100644
index 4e4612fdc0..0000000000
--- a/ext/standard/tests/math/log_variation2.phpt
+++ /dev/null
@@ -1,202 +0,0 @@
---TEST--
-Test log() function : usage variations - different data types as $base argument
---FILE--
-<?php
-/* Prototype : float log ( float $arg [, float $base ] )
- * Description: Natural logarithm.
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing log() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of log()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(log(3.14, $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing log() : usage variations ***
-
--- Iteration 1 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 2 --
-float(NAN)
-
--- Iteration 3 --
-float(0.12145441273706)
-
--- Iteration 4 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 5 --
-float(0.053250469650086)
-
--- Iteration 6 --
-float(0.48661854224853)
-
--- Iteration 7 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 8 --
-float(0.044802684673473)
-
--- Iteration 9 --
-float(-0.055781611216686)
-
--- Iteration 10 --
-float(-1.6507645591169)
-
--- Iteration 11 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 13 --
-float(NAN)
-
--- Iteration 14 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 15 --
-float(NAN)
-
--- Iteration 16 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: log() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: log() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: log() expects parameter 2 to be float, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: log() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: log() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: log() expects parameter 2 to be float, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: log() expects parameter 2 to be float, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 25 --
-
-Warning: log(): base must be greater than 0 in %s on line %d
-bool(false)
-
--- Iteration 26 --
-
-Warning: log() expects parameter 2 to be float, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/mt_rand_variation1.phpt b/ext/standard/tests/math/mt_rand_variation1.phpt
deleted file mode 100644
index d4f976b98a..0000000000
--- a/ext/standard/tests/math/mt_rand_variation1.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test rand() function : usage variations - different data types as $min argument
---FILE--
-<?php
-/* Prototype : int mt_rand ([ int $min , int $max ] )
- * Description: Generate a better random value.
- * Source code: ext/standard/rand.c
- */
-
-echo "*** Testing mt_rand() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000E8,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of mt_rand()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(mt_rand($input, mt_getrandmax()));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing mt_rand() : usage variations ***
-
--- Iteration 1 --
-int(%i)
-
--- Iteration 2 --
-int(%i)
-
--- Iteration 3 --
-int(%i)
-
--- Iteration 4 --
-int(%i)
-
--- Iteration 5 --
-int(%i)
-
--- Iteration 6 --
-int(%i)
-
--- Iteration 7 --
-int(%i)
-
--- Iteration 8 --
-int(%i)
-
--- Iteration 9 --
-int(%i)
-
--- Iteration 10 --
-int(%i)
-
--- Iteration 11 --
-int(%i)
-
--- Iteration 12 --
-int(%i)
-
--- Iteration 13 --
-int(%i)
-
--- Iteration 14 --
-int(%i)
-
--- Iteration 15 --
-int(%i)
-
--- Iteration 16 --
-int(%i)
-
--- Iteration 17 --
-
-Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mt_rand() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: mt_rand() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-int(%i)
-
--- Iteration 25 --
-int(%i)
-
--- Iteration 26 --
-
-Warning: mt_rand() expects parameter 1 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/mt_rand_variation2.phpt b/ext/standard/tests/math/mt_rand_variation2.phpt
deleted file mode 100644
index 5a5b191b1c..0000000000
--- a/ext/standard/tests/math/mt_rand_variation2.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test mt_rand() function : usage variations - different data types as $max argument
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : int mt_rand ([ int $min , int $max ] )
- * Description: Generate a better random value.
- * Source code: ext/standard/rand.c
- */
-
-echo "*** Testing mt_rand) : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of mt_rand()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(mt_rand(-1 * mt_getrandmax(), $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing mt_rand) : usage variations ***
-
--- Iteration 1 --
-int(%i)
-
--- Iteration 2 --
-int(%i)
-
--- Iteration 3 --
-int(%i)
-
--- Iteration 4 --
-int(%i)
-
--- Iteration 5 --
-int(%i)
-
--- Iteration 6 --
-int(%i)
-
--- Iteration 7 --
-int(%i)
-
--- Iteration 8 --
-
-Warning: mt_rand() expects parameter 2 to be int, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-int(%i)
-
--- Iteration 10 --
-int(%i)
-
--- Iteration 11 --
-int(%i)
-
--- Iteration 12 --
-int(%i)
-
--- Iteration 13 --
-int(%i)
-
--- Iteration 14 --
-int(%i)
-
--- Iteration 15 --
-int(%i)
-
--- Iteration 16 --
-int(%i)
-
--- Iteration 17 --
-
-Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mt_rand() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: mt_rand() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-int(%i)
-
--- Iteration 25 --
-int(%i)
-
--- Iteration 26 --
-
-Warning: mt_rand() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/mt_srand_variation1.phpt b/ext/standard/tests/math/mt_srand_variation1.phpt
deleted file mode 100644
index 2856446e19..0000000000
--- a/ext/standard/tests/math/mt_srand_variation1.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test mt_srand() function : usage variations - different data types as $seed argument
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : void mt_srand ([ int $seed ] )
- * Description: Seed the better random number generator.
- * Source code: ext/standard/rand.c
- */
-
-echo "*** Testing mt_srand() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of mt_srand()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(mt_srand($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing mt_srand() : usage variations ***
-
--- Iteration 1 --
-NULL
-
--- Iteration 2 --
-NULL
-
--- Iteration 3 --
-NULL
-
--- Iteration 4 --
-NULL
-
--- Iteration 5 --
-NULL
-
--- Iteration 6 --
-NULL
-
--- Iteration 7 --
-NULL
-
--- Iteration 8 --
-
-Warning: mt_srand() expects parameter 1 to be int, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-NULL
-
--- Iteration 10 --
-NULL
-
--- Iteration 11 --
-NULL
-
--- Iteration 12 --
-NULL
-
--- Iteration 13 --
-NULL
-
--- Iteration 14 --
-NULL
-
--- Iteration 15 --
-NULL
-
--- Iteration 16 --
-NULL
-
--- Iteration 17 --
-
-Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: mt_srand() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: mt_srand() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-NULL
-
--- Iteration 25 --
-NULL
-
--- Iteration 26 --
-
-Warning: mt_srand() expects parameter 1 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/rand_variation1.phpt b/ext/standard/tests/math/rand_variation1.phpt
deleted file mode 100644
index d77d48e6a4..0000000000
--- a/ext/standard/tests/math/rand_variation1.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test rand() function : usage variations - different data types as $min argument
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : int rand ([ int $min , int $max ] )
- * Description: Generate a random integer.
- * Source code: ext/standard/rand.c
- */
-
-echo "*** Testing rand() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of rand()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(rand($input, 100));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing rand() : usage variations ***
-
--- Iteration 1 --
-int(%i)
-
--- Iteration 2 --
-int(%i)
-
--- Iteration 3 --
-int(%i)
-
--- Iteration 4 --
-int(%i)
-
--- Iteration 5 --
-int(%i)
-
--- Iteration 6 --
-int(%i)
-
--- Iteration 7 --
-int(%i)
-
--- Iteration 8 --
-
-Warning: rand() expects parameter 1 to be int, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-int(%i)
-
--- Iteration 10 --
-int(%i)
-
--- Iteration 11 --
-int(%i)
-
--- Iteration 12 --
-int(%i)
-
--- Iteration 13 --
-int(%i)
-
--- Iteration 14 --
-int(%i)
-
--- Iteration 15 --
-int(%i)
-
--- Iteration 16 --
-int(%i)
-
--- Iteration 17 --
-
-Warning: rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: rand() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: rand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: rand() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-int(%i)
-
--- Iteration 25 --
-int(%i)
-
--- Iteration 26 --
-
-Warning: rand() expects parameter 1 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/rand_variation2.phpt b/ext/standard/tests/math/rand_variation2.phpt
deleted file mode 100644
index 1aee6af2c7..0000000000
--- a/ext/standard/tests/math/rand_variation2.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test rand() function : usage variations - different data types as $max argument
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : int rand ([ int $min , int $max ] )
- * Description: Generate a random integer.
- * Source code: ext/standard/rand.c
- */
-
-echo "*** Testing rand) : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of rand()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(rand(100, $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing rand) : usage variations ***
-
--- Iteration 1 --
-int(%i)
-
--- Iteration 2 --
-int(%i)
-
--- Iteration 3 --
-int(%i)
-
--- Iteration 4 --
-int(%i)
-
--- Iteration 5 --
-int(%i)
-
--- Iteration 6 --
-int(%i)
-
--- Iteration 7 --
-int(%i)
-
--- Iteration 8 --
-
-Warning: rand() expects parameter 2 to be int, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-int(%i)
-
--- Iteration 10 --
-int(%i)
-
--- Iteration 11 --
-int(%i)
-
--- Iteration 12 --
-int(%i)
-
--- Iteration 13 --
-int(%i)
-
--- Iteration 14 --
-int(%i)
-
--- Iteration 15 --
-int(%i)
-
--- Iteration 16 --
-int(%i)
-
--- Iteration 17 --
-
-Warning: rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: rand() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: rand() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: rand() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-int(%i)
-
--- Iteration 25 --
-int(%i)
-
--- Iteration 26 --
-
-Warning: rand() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/round_variation2.phpt b/ext/standard/tests/math/round_variation2.phpt
deleted file mode 100644
index e0358da735..0000000000
--- a/ext/standard/tests/math/round_variation2.phpt
+++ /dev/null
@@ -1,187 +0,0 @@
---TEST--
-Test round() function : usage variations - different data types as $precision argument
---INI--
-precision=14
---FILE--
-<?php
-/* Prototype : float round ( float $val [, int $precision ] )
- * Description: Returns the rounded value of val to specified precision (number of digits
- * after the decimal point)
- * Source code: ext/standard/math.c
- */
-
-echo "*** Testing round() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e5,
- 12.3456789000E-5,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of round()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(round(123.4456789, $input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing round() : usage variations ***
-
--- Iteration 1 --
-float(123)
-
--- Iteration 2 --
-float(123.4)
-
--- Iteration 3 --
-float(123.4456789)
-
--- Iteration 4 --
-float(0)
-
--- Iteration 5 --
-float(123.4456789)
-
--- Iteration 6 --
-float(123.4456789)
-
--- Iteration 7 --
-float(0)
-
--- Iteration 8 --
-float(123.4456789)
-
--- Iteration 9 --
-float(123)
-
--- Iteration 10 --
-float(123)
-
--- Iteration 11 --
-float(123)
-
--- Iteration 12 --
-float(123)
-
--- Iteration 13 --
-float(123.4)
-
--- Iteration 14 --
-float(123)
-
--- Iteration 15 --
-float(123.4)
-
--- Iteration 16 --
-float(123)
-
--- Iteration 17 --
-
-Warning: round() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: round() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: round() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: round() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: round() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: round() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: round() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-float(123)
-
--- Iteration 25 --
-float(123)
-
--- Iteration 26 --
-
-Warning: round() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/math/srand_variation1.phpt b/ext/standard/tests/math/srand_variation1.phpt
deleted file mode 100644
index 8e5a1cc5e8..0000000000
--- a/ext/standard/tests/math/srand_variation1.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test srand() function : usage variations - different data types as $seed argument
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : void srand ([ int $seed ] )
- * Description: Seed the random number generator.
- * Source code: ext/standard/rand.c
- */
-
-echo "*** Testing srand() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-abc
-xyz
-EOT;
-
-// get a class
-class classA
-{
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-$inputs = array(
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
- 2147483647,
-
- // float data
-/*6*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*11*/ NULL,
- null,
-
- // boolean data
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*17*/ "",
- '',
- array(),
-
- // string data
-/*20*/ "abcxyz",
- 'abcxyz',
- $heredoc,
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-);
-
-// loop through each element of $inputs to check the behaviour of srand()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(srand($input));
- $iterator++;
-};
-fclose($fp);
-?>
-===Done===
---EXPECTF--
-*** Testing srand() : usage variations ***
-
--- Iteration 1 --
-NULL
-
--- Iteration 2 --
-NULL
-
--- Iteration 3 --
-NULL
-
--- Iteration 4 --
-NULL
-
--- Iteration 5 --
-NULL
-
--- Iteration 6 --
-NULL
-
--- Iteration 7 --
-NULL
-
--- Iteration 8 --
-
-Warning: srand() expects parameter 1 to be int, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-NULL
-
--- Iteration 10 --
-NULL
-
--- Iteration 11 --
-NULL
-
--- Iteration 12 --
-NULL
-
--- Iteration 13 --
-NULL
-
--- Iteration 14 --
-NULL
-
--- Iteration 15 --
-NULL
-
--- Iteration 16 --
-NULL
-
--- Iteration 17 --
-
-Warning: srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: srand() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: srand() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: srand() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
--- Iteration 24 --
-NULL
-
--- Iteration 25 --
-NULL
-
--- Iteration 26 --
-
-Warning: srand() expects parameter 1 to be int, resource given in %s on line %d
-NULL
-===Done===
diff --git a/ext/standard/tests/network/ip2long_variation1.phpt b/ext/standard/tests/network/ip2long_variation1.phpt
deleted file mode 100644
index fa7410930f..0000000000
--- a/ext/standard/tests/network/ip2long_variation1.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test ip2long() function : usage variation 1
---FILE--
-<?php
-/* Prototype : int ip2long(string ip_address)
- * Description: Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing ip2long() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$res = fopen(__FILE__,'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $res,
-);
-
-// loop through each element of the array for ip_address
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( ip2long($value) );
-};
-
-fclose($res);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing ip2long() : usage variation ***
-
---int 0--
-bool(false)
-
---int 1--
-bool(false)
-
---int 12345--
-bool(false)
-
---int -12345--
-bool(false)
-
---float 10.5--
-bool(false)
-
---float -10.5--
-bool(false)
-
---float 12.3456789000e10--
-bool(false)
-
---float -12.3456789000e10--
-bool(false)
-
---float .5--
-bool(false)
-
---empty array--
-Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-bool(false)
-
---lowercase null--
-bool(false)
-
---lowercase true--
-bool(false)
-
---lowercase false--
-bool(false)
-
---uppercase TRUE--
-bool(false)
-
---uppercase FALSE--
-bool(false)
-
---empty string DQ--
-bool(false)
-
---empty string SQ--
-bool(false)
-
---instance of classWithToString--
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - ip2long() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-bool(false)
-
---unset var--
-bool(false)
-
---resource--
-Error: 2 - ip2long() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/standard/tests/network/long2ip_variation1.phpt b/ext/standard/tests/network/long2ip_variation1.phpt
deleted file mode 100644
index 93efc098b5..0000000000
--- a/ext/standard/tests/network/long2ip_variation1.phpt
+++ /dev/null
@@ -1,203 +0,0 @@
---TEST--
-Test long2ip() function : usage variation
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) == "WIN")
- die("skip don't run on Windows");
-?>
---FILE--
-<?php
-/* Prototype : string long2ip(int proper_address)
- * Description: Converts an (IPv4) Internet network address into a string in Internet standard dotted format
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing long2ip() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-// resource
-$res = fopen(__FILE__,'r');
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource
- 'resource' => $res,
-);
-
-// loop through each element of the array for proper_address
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( long2ip($value) );
-};
-
-fclose($res);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing long2ip() : usage variation ***
-
---float 10.5--
-string(8) "0.0.0.10"
-
---float -10.5--
-string(15) "255.255.255.246"
-
---float .5--
-string(7) "0.0.0.0"
-
---empty array--
-Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d)
-NULL
-
---int indexed array--
-Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d)
-NULL
-
---associative array--
-Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d)
-NULL
-
---nested arrays--
-Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d)
-NULL
-
---uppercase NULL--
-string(7) "0.0.0.0"
-
---lowercase null--
-string(7) "0.0.0.0"
-
---lowercase true--
-string(7) "0.0.0.1"
-
---lowercase false--
-string(7) "0.0.0.0"
-
---uppercase TRUE--
-string(7) "0.0.0.1"
-
---uppercase FALSE--
-string(7) "0.0.0.0"
-
---empty string DQ--
-Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d)
-NULL
-
---empty string SQ--
-Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d)
-NULL
-
---string DQ--
-Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d)
-NULL
-
---string SQ--
-Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d)
-NULL
-
---mixed case string--
-Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d)
-NULL
-
---heredoc--
-Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - long2ip() expects parameter 1 to be int, object given, %slong2ip_variation1.php(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - long2ip() expects parameter 1 to be int, object given, %slong2ip_variation1.php(%d)
-NULL
-
---undefined var--
-string(7) "0.0.0.0"
-
---unset var--
-string(7) "0.0.0.0"
-
---resource--
-Error: 2 - long2ip() expects parameter 1 to be int, resource given, %slong2ip_variation1.php(%d)
-NULL
-===DONE===
diff --git a/ext/standard/tests/strings/addslashes_variation1.phpt b/ext/standard/tests/strings/addslashes_variation1.phpt
deleted file mode 100644
index e204498ba6..0000000000
--- a/ext/standard/tests/strings/addslashes_variation1.phpt
+++ /dev/null
@@ -1,171 +0,0 @@
---TEST--
-Test addslashes() function : usage variations - non-string type argument
---FILE--
-<?php
-/* Prototype : string addslashes ( string $str )
- * Description: Returns a string with backslashes before characters that need to be quoted in database queries etc.
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Test addslashes() with non-string type argument such as int, float, etc
-*/
-
-echo "*** Testing addslashes() : with non-string type argument ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj'ct";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float values
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
-/*15*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
-/*19*/ "",
- '',
-
- // undefined variable
-/*21*/ $undefined_var,
-
- // unset variable
-/*22*/ $unset_var,
-
- // objects
-/*23*/ new sample(),
-
- // resource
-/*24*/ $file_handle,
-
-/*25*/ NULL,
- null
-);
-
-
-// loop through each element of the array and check the working of addslashes()
-// when $str argument is supplied with different values
-echo "\n--- Testing addslashes() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( addslashes($str) );
-
- $counter ++;
-}
-
-// closing the file
-fclose($file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing addslashes() : with non-string type argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing addslashes() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "101234567000"
--- Iteration 8 --
-string(13) "1.07654321E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(0) ""
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
--- Iteration 23 --
-string(7) "obj\'ct"
--- Iteration 24 --
-
-Warning: addslashes() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-string(0) ""
--- Iteration 26 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/bin2hex_variation1.phpt b/ext/standard/tests/strings/bin2hex_variation1.phpt
deleted file mode 100644
index d7bf15f4f4..0000000000
--- a/ext/standard/tests/strings/bin2hex_variation1.phpt
+++ /dev/null
@@ -1,128 +0,0 @@
---TEST--
-Test bin2hex() function : usage variations - test values for $str argument
---FILE--
-<?php
-
-/* Prototype : string bin2hex ( string $str )
- * Description: Convert binary data into hexadecimal representation
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing bin2hex() function: with unexpected inputs for 'str' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 123456,
-
- // float values
-/*4*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*7*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*10*/true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*14*/NULL,
- null,
-
- // objects
-/*16*/new sample(),
-
- // resource
-/*17*/$file_handle,
-
- // undefined variable
-/*18*/@$undefined_var,
-
- // unset variable
-/*19*/@$unset_var
-);
-
-// loop through with each element of the $inputs array to test bin2hex() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump(bin2hex($input) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing bin2hex() function: with unexpected inputs for 'str' argument ***
--- Iteration 1 --
-string(2) "30"
--- Iteration 2 --
-string(2) "31"
--- Iteration 3 --
-string(12) "313233343536"
--- Iteration 4 --
-string(8) "31302e35"
--- Iteration 5 --
-string(10) "2d32302e35"
--- Iteration 6 --
-string(24) "313031323334353637303030"
--- Iteration 7 --
-
-Warning: bin2hex() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: bin2hex() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: bin2hex() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 10 --
-string(2) "31"
--- Iteration 11 --
-string(0) ""
--- Iteration 12 --
-string(2) "31"
--- Iteration 13 --
-string(0) ""
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(0) ""
--- Iteration 16 --
-string(26) "73616d706c65206f626a656374"
--- Iteration 17 --
-
-Warning: bin2hex() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/chop_variation1.phpt b/ext/standard/tests/strings/chop_variation1.phpt
deleted file mode 100644
index 51f53f0153..0000000000
--- a/ext/standard/tests/strings/chop_variation1.phpt
+++ /dev/null
@@ -1,214 +0,0 @@
---TEST--
-Test chop() function : usage variations - unexpected values for str argument
---FILE--
-<?php
-/* Prototype : string chop ( string $str [, string $charlist] )
- * Description: Strip whitespace (or other characters) from the end of a string
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Testing chop() : with different unexpected values for $str argument passed to the function
-*/
-
-echo "*** Testing chop() : with unexpected values for str argument ***\n";
-// initialize all required variables
-
-$charlist = " @#$%1234567890";
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return " @#$%Object @#$%";
- }
-}
-$sample_obj = new sample;
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // object
- $sample_obj,
-
- // resource
- $file_handle
-);
-
-
-// loop through each element of the array and check the working of chop()
-// when $str argument is supplied with different values
-
-echo "\n--- Testing chop() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( chop($str) );
- var_dump( chop($str, $charlist) );
-
- $counter ++;
-}
-
-// closing the resource
-fclose( $file_handle);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing chop() : with unexpected values for str argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing chop() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
-string(0) ""
--- Iteration 2 --
-string(1) "1"
-string(0) ""
--- Iteration 3 --
-string(5) "12345"
-string(0) ""
--- Iteration 4 --
-string(5) "-2345"
-string(1) "-"
--- Iteration 5 --
-string(4) "10.5"
-string(3) "10."
--- Iteration 6 --
-string(5) "-10.5"
-string(4) "-10."
--- Iteration 7 --
-string(12) "101234567000"
-string(0) ""
--- Iteration 8 --
-string(13) "1.07654321E-9"
-string(12) "1.07654321E-"
--- Iteration 9 --
-string(3) "0.5"
-string(2) "0."
--- Iteration 10 --
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: chop() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(1) "1"
-string(0) ""
--- Iteration 16 --
-string(0) ""
-string(0) ""
--- Iteration 17 --
-string(1) "1"
-string(0) ""
--- Iteration 18 --
-string(0) ""
-string(0) ""
--- Iteration 19 --
-string(0) ""
-string(0) ""
--- Iteration 20 --
-string(0) ""
-string(0) ""
--- Iteration 21 --
-string(0) ""
-string(0) ""
--- Iteration 22 --
-string(0) ""
-string(0) ""
--- Iteration 23 --
-string(0) ""
-string(0) ""
--- Iteration 24 --
-string(0) ""
-string(0) ""
--- Iteration 25 --
-string(16) " @#$%Object @#$%"
-string(11) " @#$%Object"
--- Iteration 26 --
-
-Warning: chop() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: chop() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/chop_variation2.phpt b/ext/standard/tests/strings/chop_variation2.phpt
deleted file mode 100644
index cad8ec75f5..0000000000
--- a/ext/standard/tests/strings/chop_variation2.phpt
+++ /dev/null
@@ -1,175 +0,0 @@
---TEST--
-Test chop() function : usage variations - unexpected values for charlist argument
---FILE--
-<?php
-/* Prototype : string chop ( string $str [, string $charlist] )
- * Description: Strip whitespace (or other characters) from the end of a string
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Testing chop() : with different unexpected values for charlist argument passes to the function
-*/
-
-echo "*** Testing chop() : with different unexpected values for charlist argument ***\n";
-// initialize all required variables
-$str = 'hello world12345 ';
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "@# $%12345";
- }
-}
-
-// defining a resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // resource
- $file_handle,
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var
-
-);
-
-
-// loop through each element of the array and check the working of chop()
-// when $charlist argument is supplied with different values
-
-echo "\n--- Testing chop() by supplying different values for 'charlist' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $charlist = $values [$index];
-
- var_dump( chop($str, $charlist) );
-
- $counter ++;
-}
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing chop() : with different unexpected values for charlist argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing chop() by supplying different values for 'charlist' argument ---
--- Iteration 1 --
-string(17) "hello world12345 "
--- Iteration 2 --
-string(17) "hello world12345 "
--- Iteration 3 --
-string(17) "hello world12345 "
--- Iteration 4 --
-string(17) "hello world12345 "
--- Iteration 5 --
-string(17) "hello world12345 "
--- Iteration 6 --
-string(17) "hello world12345 "
--- Iteration 7 --
-string(17) "hello world12345 "
--- Iteration 8 --
-string(17) "hello world12345 "
--- Iteration 9 --
-string(17) "hello world12345 "
--- Iteration 10 --
-
-Warning: chop() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: chop() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: chop() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: chop() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: chop() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(17) "hello world12345 "
--- Iteration 16 --
-string(17) "hello world12345 "
--- Iteration 17 --
-string(17) "hello world12345 "
--- Iteration 18 --
-string(17) "hello world12345 "
--- Iteration 19 --
-string(11) "hello world"
--- Iteration 20 --
-string(17) "hello world12345 "
--- Iteration 21 --
-string(17) "hello world12345 "
--- Iteration 22 --
-string(17) "hello world12345 "
--- Iteration 23 --
-string(17) "hello world12345 "
--- Iteration 24 --
-
-Warning: chop() expects parameter 2 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-string(17) "hello world12345 "
--- Iteration 26 --
-string(17) "hello world12345 "
-Done
diff --git a/ext/standard/tests/strings/chunk_split_variation1.phpt b/ext/standard/tests/strings/chunk_split_variation1.phpt
deleted file mode 100644
index 0b24f9b6d9..0000000000
--- a/ext/standard/tests/strings/chunk_split_variation1.phpt
+++ /dev/null
@@ -1,169 +0,0 @@
---TEST--
-Test chunk_split() function : usage variations - with unexpected values for 'str' argument
---FILE--
-<?php
-/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line %d%d
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing chunk_split() : with unexpected values for 'str' argument ***\n";
-
-// Initialising variables
-$chunklen = 2;
-$ending = ' ';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'str'
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource data
- $fp
-);
-
-// loop through each element of the array for 'str'
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( chunk_split($values[$count], $chunklen, $ending) );
-};
-
-echo "Done";
-
-// close the resource
-fclose($fp);
-
-?>
---EXPECTF--
-*** Testing chunk_split() : with unexpected values for 'str' argument ***
--- Iteration 1 --
-string(2) "0 "
--- Iteration 2 --
-string(2) "1 "
--- Iteration 3 --
-string(8) "12 34 5 "
--- Iteration 4 --
-string(8) "-2 34 5 "
--- Iteration 5 --
-string(6) "10 .5 "
--- Iteration 6 --
-string(8) "-1 0. 5 "
--- Iteration 7 --
-string(18) "10 12 34 56 70 00 "
--- Iteration 8 --
-string(20) "1. 07 65 43 21 E- 9 "
--- Iteration 9 --
-string(5) "0. 5 "
--- Iteration 10 --
-
-Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87
-NULL
--- Iteration 11 --
-
-Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87
-NULL
--- Iteration 12 --
-
-Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87
-NULL
--- Iteration 13 --
-
-Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87
-NULL
--- Iteration 14 --
-
-Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87
-NULL
--- Iteration 15 --
-string(1) " "
--- Iteration 16 --
-string(1) " "
--- Iteration 17 --
-string(2) "1 "
--- Iteration 18 --
-string(1) " "
--- Iteration 19 --
-string(2) "1 "
--- Iteration 20 --
-string(1) " "
--- Iteration 21 --
-string(1) " "
--- Iteration 22 --
-string(1) " "
--- Iteration 23 --
-string(9) "st ri ng "
--- Iteration 24 --
-string(9) "st ri ng "
--- Iteration 25 --
-string(9) "ob je ct "
--- Iteration 26 --
-string(1) " "
--- Iteration 27 --
-string(1) " "
--- Iteration 28 --
-
-Warning: chunk_split() expects parameter 1 to be string, resource given in %s on line 87
-NULL
-Done
diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt
deleted file mode 100644
index b5d58b0d00..0000000000
--- a/ext/standard/tests/strings/chunk_split_variation2.phpt
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796)
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***\n";
-
-// Initialise function arguments
-$str = 'This is chuklen variation';
-$ending = '*';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get resource variable
-$fp = fopen(__FILE__, 'r');
-
-//Class to get object variable
-class MyClass
-{
- public function __toString() {
- return "object";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- (float) PHP_INT_MAX + 1,
- (float) -PHP_INT_MAX - 1,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of the values for 'chunklen'
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( chunk_split($str, $values[$count], $ending) );
-}
-
-//closing resource
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***
--- Iteration 1 --
-string(28) "This is ch*uklen vari*ation*"
--- Iteration 2 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: chunk_split() expects parameter 2 to be int, float given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 7 --
-
-Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 8 --
-
-Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 9 --
-
-Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 10 --
-
-Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 11 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 13 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 14 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 15 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 16 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 18 --
-
-Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 19 --
-
-Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 20 --
-
-Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 21 --
-
-Warning: chunk_split() expects parameter 2 to be int, object given in %schunk_split_variation2.php on line %d
-NULL
--- Iteration 22 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
-bool(false)
--- Iteration 24 --
-
-Warning: chunk_split() expects parameter 2 to be int, resource given in %schunk_split_variation2.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/strings/chunk_split_variation3.phpt b/ext/standard/tests/strings/chunk_split_variation3.phpt
deleted file mode 100644
index 791535371f..0000000000
--- a/ext/standard/tests/strings/chunk_split_variation3.phpt
+++ /dev/null
@@ -1,160 +0,0 @@
---TEST--
-Test chunk_split() function : usage variations - unexpected values for 'ending' argument
---FILE--
-<?php
-/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing chunk_split() : unexpected values for 'ending' ***\n";
-
-// Initializing variables
-$str = 'This is simple string.';
-$chunklen = 4.9;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__,'r');
-
-//Class to get object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//different values for 'ending'
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.123456e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource data
- $fp
-);
-
-// loop through each element of values for 'ending'
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( chunk_split($str, $chunklen, $values[$count]) );
-}
-
-echo "Done";
-
-//closing resource
-fclose($fp);
-?>
---EXPECTF--
-*** Testing chunk_split() : unexpected values for 'ending' ***
--- Iteration 1 --
-string(28) "This0 is 0simp0le s0trin0g.0"
--- Iteration 2 --
-string(28) "This1 is 1simp1le s1trin1g.1"
--- Iteration 3 --
-string(52) "This12345 is 12345simp12345le s12345trin12345g.12345"
--- Iteration 4 --
-string(52) "This-2345 is -2345simp-2345le s-2345trin-2345g.-2345"
--- Iteration 5 --
-string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5"
--- Iteration 6 --
-string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5"
--- Iteration 7 --
-string(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000"
--- Iteration 8 --
-string(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9"
--- Iteration 9 --
-string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5"
--- Iteration 10 --
-
-Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(22) "This is simple string."
--- Iteration 16 --
-string(22) "This is simple string."
--- Iteration 17 --
-string(28) "This1 is 1simp1le s1trin1g.1"
--- Iteration 18 --
-string(22) "This is simple string."
--- Iteration 19 --
-string(28) "This1 is 1simp1le s1trin1g.1"
--- Iteration 20 --
-string(22) "This is simple string."
--- Iteration 21 --
-string(22) "This is simple string."
--- Iteration 22 --
-string(22) "This is simple string."
--- Iteration 23 --
-string(58) "Thisobject is objectsimpobjectle sobjecttrinobjectg.object"
--- Iteration 24 --
-string(22) "This is simple string."
--- Iteration 25 --
-string(22) "This is simple string."
--- Iteration 26 --
-
-Warning: chunk_split() expects parameter 3 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/convert_cyr_string_variation1.phpt b/ext/standard/tests/strings/convert_cyr_string_variation1.phpt
deleted file mode 100644
index 89cb6ccc4b..0000000000
--- a/ext/standard/tests/strings/convert_cyr_string_variation1.phpt
+++ /dev/null
@@ -1,139 +0,0 @@
---TEST--
-Test convert_cyr_string() function : usage variations - test values for $str argument
---FILE--
-<?php
-
-/* Prototype : string convert_cyr_string ( string $str , string $from , string $to )
- * Description: Convert from one Cyrillic character set to another
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing convert_cyr_string() function: with unexpected inputs for 'str' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $str
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test convert_cyr_string() function
-$count = 1;
-$from = "w";
-$to = "k";
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( convert_cyr_string($input, $from, $to) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing convert_cyr_string() function: with unexpected inputs for 'str' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(3) "255"
--- Iteration 4 --
-string(3) "256"
--- Iteration 5 --
-string(10) "2147483647"
--- Iteration 6 --
-string(11) "-2147483648"
--- Iteration 7 --
-string(4) "10.5"
--- Iteration 8 --
-string(5) "-20.5"
--- Iteration 9 --
-string(12) "101234567000"
--- Iteration 10 --
-
-Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(1) "1"
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(0) ""
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(13) "sample object"
--- Iteration 20 --
-
-Warning: convert_cyr_string() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/convert_uudecode_variation1.phpt b/ext/standard/tests/strings/convert_uudecode_variation1.phpt
deleted file mode 100644
index 4c66f076a5..0000000000
--- a/ext/standard/tests/strings/convert_uudecode_variation1.phpt
+++ /dev/null
@@ -1,161 +0,0 @@
---TEST--
-Test convert_uudecode() function : usage variations - test values for $data argument
---FILE--
-<?php
-
-/* Prototype : string convert_uudecode ( string $data )
- * Description: Decode a uuencoded string
- * Source code: ext/standard/uuencode.c
-*/
-
-echo "*** Testing convert_uudecode() function: with unexpected inputs for 'data' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $data
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $data array to test convert_uudecode() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( convert_uudecode($input) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing convert_uudecode() function: with unexpected inputs for 'data' argument ***
--- Iteration 1 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-
-Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: convert_uudecode() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/convert_uuencode_variation1.phpt b/ext/standard/tests/strings/convert_uuencode_variation1.phpt
deleted file mode 100644
index c9ef4335be..0000000000
--- a/ext/standard/tests/strings/convert_uuencode_variation1.phpt
+++ /dev/null
@@ -1,137 +0,0 @@
---TEST--
-Test convert_uuencode() function : usage variations - test values for $data argument
---FILE--
-<?php
-
-/* Prototype : string convert_uuencode ( string $data )
- * Description: Uuencode a string
- * Source code: ext/standard/uuencode.c
-*/
-
-echo "*** Testing convert_uuencode() function: with unexpected inputs for 'data' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $data
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $data array to test convert_uuencode() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( bin2hex(convert_uuencode($input)) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing convert_uuencode() function: with unexpected inputs for 'data' argument ***
--- Iteration 1 --
-string(16) "212c6060600a600a"
--- Iteration 2 --
-string(16) "212c3060600a600a"
--- Iteration 3 --
-string(16) "232c4334550a600a"
--- Iteration 4 --
-string(16) "232c4334560a600a"
--- Iteration 5 --
-string(40) "2a2c4324542d5330582c5338542d5060600a600a"
--- Iteration 6 --
-string(40) "2b2b3328512d233c542e232c562d2340600a600a"
--- Iteration 7 --
-string(24) "242c33604e2d3060600a600a"
--- Iteration 8 --
-string(24) "252b3328502b4334600a600a"
--- Iteration 9 --
-string(40) "2c2c3360512c432c542d3338572c2360500a600a"
--- Iteration 10 --
-
-Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
--- Iteration 11 --
-
-Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
--- Iteration 12 --
-
-Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
--- Iteration 13 --
-string(16) "212c3060600a600a"
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(16) "212c3060600a600a"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(0) ""
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(48) "2d3c56254d3c26514528265d423a4635433d6060600a600a"
--- Iteration 20 --
-
-Warning: convert_uuencode() expects parameter 1 to be string, resource given in %s on line %d
-string(0) ""
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/count_chars_variation1.phpt b/ext/standard/tests/strings/count_chars_variation1.phpt
deleted file mode 100644
index 9e78219dbe..0000000000
--- a/ext/standard/tests/strings/count_chars_variation1.phpt
+++ /dev/null
@@ -1,262 +0,0 @@
---TEST--
-Test count_chars() function : usage variations - test values for $string argument
---FILE--
-<?php
-
-/* Prototype : mixed count_chars ( string $string [, int $mode ] )
- * Description: Return information about characters used in a string
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing count_chars() function: with unexpected inputs for 'string' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/* 1 */ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/* 7 */ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/* 10 */ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/* 13 */ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/* 17 */ NULL,
- null,
-
- // objects
-/* 19 */ new sample(),
-
- // resource
-/* 20 */ $file_handle,
-
- // undefined variable
-/* 21 */ @$undefined_var,
-
- // unset variable
-/* 22 */ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test count_chars() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- // only list characters with a frequency > 0
- var_dump(count_chars($input, 1));
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing count_chars() function: with unexpected inputs for 'string' argument ***
--- Iteration 1 --
-array(1) {
- [48]=>
- int(1)
-}
--- Iteration 2 --
-array(1) {
- [49]=>
- int(1)
-}
--- Iteration 3 --
-array(2) {
- [50]=>
- int(1)
- [53]=>
- int(2)
-}
--- Iteration 4 --
-array(3) {
- [50]=>
- int(1)
- [53]=>
- int(1)
- [54]=>
- int(1)
-}
--- Iteration 5 --
-array(7) {
- [49]=>
- int(1)
- [50]=>
- int(1)
- [51]=>
- int(1)
- [52]=>
- int(3)
- [54]=>
- int(1)
- [55]=>
- int(2)
- [56]=>
- int(1)
-}
--- Iteration 6 --
-array(8) {
- [45]=>
- int(1)
- [49]=>
- int(1)
- [50]=>
- int(1)
- [51]=>
- int(1)
- [52]=>
- int(3)
- [54]=>
- int(1)
- [55]=>
- int(1)
- [56]=>
- int(2)
-}
--- Iteration 7 --
-array(4) {
- [46]=>
- int(1)
- [48]=>
- int(1)
- [49]=>
- int(1)
- [53]=>
- int(1)
-}
--- Iteration 8 --
-array(5) {
- [45]=>
- int(1)
- [46]=>
- int(1)
- [48]=>
- int(1)
- [50]=>
- int(1)
- [53]=>
- int(1)
-}
--- Iteration 9 --
-array(8) {
- [48]=>
- int(4)
- [49]=>
- int(2)
- [50]=>
- int(1)
- [51]=>
- int(1)
- [52]=>
- int(1)
- [53]=>
- int(1)
- [54]=>
- int(1)
- [55]=>
- int(1)
-}
--- Iteration 10 --
-
-Warning: count_chars() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: count_chars() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: count_chars() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-array(1) {
- [49]=>
- int(1)
-}
--- Iteration 14 --
-array(0) {
-}
--- Iteration 15 --
-array(1) {
- [49]=>
- int(1)
-}
--- Iteration 16 --
-array(0) {
-}
--- Iteration 17 --
-array(0) {
-}
--- Iteration 18 --
-array(0) {
-}
--- Iteration 19 --
-array(12) {
- [32]=>
- int(1)
- [97]=>
- int(1)
- [98]=>
- int(1)
- [99]=>
- int(1)
- [101]=>
- int(2)
- [106]=>
- int(1)
- [108]=>
- int(1)
- [109]=>
- int(1)
- [111]=>
- int(1)
- [112]=>
- int(1)
- [115]=>
- int(1)
- [116]=>
- int(1)
-}
--- Iteration 20 --
-
-Warning: count_chars() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-array(0) {
-}
--- Iteration 22 --
-array(0) {
-}
-===DONE===
diff --git a/ext/standard/tests/strings/count_chars_variation2.phpt b/ext/standard/tests/strings/count_chars_variation2.phpt
deleted file mode 100644
index 986312a930..0000000000
--- a/ext/standard/tests/strings/count_chars_variation2.phpt
+++ /dev/null
@@ -1,164 +0,0 @@
---TEST--
-Test count_chars() function : usage variations - test values for $mode argument
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-
-/* Prototype : mixed count_chars ( string $string [, int $mode ] )
- * Description: Return information about characters used in a string
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing count_chars() function: with unexpected inputs for 'mode' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
-}
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/* 1 */ 0,
- 1,
- 255,
- 2147483647,
- -2147483648,
-
- // float values
-/* 6 */ 0.0,
- 1.3,
- 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/* 11 */ array(),
- array(1, 2, 3, 4, 5, 6, 7, 8, 9),
-
- // boolean values
-/* 14 */ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/* 18 */ NULL,
- null,
-
- // string values
-/* 20 */ "ABCD",
- 'abcd',
- "1ABC",
- "5ABC",
-
- // objects
-/* 24 */ new sample(),
-
- // undefined variable
-/* 25 */ @$undefined_var,
-
- // unset variable
-/* 26 */ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test count_chars() function
-// with unexepcted values for the 'mode' argument
-$count = 1;
-$string = "Return information about characters used in a string";
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- // only list characters with a frequency > 0
- var_dump(is_array(count_chars($string, $input)));
- $count ++;
-}
-
-
-?>
-===DONE===
---EXPECTF--
-*** Testing count_chars() function: with unexpected inputs for 'mode' argument ***
--- Iteration 1 --
-bool(true)
--- Iteration 2 --
-bool(true)
--- Iteration 3 --
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 6 --
-bool(true)
--- Iteration 7 --
-bool(true)
--- Iteration 8 --
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: count_chars() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: count_chars() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
--- Iteration 13 --
-bool(true)
--- Iteration 14 --
-bool(true)
--- Iteration 15 --
-bool(true)
--- Iteration 16 --
-bool(true)
--- Iteration 17 --
-bool(true)
--- Iteration 18 --
-bool(true)
--- Iteration 19 --
-
-Warning: count_chars() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: count_chars() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-bool(true)
--- Iteration 22 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-
-Warning: count_chars(): Unknown mode in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: count_chars() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
--- Iteration 24 --
-bool(true)
--- Iteration 25 --
-bool(true)
-===DONE===
diff --git a/ext/standard/tests/strings/crc32_variation1.phpt b/ext/standard/tests/strings/crc32_variation1.phpt
deleted file mode 100644
index 21d3fbe0dc..0000000000
--- a/ext/standard/tests/strings/crc32_variation1.phpt
+++ /dev/null
@@ -1,196 +0,0 @@
---TEST--
-Test crc32() function : usage variations - unexpected values
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4)
- die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : string crc32(string $str)
- * Description: Calculate the crc32 polynomial of a string
- * Source code: ext/standard/crc32.c
- * Alias to functions: none
-*/
-
-/*
- * Testing crc32() : with unexpected values for str argument
-*/
-
-echo "*** Testing crc32() : with unexpected values for str argument ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for str
-
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump( crc32($value) );
- $count++;
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing crc32() : with unexpected values for str argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration 1 --
-int(-186917087)
-
--- Iteration 2 --
-int(-2082672713)
-
--- Iteration 3 --
-int(-873121252)
-
--- Iteration 4 --
-int(1860518047)
-
--- Iteration 5 --
-int(269248583)
-
--- Iteration 6 --
-int(-834950157)
-
--- Iteration 7 --
-int(-965354630)
-
--- Iteration 8 --
-int(1376932222)
-
--- Iteration 9 --
-int(-2036403827)
-
--- Iteration 10 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 15 --
-int(0)
-
--- Iteration 16 --
-int(0)
-
--- Iteration 17 --
-int(-2082672713)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(-2082672713)
-
--- Iteration 20 --
-int(0)
-
--- Iteration 21 --
-int(0)
-
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(-1465013268)
-
--- Iteration 24 --
-int(0)
-
--- Iteration 25 --
-int(0)
-
--- Iteration 26 --
-
-Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/explode_variation1.phpt b/ext/standard/tests/strings/explode_variation1.phpt
deleted file mode 100644
index 7ced1dc822..0000000000
--- a/ext/standard/tests/strings/explode_variation1.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test explode() function : usage variations - test values for $delimiter argument
---FILE--
-<?php
-
-/* Prototype : array explode ( string $delimiter , string $string [, int $limit ] )
- * Description: Split a string by string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing explode() function: with unexpected inputs for 'delimiter' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $delimiter
-$delimiters = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $delimiters array to test explode() function
-$count = 1;
-$string = "piece1 piece2 piece3 piece4 piece5 piece6";
-$limit = 5;
-foreach($delimiters as $delimiter) {
- echo "-- Iteration $count --\n";
- var_dump( explode($delimiter, $string, $limit) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing explode() function: with unexpected inputs for 'delimiter' argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- string(5) "piece"
- [1]=>
- string(35) " piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 3 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 4 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 5 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 6 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 7 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 8 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 9 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 10 --
-
-Warning: explode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: explode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: explode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-array(2) {
- [0]=>
- string(5) "piece"
- [1]=>
- string(35) " piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 14 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 15 --
-array(2) {
- [0]=>
- string(5) "piece"
- [1]=>
- string(35) " piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 16 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 19 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 20 --
-
-Warning: explode() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/explode_variation2.phpt b/ext/standard/tests/strings/explode_variation2.phpt
deleted file mode 100644
index 9377f30842..0000000000
--- a/ext/standard/tests/strings/explode_variation2.phpt
+++ /dev/null
@@ -1,195 +0,0 @@
---TEST--
-Test explode() function : usage variations - test values for $string argument
---FILE--
-<?php
-
-/* Prototype : array explode ( string $delimiter , string $string [, int $limit ] )
- * Description: Split a string by string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing explode() function: with unexpected inputs for 'string' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $string
-$strings = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $strings array to test explode() function
-$count = 1;
-$delimiter = " ";
-$limit = 5;
-foreach($strings as $string) {
- echo "-- Iteration $count --\n";
- var_dump( explode($delimiter, $string, $limit) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing explode() function: with unexpected inputs for 'string' argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 3 --
-array(1) {
- [0]=>
- string(3) "255"
-}
--- Iteration 4 --
-array(1) {
- [0]=>
- string(3) "256"
-}
--- Iteration 5 --
-array(1) {
- [0]=>
- string(10) "2147483647"
-}
--- Iteration 6 --
-array(1) {
- [0]=>
- string(11) "-2147483648"
-}
--- Iteration 7 --
-array(1) {
- [0]=>
- string(4) "10.5"
-}
--- Iteration 8 --
-array(1) {
- [0]=>
- string(5) "-20.5"
-}
--- Iteration 9 --
-array(1) {
- [0]=>
- string(12) "101234567000"
-}
--- Iteration 10 --
-
-Warning: explode() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: explode() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: explode() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 14 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 15 --
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 16 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 17 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 18 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 19 --
-array(2) {
- [0]=>
- string(6) "sample"
- [1]=>
- string(6) "object"
-}
--- Iteration 20 --
-
-Warning: explode() expects parameter 2 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 22 --
-array(1) {
- [0]=>
- string(0) ""
-}
-===DONE===
diff --git a/ext/standard/tests/strings/explode_variation3.phpt b/ext/standard/tests/strings/explode_variation3.phpt
deleted file mode 100644
index 34c1cdffc3..0000000000
--- a/ext/standard/tests/strings/explode_variation3.phpt
+++ /dev/null
@@ -1,238 +0,0 @@
---TEST--
-Test explode() function : usage variations - test values for $limit argument
---FILE--
-<?php
-
-/* Prototype : array explode ( string $delimiter , string $string [, int $limit ] )
- * Description: Split a string by string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing explode() function: with unexpected inputs for 'limit' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $delimiter
-$limits = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $limits array to test explode() function
-$count = 1;
-$delimiter = " ";
-$string = "piece1 piece2 piece3 piece4 piece5 piece6";
-foreach($limits as $limit) {
- echo "-- Iteration $count --\n";
- var_dump( explode($delimiter, $string, $limit) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===Done===
---EXPECTF--
-*** Testing explode() function: with unexpected inputs for 'limit' argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 3 --
-array(6) {
- [0]=>
- string(6) "piece1"
- [1]=>
- string(6) "piece2"
- [2]=>
- string(6) "piece3"
- [3]=>
- string(6) "piece4"
- [4]=>
- string(6) "piece5"
- [5]=>
- string(6) "piece6"
-}
--- Iteration 4 --
-array(6) {
- [0]=>
- string(6) "piece1"
- [1]=>
- string(6) "piece2"
- [2]=>
- string(6) "piece3"
- [3]=>
- string(6) "piece4"
- [4]=>
- string(6) "piece5"
- [5]=>
- string(6) "piece6"
-}
--- Iteration 5 --
-array(6) {
- [0]=>
- string(6) "piece1"
- [1]=>
- string(6) "piece2"
- [2]=>
- string(6) "piece3"
- [3]=>
- string(6) "piece4"
- [4]=>
- string(6) "piece5"
- [5]=>
- string(6) "piece6"
-}
--- Iteration 6 --
-array(0) {
-}
--- Iteration 7 --
-array(6) {
- [0]=>
- string(6) "piece1"
- [1]=>
- string(6) "piece2"
- [2]=>
- string(6) "piece3"
- [3]=>
- string(6) "piece4"
- [4]=>
- string(6) "piece5"
- [5]=>
- string(6) "piece6"
-}
--- Iteration 8 --
-array(0) {
-}
--- Iteration 9 --
-array(6) {
- [0]=>
- string(6) "piece1"
- [1]=>
- string(6) "piece2"
- [2]=>
- string(6) "piece3"
- [3]=>
- string(6) "piece4"
- [4]=>
- string(6) "piece5"
- [5]=>
- string(6) "piece6"
-}
--- Iteration 10 --
-
-Warning: explode() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: explode() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: explode() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 13 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 14 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 15 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 16 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 17 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 18 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 19 --
-
-Warning: explode() expects parameter 3 to be int, object given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: explode() expects parameter 3 to be int, resource given in %s on line %d
-NULL
--- Iteration 21 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
--- Iteration 22 --
-array(1) {
- [0]=>
- string(41) "piece1 piece2 piece3 piece4 piece5 piece6"
-}
-===Done===
diff --git a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt b/ext/standard/tests/strings/get_html_translation_table_variation1.phpt
deleted file mode 100644
index 0794853e8e..0000000000
--- a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt
+++ /dev/null
@@ -1,316 +0,0 @@
---TEST--
-Test get_html_translation_table() function : usage variations - unexpected table values
---FILE--
-<?php
-/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] )
- * Description: Returns the internal translation table used by htmlspecialchars and htmlentities
- * Source code: ext/standard/html.c
-*/
-
-/*
- * test get_html_translation_table() with unexpected value for argument $table
-*/
-
-echo "*** Testing get_html_translation_table() : usage variations ***\n";
-// initialize all required variables
-$quote_style = ENT_COMPAT;
-
-// get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-// a resource variable
-$fp = fopen(__FILE__, "r");
-
-// array with different values
-$values = array (
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // string values
- "string",
- 'string',
-
- // objects
- new stdclass(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // resource var
- $fp,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-
-// loop through each element of the array and check the working of get_html_translation_table()
-// when $table argument is supplied with different values
-echo "\n--- Testing get_html_translation_table() by supplying different values for 'table' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $table = $values [$index];
-
- $v = get_html_translation_table($table, ENT_COMPAT, "UTF-8");
- if (is_array($v) && count($v) > 100)
- var_dump(count($v));
- elseif (is_array($v)) {
- asort($v);
- var_dump($v);
- } else {
- var_dump($v);
- }
-
- $v = get_html_translation_table($table, $quote_style, "UTF-8");
- if (is_array($v) && count($v) > 100)
- var_dump(count($v));
- elseif (is_array($v)) {
- asort($v);
- var_dump($v);
- } else {
- var_dump($v);
- }
-
- $counter ++;
-}
-
-// close resource
-fclose($fp);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing get_html_translation_table() : usage variations ***
-
---- Testing get_html_translation_table() by supplying different values for 'table' argument ---
--- Iteration 1 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d
-NULL
--- Iteration 6 --
-int(252)
-int(252)
--- Iteration 7 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
--- Iteration 8 --
-int(252)
-int(252)
--- Iteration 9 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
--- Iteration 10 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, object given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d
-NULL
--- Iteration 15 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
--- Iteration 16 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
--- Iteration 17 --
-
-Warning: get_html_translation_table() expects parameter 1 to be int, resource given in %s on line %d
-NULL
-
-Warning: get_html_translation_table() expects parameter 1 to be int, resource given in %s on line %d
-NULL
--- Iteration 18 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
--- Iteration 19 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- [">"]=>
- string(4) "&gt;"
- ["<"]=>
- string(4) "&lt;"
- ["""]=>
- string(6) "&quot;"
-}
-Done
diff --git a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt b/ext/standard/tests/strings/get_html_translation_table_variation2.phpt
deleted file mode 100644
index 8d9fe0af56..0000000000
--- a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt
+++ /dev/null
@@ -1,209 +0,0 @@
---TEST--
-Test get_html_translation_table() function : usage variations - unexpected quote_style values
---FILE--
-<?php
-/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] )
- * Description: Returns the internal translation table used by htmlspecialchars and htmlentities
- * Source code: ext/standard/html.c
-*/
-
-/*
- * test get_html_translation_table() with unexpteced value for argument $quote_style
-*/
-
-//set locale to en_US.UTF-8
-setlocale(LC_ALL, "en_US.UTF-8");
-
-echo "*** Testing get_html_translation_table() : usage variations ***\n";
-// initialize all required variables
-$table = HTML_SPECIALCHARS;
-
-// get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-// a resource var
-$fp = fopen(__FILE__, "r");
-
-// array with different values
-$values = array (
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // string values
- "string",
- 'string',
-
- // objects
- new stdclass(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // resource var
- $fp,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-
-// loop through each element of the array and check the working of get_html_translation_table()
-// when $quote_style argument is supplied with different values
-echo "\n--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $quote_style = $values [$index];
-
- var_dump( get_html_translation_table($table, $quote_style) );
-
- $counter ++;
-}
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing get_html_translation_table() : usage variations ***
-
---- Testing get_html_translation_table() by supplying different values for 'quote_style' argument ---
--- Iteration 1 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 6 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- ["'"]=>
- string(6) "&#039;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 7 --
-array(3) {
- ["&"]=>
- string(5) "&amp;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 8 --
-array(4) {
- ["&"]=>
- string(5) "&amp;"
- ["'"]=>
- string(6) "&#039;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 9 --
-array(3) {
- ["&"]=>
- string(5) "&amp;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 10 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 15 --
-array(3) {
- ["&"]=>
- string(5) "&amp;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 16 --
-array(3) {
- ["&"]=>
- string(5) "&amp;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 17 --
-
-Warning: get_html_translation_table() expects parameter 2 to be int, resource given in %s on line %d
-NULL
--- Iteration 18 --
-array(3) {
- ["&"]=>
- string(5) "&amp;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
--- Iteration 19 --
-array(3) {
- ["&"]=>
- string(5) "&amp;"
- ["<"]=>
- string(4) "&lt;"
- [">"]=>
- string(4) "&gt;"
-}
-Done
diff --git a/ext/standard/tests/strings/hebrev_variation1.phpt b/ext/standard/tests/strings/hebrev_variation1.phpt
deleted file mode 100644
index 33fd974eb7..0000000000
--- a/ext/standard/tests/strings/hebrev_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test hebrev() function : usage variations - test values for $hebrew_text argument
---FILE--
-<?php
-
-/* Prototype : string hebrev ( string $hebrew_text [, int $max_chars_per_line ] )
- * Description: Convert logical Hebrew text to visual text
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing hebrev() function: with unexpected inputs for 'hebrew_text' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $hebrew_text
-$texts = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var,
-
- // text with parentheses
- 'text with parentheses (',
- 'text with parentheses )',
-
- // text with brackets
- 'text with bracket [',
- 'text with bracket ]',
-
- // text with curly brackets
- 'text with curly bracket {',
- 'text with curly bracket }',
-
- // text with backslash escape
- 'text with backslash escape \\',
-
- // text with a slash char
- 'text with a slash char /',
-
- // text with a greater than char
- 'text with a greater than char >',
-
- // text with a less than char
- 'text with a less than char <'
-);
-
-// loop through with each element of the $texts array to test hebrev() function
-$count = 1;
-
-foreach($texts as $hebrew_text) {
- echo "-- Iteration $count --\n";
- var_dump( hebrev($hebrew_text) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing hebrev() function: with unexpected inputs for 'hebrew_text' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(3) "255"
--- Iteration 4 --
-string(3) "256"
--- Iteration 5 --
-string(10) "2147483647"
--- Iteration 6 --
-string(11) "-2147483648"
--- Iteration 7 --
-string(4) "10.5"
--- Iteration 8 --
-string(5) "-20.5"
--- Iteration 9 --
-string(10) "1012345.67"
--- Iteration 10 --
-
-Warning: hebrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: hebrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: hebrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(1) "1"
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-string(13) "sample object"
--- Iteration 20 --
-
-Warning: hebrev() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
--- Iteration 23 --
-string(23) ") text with parentheses"
--- Iteration 24 --
-string(23) "( text with parentheses"
--- Iteration 25 --
-string(19) "] text with bracket"
--- Iteration 26 --
-string(19) "[ text with bracket"
--- Iteration 27 --
-string(25) "} text with curly bracket"
--- Iteration 28 --
-string(25) "{ text with curly bracket"
--- Iteration 29 --
-string(28) "/ text with backslash escape"
--- Iteration 30 --
-string(24) "text with a slash char /"
--- Iteration 31 --
-string(31) "< text with a greater than char"
--- Iteration 32 --
-string(28) "> text with a less than char"
-===DONE===
diff --git a/ext/standard/tests/strings/hebrev_variation2.phpt b/ext/standard/tests/strings/hebrev_variation2.phpt
deleted file mode 100644
index f312472c82..0000000000
--- a/ext/standard/tests/strings/hebrev_variation2.phpt
+++ /dev/null
@@ -1,283 +0,0 @@
---TEST--
-Test hebrev() function : usage variations - test values for $max_chars_per_line argument
---FILE--
-<?php
-
-/* Prototype : string hebrev ( string $hebrew_text [, int $max_chars_per_line ] )
- * Description: Convert logical Hebrew text to visual text
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing hebrev() function: with unexpected inputs for 'max_chars_per_line' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $max_chars_per_line
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // string values
-/*19*/ "abc",
- 'abc',
- "3abc",
- "0abc",
- "0x3",
-
- // objects
-/*24*/ new sample(),
-
- // resource
-/*25*/ $file_handle,
-
- // undefined variable
-/*26*/ @$undefined_var,
-
- // unset variable
-/*27*/ @$unset_var
-);
-
-// loop through with each element of the $texts array to test hebrev() function
-$count = 1;
-
-$hebrew_text = "The hebrev function converts logical Hebrew text to visual text.\nThe function tries to avoid breaking words.\n";
-
-foreach($inputs as $max_chars_per_line) {
- echo "-- Iteration $count --\n";
- var_dump( hebrev($hebrew_text, $max_chars_per_line) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing hebrev() function: with unexpected inputs for 'max_chars_per_line' argument ***
--- Iteration 1 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 2 --
-string(109) "xttel uaisv
-tot ext
-ewbrHel cagilos rtveonc
-ontincfuv reebh
-he.Ts
-rdwog inakreb
-idvoa
-tos ietrn ioctunf
-he.T
-"
--- Iteration 3 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 4 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 5 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 6 --
-string(109) "txet
-lausiv
-ot
-txet
-werbeH
-lacigol
-strevnoc
-noitcnuf
-verbeh
-ehT.
-sdrow
-gnikaerb
-diova
-ot
-seirt
-noitcnuf
-ehT.
-"
--- Iteration 7 --
-string(109) "text
-to visual
-text
-Hebrew
-logical
-converts
-function
-hebrev
-.The
-words
-breaking
-to avoid
-tries
-function
-.The
-"
--- Iteration 8 --
-string(109) "txet
-lausiv
-ot
-txet
-werbeH
-lacigol
-strevnoc
-noitcnuf
-verbeh
-ehT.
-sdrow
-gnikaerb
-diova
-ot
-seirt
-noitcnuf
-ehT.
-"
--- Iteration 9 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 10 --
-
-Warning: hebrev() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: hebrev() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: hebrev() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(109) "xttel uaisv
-tot ext
-ewbrHel cagilos rtveonc
-ontincfuv reebh
-he.Ts
-rdwog inakreb
-idvoa
-tos ietrn ioctunf
-he.T
-"
--- Iteration 14 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 15 --
-string(109) "xttel uaisv
-tot ext
-ewbrHel cagilos rtveonc
-ontincfuv reebh
-he.Ts
-rdwog inakreb
-idvoa
-tos ietrn ioctunf
-he.T
-"
--- Iteration 16 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 17 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 18 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 19 --
-
-Warning: hebrev() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: hebrev() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(109) "textual vis
-to
-textrew Heb
-icallog
-ertsconvion unctf
-brevhe
-.Therds
-wo
-kingbreaoid av
-to
-riest
-tionfuncThe .
-"
--- Iteration 22 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 23 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 24 --
-
-Warning: hebrev() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: hebrev() expects parameter 2 to be int, resource given in %s on line %d
-NULL
--- Iteration 26 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
--- Iteration 27 --
-string(109) ".The hebrev function converts logical Hebrew text to visual text
-.The function tries to avoid breaking words
-"
-===DONE===
diff --git a/ext/standard/tests/strings/hebrevc_variation1.phpt b/ext/standard/tests/strings/hebrevc_variation1.phpt
deleted file mode 100644
index c16780e769..0000000000
--- a/ext/standard/tests/strings/hebrevc_variation1.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test hebrevc() function : usage variations - test values for $hebrew_text argument
---FILE--
-<?php
-
-/* Prototype : string hebrevc ( string $hebrew_text [, int $max_chars_per_line ] )
- * Description: Convert logical Hebrew text to visual text
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing hebrevc() function: with unexpected inputs for 'hebrew_text' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $hebrew_text
-$texts = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $texts array to test hebrevc() function
-$count = 1;
-
-foreach($texts as $hebrew_text) {
- echo "-- Iteration $count --\n";
- var_dump( hebrevc($hebrew_text) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing hebrevc() function: with unexpected inputs for 'hebrew_text' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(3) "255"
--- Iteration 4 --
-string(3) "256"
--- Iteration 5 --
-string(10) "2147483647"
--- Iteration 6 --
-string(11) "-2147483648"
--- Iteration 7 --
-string(4) "10.5"
--- Iteration 8 --
-string(5) "-20.5"
--- Iteration 9 --
-string(10) "1012345.67"
--- Iteration 10 --
-
-Warning: hebrevc() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: hebrevc() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: hebrevc() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(1) "1"
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-string(13) "sample object"
--- Iteration 20 --
-
-Warning: hebrevc() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/hebrevc_variation2.phpt b/ext/standard/tests/strings/hebrevc_variation2.phpt
deleted file mode 100644
index 334d128989..0000000000
--- a/ext/standard/tests/strings/hebrevc_variation2.phpt
+++ /dev/null
@@ -1,414 +0,0 @@
---TEST--
-Test hebrevc() function : usage variations - test values for $max_chars_per_line argument
---FILE--
-<?php
-
-/* Prototype : string hebrevc ( string $hebrew_text [, int $max_chars_per_line ] )
- * Description: Convert logical Hebrew text to visual text
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing hebrevc() function: with unexpected inputs for 'max_chars_per_line' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $max_chars_per_line
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // string values
-/*19*/ "abc",
- 'abc',
- "3abc",
- "0abc",
- "0x3",
-
- // objects
-/*24*/ new sample(),
-
- // resource
-/*25*/ $file_handle,
-
- // undefined variable
-/*26*/ @$undefined_var,
-
- // unset variable
-/*27*/ @$unset_var
-);
-
-// loop through with each element of the $texts array to test hebrevc() function
-$count = 1;
-
-$hebrew_text = "The hebrevcc function converts logical Hebrew text to visual text.\nThis function is similar to hebrevc() with the difference that it converts newlines (\n) to '<br>\n'.\nThe function tries to avoid breaking words.\n";
-
-foreach($inputs as $max_chars_per_line) {
- echo "-- Iteration $count --\n";
- var_dump( hebrevc($hebrew_text, $max_chars_per_line) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing hebrevc() function: with unexpected inputs for 'max_chars_per_line' argument ***
--- Iteration 1 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 2 --
-string(331) "xttel uaisv<br />
-tot ext<br />
-ewbrHel cagilos rtveonc<br />
-ontincfuc vcreebh<br />
-he.Ts<br />
-neliewn<br />
-tsernvcot i<br />
-atthe ncrefeifd<br />
-het<br />
-thwi) c(evbrheo t<br />
-arilims<br />
-isn ioctunf<br />
-isTh) (<br />
-r <b'<br />
-to<<br />
-.'s<br />
-rdwog inakreb<br />
-idvoa<br />
-tos ietrn ioctunf<br />
-he.T<br />
-"
--- Iteration 3 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 4 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 5 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 6 --
-string(421) "txet<br />
-lausiv<br />
-ot<br />
-txet<br />
-werbeH<br />
-lacigol<br />
-strevnoc<br />
-noitcnuf<br />
-ccverbeh<br />
-ehT.<br />
-senilwen<br />
-strevnoc<br />
-ti<br />
-taht<br />
-ecnereffid<br />
-eht<br />
-htiw<br />
-)(cverbeh<br />
-ot<br />
-ralimis<br />
-si<br />
-noitcnuf<br />
-sihT<br />
-)<br />
-(<br />
-rb<'<br />
-ot<<br />
-'.<br />
-sdrow<br />
-gnikaerb<br />
-diova<br />
-ot<br />
-seirt<br />
-noitcnuf<br />
-ehT.<br />
-"
--- Iteration 7 --
-string(373) "text<br />
-to visual<br />
-text<br />
-Hebrew<br />
-logical<br />
-converts<br />
-function<br />
-hebrevcc<br />
-.The<br />
-newlines<br />
-converts<br />
-that it<br />
-difference<br />
-with the<br />
-hebrevc()<br />
-similar to<br />
-is<br />
-function<br />
-) This<br />
-<to '<br (<br />
-.'<br />
-words<br />
-breaking<br />
-to avoid<br />
-tries<br />
-function<br />
-.The<br />
-"
--- Iteration 8 --
-string(421) "txet<br />
-lausiv<br />
-ot<br />
-txet<br />
-werbeH<br />
-lacigol<br />
-strevnoc<br />
-noitcnuf<br />
-ccverbeh<br />
-ehT.<br />
-senilwen<br />
-strevnoc<br />
-ti<br />
-taht<br />
-ecnereffid<br />
-eht<br />
-htiw<br />
-)(cverbeh<br />
-ot<br />
-ralimis<br />
-si<br />
-noitcnuf<br />
-sihT<br />
-)<br />
-(<br />
-rb<'<br />
-ot<<br />
-'.<br />
-sdrow<br />
-gnikaerb<br />
-diova<br />
-ot<br />
-seirt<br />
-noitcnuf<br />
-ehT.<br />
-"
--- Iteration 9 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 10 --
-
-Warning: hebrevc() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: hebrevc() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: hebrevc() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(331) "xttel uaisv<br />
-tot ext<br />
-ewbrHel cagilos rtveonc<br />
-ontincfuc vcreebh<br />
-he.Ts<br />
-neliewn<br />
-tsernvcot i<br />
-atthe ncrefeifd<br />
-het<br />
-thwi) c(evbrheo t<br />
-arilims<br />
-isn ioctunf<br />
-isTh) (<br />
-r <b'<br />
-to<<br />
-.'s<br />
-rdwog inakreb<br />
-idvoa<br />
-tos ietrn ioctunf<br />
-he.T<br />
-"
--- Iteration 14 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 15 --
-string(331) "xttel uaisv<br />
-tot ext<br />
-ewbrHel cagilos rtveonc<br />
-ontincfuc vcreebh<br />
-he.Ts<br />
-neliewn<br />
-tsernvcot i<br />
-atthe ncrefeifd<br />
-het<br />
-thwi) c(evbrheo t<br />
-arilims<br />
-isn ioctunf<br />
-isTh) (<br />
-r <b'<br />
-to<<br />
-.'s<br />
-rdwog inakreb<br />
-idvoa<br />
-tos ietrn ioctunf<br />
-he.T<br />
-"
--- Iteration 16 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 17 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 18 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 19 --
-
-Warning: hebrevc() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: hebrevc() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(349) "textual vis<br />
-to<br />
-textrew Heb<br />
-icallog<br />
-ertsconvion unctf<br />
-evcchebrThe .<br />
-inesnewlrts onvec<br />
-it<br />
-thatnce feredif<br />
-the<br />
-withc() brevhe<br />
-to<br />
-ilarsim<br />
-is<br />
-tionfunchis ) T<br />
-(<br />
-'<br<to .'<br />
-<br />
-ordsw<br />
-kingbreaoid av<br />
-to<br />
-riest<br />
-tionfuncThe .<br />
-"
--- Iteration 22 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 23 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 24 --
-
-Warning: hebrevc() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: hebrevc() expects parameter 2 to be int, resource given in %s on line %d
-NULL
--- Iteration 26 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
--- Iteration 27 --
-string(241) ".The hebrevcc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrevc() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
-===DONE===
diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt
deleted file mode 100644
index 35719186e4..0000000000
--- a/ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt
+++ /dev/null
@@ -1,161 +0,0 @@
---TEST--
-Test htmlspecialchars_decode() function : usage variations - unexpected values for 'string' argument
---FILE--
-<?php
-/* Prototype : string htmlspecialchars_decode(string $string [, int $quote_style])
- * Description: Convert special HTML entities back to characters
- * Source code: ext/standard/html.c
-*/
-
-/*
- * testing htmlspecialchars_decode() with unexpected input values for $string argument
-*/
-
-echo "*** Testing htmlspecialchars_decode() : usage variations ***\n";
-
-//get a class
-class classA
-{
- function __toString() {
- return "ClassAObject";
- }
-}
-
-//get a resource variable
-$file_handle=fopen(__FILE__, "r");
-
-//get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- //resource
- $file_handle
-);
-
-// loop through each element of the array for string
-$iterator = 1;
-foreach($values as $value) {
- echo "-- Iterator $iterator --\n";
- var_dump( htmlspecialchars_decode($value) );
- $iterator++;
-};
-
-// close the file resource used
-fclose($file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing htmlspecialchars_decode() : usage variations ***
--- Iterator 1 --
-string(1) "0"
--- Iterator 2 --
-string(1) "1"
--- Iterator 3 --
-string(5) "12345"
--- Iterator 4 --
-string(5) "-2345"
--- Iterator 5 --
-string(4) "10.5"
--- Iterator 6 --
-string(5) "-10.5"
--- Iterator 7 --
-string(12) "101234567000"
--- Iterator 8 --
-string(13) "1.07654321E-9"
--- Iterator 9 --
-string(3) "0.5"
--- Iterator 10 --
-
-Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iterator 11 --
-
-Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iterator 12 --
-
-Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iterator 13 --
-
-Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iterator 14 --
-
-Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iterator 15 --
-string(0) ""
--- Iterator 16 --
-string(0) ""
--- Iterator 17 --
-string(1) "1"
--- Iterator 18 --
-string(0) ""
--- Iterator 19 --
-string(1) "1"
--- Iterator 20 --
-string(0) ""
--- Iterator 21 --
-string(0) ""
--- Iterator 22 --
-string(0) ""
--- Iterator 23 --
-string(12) "ClassAObject"
--- Iterator 24 --
-string(0) ""
--- Iterator 25 --
-string(0) ""
--- Iterator 26 --
-
-Warning: htmlspecialchars_decode() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-===DONE===
-
diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
deleted file mode 100644
index 4a8f165e9c..0000000000
--- a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test htmlspecialchars_decode() function : usage variations - unexpected values for 'quote_style' argument
---FILE--
-<?php
-/* Prototype : string htmlspecialchars_decode(string $string [, int $quote_style])
- * Description: Convert special HTML entities back to characters
- * Source code: ext/standard/html.c
-*/
-
-/*
- * testing htmlspecialchars_decode() by giving unexpected input values for $quote_style argument
-*/
-
-echo "*** Testing htmlspecialchars_decode() : usage variations ***\n";
-
-// Initialise function arguments
-// value initialized = Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "
-$string = "<html>Roy&#039;s height &gt; Sam&#039;s height. 13 &lt; 15. 1111 &amp; 0000 = 0000. &quot; double quote string &quot;</html>";
-
-//get a class
-class classA {
- function __toString() {
- return "Class A Object";
- }
-}
-
-//get a resource variable
-$file_handle = fopen(__FILE__, "r");
-
-//get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.5e20,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- //resource
- $file_handle
-);
-
-// loop through each element of the array for quote_style
-$iterator = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( htmlspecialchars_decode($string, $value) );
- $iterator++;
-}
-
-// close the file resource used
-fclose($file_handle);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing htmlspecialchars_decode() : usage variations ***
-
--- Iteration 1 --
-string(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-
--- Iteration 2 --
-string(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-
--- Iteration 3 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, float given in %s on line %d
-NULL
-
--- Iteration 4 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 5 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 6 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 11 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 12 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 13 --
-string(104) "<html>Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 14 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 15 --
-string(104) "<html>Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 16 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 17 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, object given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-
--- Iteration 22 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 23 --
-string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
-
--- Iteration 24 --
-
-Warning: htmlspecialchars_decode() expects parameter 2 to be int, resource given in %shtmlspecialchars_decode_variation2.php on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/ltrim_variation1.phpt b/ext/standard/tests/strings/ltrim_variation1.phpt
deleted file mode 100644
index f476b9b793..0000000000
--- a/ext/standard/tests/strings/ltrim_variation1.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test ltrim() function : usage variations - test values for $str argument
---FILE--
-<?php
-
-/* Prototype : string ltrim ( string $str [, string $charlist ] )
- * Description: Strip whitespace (or other characters) from the beginning of a string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing ltrim() function: with unexpected inputs for 'str' argument ***\n";
-
-//get an unset variable
-$unset_var = ' string_val ';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return " sample object ";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test ltrim() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- // strip white space and any "minus" signs
- var_dump( ltrim($input, " \t-") );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing ltrim() function: with unexpected inputs for 'str' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(3) "255"
--- Iteration 4 --
-string(3) "256"
--- Iteration 5 --
-string(10) "2147483647"
--- Iteration 6 --
-string(10) "2147483648"
--- Iteration 7 --
-string(4) "10.5"
--- Iteration 8 --
-string(4) "20.5"
--- Iteration 9 --
-string(12) "101234567000"
--- Iteration 10 --
-
-Warning: ltrim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: ltrim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: ltrim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(1) "1"
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(0) ""
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(15) "sample object "
--- Iteration 20 --
-
-Warning: ltrim() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/ltrim_variation2.phpt b/ext/standard/tests/strings/ltrim_variation2.phpt
deleted file mode 100644
index 5dc260e8a1..0000000000
--- a/ext/standard/tests/strings/ltrim_variation2.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test ltrim() function : usage variations - test values for $charlist argument
---FILE--
-<?php
-
-/* Prototype : string ltrim ( string $str [, string $charlist ] )
- * Description: Strip whitespace (or other characters) from the beginning of a string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing ltrim() function: with unexpected inputs for 'charlist' argument ***\n";
-
-//get an unset variable
-$unset_var = ' string_val ';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return " sample object ";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test ltrim() function
-$count = 1;
-foreach($inputs as $charlist) {
- echo "-- Iteration $count --\n";
- // strip white space and any "minus" signs
- var_dump( ltrim("!---Hello World---!", $charlist) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing ltrim() function: with unexpected inputs for 'charlist' argument ***
--- Iteration 1 --
-string(19) "!---Hello World---!"
--- Iteration 2 --
-string(19) "!---Hello World---!"
--- Iteration 3 --
-string(19) "!---Hello World---!"
--- Iteration 4 --
-string(19) "!---Hello World---!"
--- Iteration 5 --
-string(19) "!---Hello World---!"
--- Iteration 6 --
-string(19) "!---Hello World---!"
--- Iteration 7 --
-string(19) "!---Hello World---!"
--- Iteration 8 --
-string(19) "!---Hello World---!"
--- Iteration 9 --
-string(19) "!---Hello World---!"
--- Iteration 10 --
-
-Warning: ltrim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: ltrim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: ltrim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(19) "!---Hello World---!"
--- Iteration 14 --
-string(19) "!---Hello World---!"
--- Iteration 15 --
-string(19) "!---Hello World---!"
--- Iteration 16 --
-string(19) "!---Hello World---!"
--- Iteration 17 --
-string(19) "!---Hello World---!"
--- Iteration 18 --
-string(19) "!---Hello World---!"
--- Iteration 19 --
-string(19) "!---Hello World---!"
--- Iteration 20 --
-
-Warning: ltrim() expects parameter 2 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(19) "!---Hello World---!"
--- Iteration 22 --
-string(19) "!---Hello World---!"
-===DONE===
diff --git a/ext/standard/tests/strings/money_format_variation1.phpt b/ext/standard/tests/strings/money_format_variation1.phpt
deleted file mode 100644
index 4a381c183a..0000000000
--- a/ext/standard/tests/strings/money_format_variation1.phpt
+++ /dev/null
@@ -1,172 +0,0 @@
---TEST--
-Test money_format() function : usage variations - test values for $format argument
---SKIPIF--
-<?php
- if (!function_exists('money_format')) {
- die("SKIP money_format - not supported\n");
- }
-?>
---FILE--
-<?php
-/* Prototype : string money_format ( string $format , float $number )
- * Description: Formats a number as a currency string
- * Source code: ext/standard/string.c
-*/
-
-// ===========================================================================================
-// = We do not test for exact return-values, as those might be different between OS-versions =
-// ===========================================================================================
-
-echo "*** Testing money_format() function: with unexpected inputs for 'format' argument ***\n";
-
-//get an unset variable
-$unset_var = ' string_val ';
-unset($unset_var);
-
-//defining a couple of sample classes
-class class_no_tostring {
-}
-
-class class_with_tostring {
- public function __toString() {
- return " sample object ";
- }
-}
-
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$formats = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // string values
-/*19*/ "abcd",
- 'abcd',
- "0x12f",
- "%=*!14#8.2nabcd",
-
- // objects
-/*23*/ new class_no_tostring(),
- new class_with_tostring(),
-
- // resource
-/*25*/ $file_handle,
-
- // undefined variable
-/*26*/ @$undefined_var,
-
- // unset variable
-/*27*/ @$unset_var
-);
-
-// loop through with each element of the $formats array to test money_format() function
-$count = 1;
-$value = 1234.56;
-
-foreach($formats as $format) {
- echo "-- Iteration $count --\n";
- echo gettype(money_format($format, $value))."\n";
- $count ++;
-}
-
-// close the file handle
-fclose($file_handle);
-
-?>
-===Done===
---EXPECTF--
-*** Testing money_format() function: with unexpected inputs for 'format' argument ***
--- Iteration 1 --
-string
--- Iteration 2 --
-string
--- Iteration 3 --
-string
--- Iteration 4 --
-string
--- Iteration 5 --
-string
--- Iteration 6 --
-string
--- Iteration 7 --
-string
--- Iteration 8 --
-string
--- Iteration 9 --
-string
--- Iteration 10 --
-
-Warning: money_format() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: money_format() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: money_format() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string
--- Iteration 14 --
-string
--- Iteration 15 --
-string
--- Iteration 16 --
-string
--- Iteration 17 --
-string
--- Iteration 18 --
-string
--- Iteration 19 --
-string
--- Iteration 20 --
-string
--- Iteration 21 --
-string
--- Iteration 22 --
-string
--- Iteration 23 --
-
-Warning: money_format() expects parameter 1 to be string, object given in %s on line %d
-NULL
--- Iteration 24 --
-string
--- Iteration 25 --
-
-Warning: money_format() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 26 --
-string
--- Iteration 27 --
-string
-===Done===
diff --git a/ext/standard/tests/strings/money_format_variation2.phpt b/ext/standard/tests/strings/money_format_variation2.phpt
deleted file mode 100644
index c8de58bded..0000000000
--- a/ext/standard/tests/strings/money_format_variation2.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test money_format() function : usage variations - test values for $number argument
---SKIPIF--
-<?php
- if (!function_exists('money_format')) {
- die("SKIP money_format - not supported\n");
- }
-?>
---FILE--
-<?php
-/* Prototype : string money_format ( string $format , float $number )
- * Description: Formats a number as a currency string
- * Source code: ext/standard/string.c
-*/
-
-// ===========================================================================================
-// = We do not test for exact return-values, as those might be different between OS-versions =
-// ===========================================================================================
-
-echo "*** Testing money_format() function: with unexpected inputs for 'number' argument ***\n";
-
-//get an unset variable
-$unset_var = ' string_val ';
-unset($unset_var);
-
-//defining a couple of sample classes
-class class_no_tostring {
-}
-
-class class_with_tostring {
- public function __toString() {
- return " sample object ";
- }
-}
-
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $number
-$numbers = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // string values
-/*19*/ "abcd",
- 'abcd',
- "0x12f",
- "%=*!14#8.2nabcd",
-
- // objects
-/*23*/ new class_no_tostring(),
- new class_with_tostring(),
-
- // resource
-/*25*/ $file_handle,
-
- // undefined variable
-/*26*/ @$undefined_var,
-
- // unset variable
-/*27*/ @$unset_var
-);
-
-// loop through with each element of the $numbers array to test money_format() function
-$count = 1;
-$format = '%14#8.2i';
-
-foreach($numbers as $number) {
- echo "-- Iteration $count --\n";
- echo gettype(money_format($format, $number))."\n";
- $count ++;
-}
-
-// close the file handle
-fclose($file_handle);
-
-?>
-===Done===
---EXPECTF--
-*** Testing money_format() function: with unexpected inputs for 'number' argument ***
--- Iteration 1 --
-string
--- Iteration 2 --
-string
--- Iteration 3 --
-string
--- Iteration 4 --
-string
--- Iteration 5 --
-string
--- Iteration 6 --
-string
--- Iteration 7 --
-string
--- Iteration 8 --
-string
--- Iteration 9 --
-string
--- Iteration 10 --
-
-Warning: money_format() expects parameter 2 to be float, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: money_format() expects parameter 2 to be float, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: money_format() expects parameter 2 to be float, array given in %s on line %d
-NULL
--- Iteration 13 --
-string
--- Iteration 14 --
-string
--- Iteration 15 --
-string
--- Iteration 16 --
-string
--- Iteration 17 --
-string
--- Iteration 18 --
-string
--- Iteration 19 --
-
-Warning: money_format() expects parameter 2 to be float, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: money_format() expects parameter 2 to be float, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string
--- Iteration 22 --
-
-Warning: money_format() expects parameter 2 to be float, string given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: money_format() expects parameter 2 to be float, object given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: money_format() expects parameter 2 to be float, object given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: money_format() expects parameter 2 to be float, resource given in %s on line %d
-NULL
--- Iteration 26 --
-string
--- Iteration 27 --
-string
-===Done===
diff --git a/ext/standard/tests/strings/nl2br_variation5.phpt b/ext/standard/tests/strings/nl2br_variation5.phpt
deleted file mode 100644
index 06a70cbc41..0000000000
--- a/ext/standard/tests/strings/nl2br_variation5.phpt
+++ /dev/null
@@ -1,152 +0,0 @@
---TEST--
-Test nl2br() function : usage variations - unexpected values for 'str' argument
---FILE--
-<?php
-/* Prototype : string nl2br(string $str)
- * Description: Inserts HTML line breaks before all newlines in a string.
- * Source code: ext/standard/string.c
-*/
-
-/*
-* Test nl2br() function by passing different types of values other than
-* expected type for 'str' argument
-*/
-
-echo "*** Testing nl2br() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//getting resource
-$file_handle = fopen(__FILE__, "r");
-
-//defining class
-class Sample {
- public function __toString() {
- return "My String";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- //resource
- $file_handle,
-
- // object data
- new Sample(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-);
-
-// loop through $values array to test nl2br() function with each element
-$count = 1;
-foreach($values as $value) {
- echo "-- Iteration $count --\n";
- var_dump( nl2br($value) );
- $count ++ ;
-};
-
-//closing the file handle
-fclose( $file_handle );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing nl2br() : usage variations ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "105000000000"
--- Iteration 8 --
-string(7) "1.06E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(0) ""
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(1) "1"
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-
-Warning: nl2br() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 22 --
-string(9) "My String"
--- Iteration 23 --
-string(0) ""
--- Iteration 24 --
-string(0) ""
-Done
diff --git a/ext/standard/tests/strings/ord_variation1.phpt b/ext/standard/tests/strings/ord_variation1.phpt
deleted file mode 100644
index ffca230dba..0000000000
--- a/ext/standard/tests/strings/ord_variation1.phpt
+++ /dev/null
@@ -1,136 +0,0 @@
---TEST--
-Test ord() function : usage variations - test values for $string argument
---FILE--
-<?php
-
-/* Prototype : int ord ( string $string )
- * Description: Return ASCII value of character
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing ord() function: with unexpected inputs for 'string' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $string array to test ord() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( ord($input) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing ord() function: with unexpected inputs for 'string' argument ***
--- Iteration 1 --
-int(48)
--- Iteration 2 --
-int(49)
--- Iteration 3 --
-int(50)
--- Iteration 4 --
-int(50)
--- Iteration 5 --
-int(50)
--- Iteration 6 --
-int(45)
--- Iteration 7 --
-int(49)
--- Iteration 8 --
-int(45)
--- Iteration 9 --
-int(49)
--- Iteration 10 --
-
-Warning: ord() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: ord() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: ord() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-int(49)
--- Iteration 14 --
-int(0)
--- Iteration 15 --
-int(49)
--- Iteration 16 --
-int(0)
--- Iteration 17 --
-int(0)
--- Iteration 18 --
-int(0)
--- Iteration 19 --
-int(115)
--- Iteration 20 --
-
-Warning: ord() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-int(0)
--- Iteration 22 --
-int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/quoted_printable_decode_variation1.phpt b/ext/standard/tests/strings/quoted_printable_decode_variation1.phpt
deleted file mode 100644
index 8d147c0e67..0000000000
--- a/ext/standard/tests/strings/quoted_printable_decode_variation1.phpt
+++ /dev/null
@@ -1,191 +0,0 @@
---TEST--
-Test quoted_printable_decode() function : usage variations - unexpected values for 'str' argument
---FILE--
-<?php
-/* Prototype : string quoted_printable_decode ( string $str )
- * Description: Convert a quoted-printable string to an 8 bit string
- * Source code: ext/standard/string.c
-*/
-
-/*
-* Testing quoted_printable_decode() : with different unexpected values for format argument other than the strings
-*/
-
-echo "*** Testing quoted_printable_decode() : with unexpected values for 'str' argument ***\n";
-
-// initialing required variables
-$arg1 = "second arg";
-$arg2 = "third arg";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample
-{
- public function __toString() {
- return "Object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/ "",
- '',
-
- // object data
-/*23*/ new sample(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource data
-/*26*/ $file_handle
-);
-
-// loop through each element of the array for 'str'
-
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump(bin2hex(quoted_printable_decode($value)));
- $count++;
-};
-
-// close the resource
-fclose($file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing quoted_printable_decode() : with unexpected values for 'str' argument ***
-
--- Iteration 1 --
-string(2) "30"
-
--- Iteration 2 --
-string(2) "31"
-
--- Iteration 3 --
-string(10) "3132333435"
-
--- Iteration 4 --
-string(10) "2d32333435"
-
--- Iteration 5 --
-string(8) "31302e35"
-
--- Iteration 6 --
-string(10) "2d31302e35"
-
--- Iteration 7 --
-string(24) "313031323334353637303030"
-
--- Iteration 8 --
-string(26) "312e3037363534333231452d39"
-
--- Iteration 9 --
-string(6) "302e35"
-
--- Iteration 10 --
-
-Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
-
--- Iteration 11 --
-
-Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
-
--- Iteration 12 --
-
-Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
-
--- Iteration 13 --
-
-Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
-
--- Iteration 14 --
-
-Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d
-string(0) ""
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(2) "31"
-
--- Iteration 18 --
-string(0) ""
-
--- Iteration 19 --
-string(2) "31"
-
--- Iteration 20 --
-string(0) ""
-
--- Iteration 21 --
-string(0) ""
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(12) "4f626a656374"
-
--- Iteration 24 --
-string(0) ""
-
--- Iteration 25 --
-string(0) ""
-
--- Iteration 26 --
-
-Warning: quoted_printable_decode() expects parameter 1 to be string, resource given in %s on line %d
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/rtrim_variation1.phpt b/ext/standard/tests/strings/rtrim_variation1.phpt
deleted file mode 100644
index f07b7db3df..0000000000
--- a/ext/standard/tests/strings/rtrim_variation1.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test rtrim() function : usage variations - test values for $str argument
---FILE--
-<?php
-
-/* Prototype : string rtrim ( string $str [, string $charlist ] )
- * Description: Strip whitespace (or other characters) from the end of a string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing rtrim() function: with unexpected inputs for 'str' argument ***\n";
-
-//get an unset variable
-$unset_var = ' !--string_val--! ';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return " !---sample object---! ";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test rtrim() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- // strip white space and any "minus" signs
- var_dump( rtrim($input, " !-") );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing rtrim() function: with unexpected inputs for 'str' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(3) "255"
--- Iteration 4 --
-string(3) "256"
--- Iteration 5 --
-string(10) "2147483647"
--- Iteration 6 --
-string(11) "-2147483648"
--- Iteration 7 --
-string(4) "10.5"
--- Iteration 8 --
-string(5) "-20.5"
--- Iteration 9 --
-string(12) "101234567000"
--- Iteration 10 --
-
-Warning: rtrim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: rtrim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: rtrim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(1) "1"
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(0) ""
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(19) " !---sample object"
--- Iteration 20 --
-
-Warning: rtrim() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/rtrim_variation2.phpt b/ext/standard/tests/strings/rtrim_variation2.phpt
deleted file mode 100644
index 70efd09f2b..0000000000
--- a/ext/standard/tests/strings/rtrim_variation2.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test rtrim() function : usage variations - test values for $charlist argument
---FILE--
-<?php
-
-/* Prototype : string rtrim ( string $str [, string $charlist ] )
- * Description: Strip whitespace (or other characters) from the end of a string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing rtrim() function: with unexpected inputs for 'charlist' argument ***\n";
-
-//get an unset variable
-$unset_var = ' string_val ';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return " sample object ";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test rtrim() function
-$count = 1;
-foreach($inputs as $charlist) {
- echo "-- Iteration $count --\n";
- // strip white space and any "minus" signs
- var_dump( rtrim("!---Hello World---!", $charlist) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing rtrim() function: with unexpected inputs for 'charlist' argument ***
--- Iteration 1 --
-string(19) "!---Hello World---!"
--- Iteration 2 --
-string(19) "!---Hello World---!"
--- Iteration 3 --
-string(19) "!---Hello World---!"
--- Iteration 4 --
-string(19) "!---Hello World---!"
--- Iteration 5 --
-string(19) "!---Hello World---!"
--- Iteration 6 --
-string(19) "!---Hello World---!"
--- Iteration 7 --
-string(19) "!---Hello World---!"
--- Iteration 8 --
-string(19) "!---Hello World---!"
--- Iteration 9 --
-string(19) "!---Hello World---!"
--- Iteration 10 --
-
-Warning: rtrim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: rtrim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: rtrim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(19) "!---Hello World---!"
--- Iteration 14 --
-string(19) "!---Hello World---!"
--- Iteration 15 --
-string(19) "!---Hello World---!"
--- Iteration 16 --
-string(19) "!---Hello World---!"
--- Iteration 17 --
-string(19) "!---Hello World---!"
--- Iteration 18 --
-string(19) "!---Hello World---!"
--- Iteration 19 --
-string(19) "!---Hello World---!"
--- Iteration 20 --
-
-Warning: rtrim() expects parameter 2 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(19) "!---Hello World---!"
--- Iteration 22 --
-string(19) "!---Hello World---!"
-===DONE===
diff --git a/ext/standard/tests/strings/sha1_variation1.phpt b/ext/standard/tests/strings/sha1_variation1.phpt
deleted file mode 100644
index 35fb16a87b..0000000000
--- a/ext/standard/tests/strings/sha1_variation1.phpt
+++ /dev/null
@@ -1,157 +0,0 @@
---TEST--
-Test sha1() function : usage variations - unexpected values for 'str' argument
---FILE--
-<?php
-
-/* Prototype: string sha1 ( string $str [, bool $raw_output ] )
- * Description: Calculate the sha1 hash of a string
- */
-
-echo "*** Testing sha1() : unexpected values for 'str' ***\n";
-
-$raw = false;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//defining class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'str' argument
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.1234567E-10,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/ "",
- '',
-
- // object data
-/*23*/ new MyClass(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- //resource data
-/*26*/ $fp
-);
-
-// loop through each element of $values for 'str' argument
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( sha1($values[$count], $raw) );
-}
-
-//closing resource
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sha1() : unexpected values for 'str' ***
--- Iteration 1 --
-string(40) "b6589fc6ab0dc82cf12099d1c2d40ab994e8410c"
--- Iteration 2 --
-string(40) "356a192b7913b04c54574d18c28d46e6395428ab"
--- Iteration 3 --
-string(40) "8cb2237d0679ca88db6464eac60da96345513964"
--- Iteration 4 --
-string(40) "bc97c643aba3b6c6abe253222f439d4002a87528"
--- Iteration 5 --
-string(40) "1287384bc5ef3ab84a36a5ef1d888df2763567f4"
--- Iteration 6 --
-string(40) "c9d6e1b691f17c8ae6d458984a5f56f80e62a60b"
--- Iteration 7 --
-string(40) "39493e1e645578a655f532e1f9bcff67991f2c2f"
--- Iteration 8 --
-string(40) "681b45cae882ad795afd54ccc2a04ad58e056b83"
--- Iteration 9 --
-string(40) "1b390cd54a0c0d4f27fa7adf23e3c45536e9f37c"
--- Iteration 10 --
-
-Warning: sha1() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: sha1() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: sha1() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: sha1() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: sha1() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 16 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 17 --
-string(40) "356a192b7913b04c54574d18c28d46e6395428ab"
--- Iteration 18 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 19 --
-string(40) "356a192b7913b04c54574d18c28d46e6395428ab"
--- Iteration 20 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 21 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 22 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 23 --
-string(40) "1615307cc4523f183e777df67f168c86908e8007"
--- Iteration 24 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 25 --
-string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
--- Iteration 26 --
-
-Warning: sha1() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/strings/sha1_variation2.phpt b/ext/standard/tests/strings/sha1_variation2.phpt
deleted file mode 100644
index 13c255451a..0000000000
--- a/ext/standard/tests/strings/sha1_variation2.phpt
+++ /dev/null
@@ -1,160 +0,0 @@
---TEST--
-Test sha1() function : usage variations - unexpected values for 'raw' argument
---FILE--
-<?php
-
-/* Prototype: string sha1 ( string $str [, bool $raw_output ] )
- * Description: Calculate the sha1 hash of a string
- */
-
-echo "*** Testing sha1() : unexpected values for 'raw' ***\n";
-
-$string = "Hello World";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//defining class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'str' argument
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.1234567E-10,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // string data
-/*17*/ "ABC",
- 'abc',
- "0abc",
- "123abc",
-
- // empty data
-/*21*/ "",
- '',
-
- // object data
-/*23*/ new MyClass(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- //resource data
-/*26*/ $fp
-);
-
-// loop through each element of $values for 'raw' argument
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- // use bin2hex to catch those cases were raw is true
- var_dump( bin2hex(sha1($string, $values[$count])) );
-}
-
-//closing resource
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sha1() : unexpected values for 'raw' ***
--- Iteration 1 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 2 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 3 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 4 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 5 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 6 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 7 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 8 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 9 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 10 --
-
-Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d
-string(0) ""
--- Iteration 11 --
-
-Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d
-string(0) ""
--- Iteration 12 --
-
-Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d
-string(0) ""
--- Iteration 13 --
-
-Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d
-string(0) ""
--- Iteration 14 --
-
-Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d
-string(0) ""
--- Iteration 15 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 16 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 17 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 18 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 19 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 20 --
-string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0"
--- Iteration 21 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 22 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 23 --
-
-Warning: sha1() expects parameter 2 to be bool, object given in %s on line %d
-string(0) ""
--- Iteration 24 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 25 --
-string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430"
--- Iteration 26 --
-
-Warning: sha1() expects parameter 2 to be bool, resource given in %s on line %d
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/str_pad_variation1.phpt b/ext/standard/tests/strings/str_pad_variation1.phpt
deleted file mode 100644
index 32506ab1a9..0000000000
--- a/ext/standard/tests/strings/str_pad_variation1.phpt
+++ /dev/null
@@ -1,140 +0,0 @@
---TEST--
-Test str_pad() function : usage variations - unexpected inputs for '$input' argument
---FILE--
-<?php
-/* Prototype : string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] )
- * Description: Pad a string to a certain length with another string
- * Source code: ext/standard/string.c
-*/
-
-/* Test str_pad() function: with unexpected inputs for '$input'
- * and expected type for '$pad_length'
-*/
-
-echo "*** Testing str_pad() function: with unexpected inputs for 'input' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
- 2147483647,
- -2147483648,
-
- // float values
-/*6*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*9*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*16*/ NULL,
- null,
-
- // objects
-/*18*/ new sample(),
-
- // resource
-/*19*/ $file_handle,
-
- // undefined variable
-/*20*/ @$undefined_var,
-
- // unset variable
-/*21*/ @$unset_var
-);
-
-//defining '$pad_length' argument
-$pad_length = "20";
-
-// loop through with each element of the $inputs array to test str_pad() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( str_pad($input, $pad_length) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing str_pad() function: with unexpected inputs for 'input' argument ***
--- Iteration 1 --
-string(20) "0 "
--- Iteration 2 --
-string(20) "1 "
--- Iteration 3 --
-string(20) "-2 "
--- Iteration 4 --
-string(20) "2147483647 "
--- Iteration 5 --
-string(20) "-2147483648 "
--- Iteration 6 --
-string(20) "10.5 "
--- Iteration 7 --
-string(20) "-20.5 "
--- Iteration 8 --
-string(20) "101234567000 "
--- Iteration 9 --
-
-Warning: str_pad() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: str_pad() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: str_pad() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-string(20) "1 "
--- Iteration 13 --
-string(20) " "
--- Iteration 14 --
-string(20) "1 "
--- Iteration 15 --
-string(20) " "
--- Iteration 16 --
-string(20) " "
--- Iteration 17 --
-string(20) " "
--- Iteration 18 --
-string(20) "sample object "
--- Iteration 19 --
-
-Warning: str_pad() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 20 --
-string(20) " "
--- Iteration 21 --
-string(20) " "
-===DONE===
diff --git a/ext/standard/tests/strings/str_pad_variation2.phpt b/ext/standard/tests/strings/str_pad_variation2.phpt
deleted file mode 100644
index 114d5f5ba1..0000000000
--- a/ext/standard/tests/strings/str_pad_variation2.phpt
+++ /dev/null
@@ -1,139 +0,0 @@
---TEST--
-Test str_pad() function : usage variations - unexpected inputs for '$pad_length' argument
---FILE--
-<?php
-/* Prototype : string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] )
- * Description: Pad a string to a certain length with another string
- * Source code: ext/standard/string.c
-*/
-
-/* Test str_pad() function: with unexpected inputs for '$pad_length'
- * and expected type for '$input'
-*/
-
-echo "*** Testing str_pad() function: with unexpected inputs for 'pad_length' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$pad_lengths = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
- 255,
-
- // float values
-/*5*/ 10.5,
- -20.5,
- 10.12345e2,
-
- // array values
-/*8*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*11*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*15*/ NULL,
- null,
-
- // objects
-/*17*/ new sample(),
-
- // resource
-/*18*/ $file_handle,
-
- // undefined variable
-/*19*/ @$undefined_var,
-
- // unset variable
-/*20*/ @$unset_var
-);
-
-//defining '$input' argument
-$input = "Test string";
-
-// loop through with each element of the $pad_lengths array to test str_pad() function
-$count = 1;
-foreach($pad_lengths as $pad_length) {
- echo "-- Iteration $count --\n";
- var_dump( str_pad($input, $pad_length) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing str_pad() function: with unexpected inputs for 'pad_length' argument ***
--- Iteration 1 --
-string(11) "Test string"
--- Iteration 2 --
-string(11) "Test string"
--- Iteration 3 --
-string(11) "Test string"
--- Iteration 4 --
-string(255) "Test string "
--- Iteration 5 --
-string(11) "Test string"
--- Iteration 6 --
-string(11) "Test string"
--- Iteration 7 --
-string(1012) "Test string "
--- Iteration 8 --
-
-Warning: str_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: str_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: str_pad() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-string(11) "Test string"
--- Iteration 12 --
-string(11) "Test string"
--- Iteration 13 --
-string(11) "Test string"
--- Iteration 14 --
-string(11) "Test string"
--- Iteration 15 --
-string(11) "Test string"
--- Iteration 16 --
-string(11) "Test string"
--- Iteration 17 --
-
-Warning: str_pad() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: str_pad() expects parameter 2 to be int, resource given in %s on line %d
-NULL
--- Iteration 19 --
-string(11) "Test string"
--- Iteration 20 --
-string(11) "Test string"
-===DONE===
diff --git a/ext/standard/tests/strings/str_pad_variation3.phpt b/ext/standard/tests/strings/str_pad_variation3.phpt
deleted file mode 100644
index 1e58477f21..0000000000
--- a/ext/standard/tests/strings/str_pad_variation3.phpt
+++ /dev/null
@@ -1,153 +0,0 @@
---TEST--
-Test str_pad() function : usage variations - unexpected inputs for '$pad_string' argument
---FILE--
-<?php
-/* Prototype : string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] )
- * Description: Pad a string to a certain length with another string
- * Source code: ext/standard/string.c
-*/
-
-/* Test str_pad() function: with unexpected inputs for '$pad_string'
- * and expected type for '$input' and '$pad_length'
-*/
-
-echo "*** Testing str_pad() function: with unexpected inputs for 'pad_string' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$pad_strings = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
- 2147483647,
- -2147483648,
-
- // float values
-/*6*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*9*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*16*/ NULL,
- null,
-
- // objects
-/*18*/ new sample(),
-
- // resource
-/*19*/ $file_handle,
-
- // undefined variable
-/*20*/ @$undefined_var,
-
- // unset variable
-/*21*/ @$unset_var
-);
-
-//defining '$input' argument
-$input = "Test string";
-$pad_length = 20;
-
-// loop through with each element of the $pad_strings array to test str_pad() function
-$count = 1;
-foreach($pad_strings as $pad_string) {
- echo "-- Iteration $count --\n";
- var_dump( str_pad($input, $pad_length, $pad_string) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing str_pad() function: with unexpected inputs for 'pad_string' argument ***
--- Iteration 1 --
-string(20) "Test string000000000"
--- Iteration 2 --
-string(20) "Test string111111111"
--- Iteration 3 --
-string(20) "Test string-2-2-2-2-"
--- Iteration 4 --
-string(20) "Test string214748364"
--- Iteration 5 --
-string(20) "Test string-21474836"
--- Iteration 6 --
-string(20) "Test string10.510.51"
--- Iteration 7 --
-string(20) "Test string-20.5-20."
--- Iteration 8 --
-string(20) "Test string101234567"
--- Iteration 9 --
-
-Warning: str_pad() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: str_pad() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: str_pad() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-string(20) "Test string111111111"
--- Iteration 13 --
-
-Warning: str_pad(): Padding string cannot be empty in %s on line %d
-NULL
--- Iteration 14 --
-string(20) "Test string111111111"
--- Iteration 15 --
-
-Warning: str_pad(): Padding string cannot be empty in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: str_pad(): Padding string cannot be empty in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: str_pad(): Padding string cannot be empty in %s on line %d
-NULL
--- Iteration 18 --
-string(20) "Test stringsample ob"
--- Iteration 19 --
-
-Warning: str_pad() expects parameter 3 to be string, resource given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: str_pad(): Padding string cannot be empty in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: str_pad(): Padding string cannot be empty in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/strings/str_pad_variation4.phpt b/ext/standard/tests/strings/str_pad_variation4.phpt
deleted file mode 100644
index 22ca2d5270..0000000000
--- a/ext/standard/tests/strings/str_pad_variation4.phpt
+++ /dev/null
@@ -1,172 +0,0 @@
---TEST--
-Test str_pad() function : usage variations - unexpected inputs for '$pad_type' argument
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] )
- * Description: Pad a string to a certain length with another string
- * Source code: ext/standard/string.c
-*/
-
-/* Test str_pad() function: with unexpected inputs for '$pad_type'
- * and expected type for '$input', '$pad_length' and '$pad_string'
-*/
-
-echo "*** Testing str_pad() function: with unexpected inputs for 'pad_type' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-// array with different values for $input
-$pad_types = array (
-
- // integer values
-/*1*/ 0, // == STR_PAD_LEFT
- 1, // == STR_PAD_RIGHT
- 2, // == STR_PAD_BOTH
- -2,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // string data
-/*10*/ "abc",
- "STR_PAD_LEFT",
- "2",
- "0x2",
- "02",
-
- // array values
-/*15*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*18*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*22*/ NULL,
- null,
-
- // objects
-/*24*/ new sample(),
-
- // undefined variable
-/*25*/ @$undefined_var,
-
- // unset variable
-/*26*/ @$unset_var
-);
-
-//defining '$input' argument
-$input = "Test string";
-$pad_length = 20;
-$pad_string = "*";
-
-// loop through with each element of the $pad_types array to test str_pad() function
-$count = 1;
-foreach($pad_types as $pad_type) {
- echo "-- Iteration $count --\n";
- var_dump( str_pad($input, $pad_length, $pad_string, $pad_type) );
- $count ++;
-}
-
-?>
-===DONE===
---EXPECTF--
-*** Testing str_pad() function: with unexpected inputs for 'pad_type' argument ***
--- Iteration 1 --
-string(20) "*********Test string"
--- Iteration 2 --
-string(20) "Test string*********"
--- Iteration 3 --
-string(20) "****Test string*****"
--- Iteration 4 --
-
-Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: str_pad() expects parameter 4 to be int, string given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: str_pad() expects parameter 4 to be int, string given in %s on line %d
-NULL
--- Iteration 12 --
-string(20) "****Test string*****"
--- Iteration 13 --
-
-Notice: A non well formed numeric value encountered in %s on line %d
-string(20) "*********Test string"
--- Iteration 14 --
-string(20) "****Test string*****"
--- Iteration 15 --
-
-Warning: str_pad() expects parameter 4 to be int, array given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: str_pad() expects parameter 4 to be int, array given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: str_pad() expects parameter 4 to be int, array given in %s on line %d
-NULL
--- Iteration 18 --
-string(20) "Test string*********"
--- Iteration 19 --
-string(20) "*********Test string"
--- Iteration 20 --
-string(20) "Test string*********"
--- Iteration 21 --
-string(20) "*********Test string"
--- Iteration 22 --
-string(20) "*********Test string"
--- Iteration 23 --
-string(20) "*********Test string"
--- Iteration 24 --
-
-Warning: str_pad() expects parameter 4 to be int, object given in %s on line %d
-NULL
--- Iteration 25 --
-string(20) "*********Test string"
--- Iteration 26 --
-string(20) "*********Test string"
-===DONE===
diff --git a/ext/standard/tests/strings/str_shuffle_variation1.phpt b/ext/standard/tests/strings/str_shuffle_variation1.phpt
deleted file mode 100644
index d5681392b5..0000000000
--- a/ext/standard/tests/strings/str_shuffle_variation1.phpt
+++ /dev/null
@@ -1,135 +0,0 @@
---TEST--
-Test str_shuffle() function : usage variations - test values for $haystack argument
---FILE--
-<?php
-
-/* Prototype : string str_shuffle ( string $str )
- * Description: Randomly shuffles a string
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing str_shuffle() function: with unexpected inputs for 'string' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
- 2147483647,
- -2147483648,
-
- // float values
-/*6*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*9*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*16*/ NULL,
- null,
-
- // objects
-/*18*/ new sample(),
-
- // resource
-/*19*/ $file_handle,
-
- // undefined variable
-/*20*/ @$undefined_var,
-
- // unset variable
-/*21*/ @$unset_var
-);
-
-
-// loop through with each element of the $inputs array to test str_shuffle() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( str_shuffle($input) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing str_shuffle() function: with unexpected inputs for 'string' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(2) "%s"
--- Iteration 4 --
-string(10) "%s"
--- Iteration 5 --
-string(11) "%s"
--- Iteration 6 --
-string(4) "%s"
--- Iteration 7 --
-string(5) "%s"
--- Iteration 8 --
-string(12) "%s"
--- Iteration 9 --
-
-Warning: str_shuffle() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: str_shuffle() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: str_shuffle() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-string(1) "1"
--- Iteration 13 --
-string(0) ""
--- Iteration 14 --
-string(1) "1"
--- Iteration 15 --
-string(0) ""
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(0) ""
--- Iteration 18 --
-string(13) "%s"
--- Iteration 19 --
-
-Warning: str_shuffle() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/str_split_variation1.phpt b/ext/standard/tests/strings/str_split_variation1.phpt
deleted file mode 100644
index 94eca406fd..0000000000
--- a/ext/standard/tests/strings/str_split_variation1.phpt
+++ /dev/null
@@ -1,241 +0,0 @@
---TEST--
-Test str_split() function : usage variations - unexpected values for 'str' argument
---FILE--
-<?php
-/* Prototype : array str_split(string $str [, int $split_length])
- * Description: Convert a string to an array. If split_length is
- specified, break the string down into chunks each
- split_length characters long.
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing str_split() : unexpected values for 'str' ***\n";
-
-// Initialise function arguments
-$split_length = 3;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//defining class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'str' argument
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- //resource data
- $fp
-);
-
-// loop through each element of $values for 'str' argument
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( str_split($values[$count], $split_length) );
-}
-
-//closing resource
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing str_split() : unexpected values for 'str' ***
--- Iteration 1 --
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- string(3) "123"
- [1]=>
- string(2) "45"
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- string(3) "-23"
- [1]=>
- string(2) "45"
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- string(3) "10."
- [1]=>
- string(1) "5"
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- string(3) "-10"
- [1]=>
- string(2) ".5"
-}
--- Iteration 7 --
-array(4) {
- [0]=>
- string(3) "105"
- [1]=>
- string(3) "000"
- [2]=>
- string(3) "000"
- [3]=>
- string(3) "000"
-}
--- Iteration 8 --
-array(3) {
- [0]=>
- string(3) "1.0"
- [1]=>
- string(3) "6E-"
- [2]=>
- string(1) "9"
-}
--- Iteration 9 --
-array(1) {
- [0]=>
- string(3) "0.5"
-}
--- Iteration 10 --
-
-Warning: str_split() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: str_split() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: str_split() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: str_split() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: str_split() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 16 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 17 --
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 18 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 19 --
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 20 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 21 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 22 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 23 --
-array(2) {
- [0]=>
- string(3) "obj"
- [1]=>
- string(3) "ect"
-}
--- Iteration 24 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 25 --
-array(1) {
- [0]=>
- string(0) ""
-}
--- Iteration 26 --
-
-Warning: str_split() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/str_split_variation2.phpt b/ext/standard/tests/strings/str_split_variation2.phpt
deleted file mode 100644
index 0bb8304b56..0000000000
--- a/ext/standard/tests/strings/str_split_variation2.phpt
+++ /dev/null
@@ -1,290 +0,0 @@
---TEST--
-Test str_split() function : usage variations - unexpected values for 'split_length' argument
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : array str_split(string $str [, int $split_length])
- * Description: Convert a string to an array. If split_length is
- specified, break the string down into chunks each
- split_length characters long.
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing str_split() : unexpected values for 'split_length' ***\n";
-
-// Initialise function arguments
-$str = 'variation2:split_length';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//defining class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'split_length'
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.6E10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- //resource data
- $fp
-);
-
-// loop through each element of $values for 'split_length'
-for($count = 0; $count < count($values); $count++) {
- echo "--Iteration ".($count+1)." --\n";
- var_dump( str_split($str, $values[$count]) );
-}
-
-//closing resource
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing str_split() : unexpected values for 'split_length' ***
---Iteration 1 --
-array(3) {
- [0]=>
- string(10) "variation2"
- [1]=>
- string(10) ":split_len"
- [2]=>
- string(3) "gth"
-}
---Iteration 2 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 3 --
-
-Warning: str_split() expects parameter 2 to be int, float given in %s on line %d
-NULL
---Iteration 4 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 5 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 6 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 7 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 8 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 9 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 10 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 11 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 12 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 13 --
-array(23) {
- [0]=>
- string(1) "v"
- [1]=>
- string(1) "a"
- [2]=>
- string(1) "r"
- [3]=>
- string(1) "i"
- [4]=>
- string(1) "a"
- [5]=>
- string(1) "t"
- [6]=>
- string(1) "i"
- [7]=>
- string(1) "o"
- [8]=>
- string(1) "n"
- [9]=>
- string(1) "2"
- [10]=>
- string(1) ":"
- [11]=>
- string(1) "s"
- [12]=>
- string(1) "p"
- [13]=>
- string(1) "l"
- [14]=>
- string(1) "i"
- [15]=>
- string(1) "t"
- [16]=>
- string(1) "_"
- [17]=>
- string(1) "l"
- [18]=>
- string(1) "e"
- [19]=>
- string(1) "n"
- [20]=>
- string(1) "g"
- [21]=>
- string(1) "t"
- [22]=>
- string(1) "h"
-}
---Iteration 14 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 15 --
-array(23) {
- [0]=>
- string(1) "v"
- [1]=>
- string(1) "a"
- [2]=>
- string(1) "r"
- [3]=>
- string(1) "i"
- [4]=>
- string(1) "a"
- [5]=>
- string(1) "t"
- [6]=>
- string(1) "i"
- [7]=>
- string(1) "o"
- [8]=>
- string(1) "n"
- [9]=>
- string(1) "2"
- [10]=>
- string(1) ":"
- [11]=>
- string(1) "s"
- [12]=>
- string(1) "p"
- [13]=>
- string(1) "l"
- [14]=>
- string(1) "i"
- [15]=>
- string(1) "t"
- [16]=>
- string(1) "_"
- [17]=>
- string(1) "l"
- [18]=>
- string(1) "e"
- [19]=>
- string(1) "n"
- [20]=>
- string(1) "g"
- [21]=>
- string(1) "t"
- [22]=>
- string(1) "h"
-}
---Iteration 16 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 17 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 18 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 19 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 20 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 21 --
-
-Warning: str_split() expects parameter 2 to be int, object given in %sstr_split_variation2.php on line %d
-NULL
---Iteration 22 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 23 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d
-bool(false)
---Iteration 24 --
-
-Warning: str_split() expects parameter 2 to be int, resource given in %sstr_split_variation2.php on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/str_split_variation2_64bit.phpt b/ext/standard/tests/strings/str_split_variation2_64bit.phpt
deleted file mode 100644
index 92a07498a4..0000000000
--- a/ext/standard/tests/strings/str_split_variation2_64bit.phpt
+++ /dev/null
@@ -1,291 +0,0 @@
---TEST--
-Test str_split() function : usage variations - unexpected values for 'split_length' argument
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : array str_split(string $str [, int $split_length])
- * Description: Convert a string to an array. If split_length is
- specified, break the string down into chunks each
- split_length characters long.
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing str_split() : unexpected values for 'split_length' ***\n";
-
-// Initialise function arguments
-$str = 'variation2:split_length';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//defining class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'split_length'
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.6E10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- //resource data
- $fp
-);
-
-// loop through each element of $values for 'split_length'
-for($count = 0; $count < count($values); $count++) {
- echo "--Iteration ".($count+1)." --\n";
- var_dump( str_split($str, $values[$count]) );
-}
-
-//closing resource
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing str_split() : unexpected values for 'split_length' ***
---Iteration 1 --
-array(3) {
- [0]=>
- string(10) "variation2"
- [1]=>
- string(10) ":split_len"
- [2]=>
- string(3) "gth"
-}
---Iteration 2 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 3 --
-array(1) {
- [0]=>
- string(23) "variation2:split_length"
-}
---Iteration 4 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 5 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 6 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %s on line %d
-NULL
---Iteration 7 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %s on line %d
-NULL
---Iteration 8 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %s on line %d
-NULL
---Iteration 9 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %s on line %d
-NULL
---Iteration 10 --
-
-Warning: str_split() expects parameter 2 to be int, array given in %s on line %d
-NULL
---Iteration 11 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 12 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 13 --
-array(23) {
- [0]=>
- string(1) "v"
- [1]=>
- string(1) "a"
- [2]=>
- string(1) "r"
- [3]=>
- string(1) "i"
- [4]=>
- string(1) "a"
- [5]=>
- string(1) "t"
- [6]=>
- string(1) "i"
- [7]=>
- string(1) "o"
- [8]=>
- string(1) "n"
- [9]=>
- string(1) "2"
- [10]=>
- string(1) ":"
- [11]=>
- string(1) "s"
- [12]=>
- string(1) "p"
- [13]=>
- string(1) "l"
- [14]=>
- string(1) "i"
- [15]=>
- string(1) "t"
- [16]=>
- string(1) "_"
- [17]=>
- string(1) "l"
- [18]=>
- string(1) "e"
- [19]=>
- string(1) "n"
- [20]=>
- string(1) "g"
- [21]=>
- string(1) "t"
- [22]=>
- string(1) "h"
-}
---Iteration 14 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 15 --
-array(23) {
- [0]=>
- string(1) "v"
- [1]=>
- string(1) "a"
- [2]=>
- string(1) "r"
- [3]=>
- string(1) "i"
- [4]=>
- string(1) "a"
- [5]=>
- string(1) "t"
- [6]=>
- string(1) "i"
- [7]=>
- string(1) "o"
- [8]=>
- string(1) "n"
- [9]=>
- string(1) "2"
- [10]=>
- string(1) ":"
- [11]=>
- string(1) "s"
- [12]=>
- string(1) "p"
- [13]=>
- string(1) "l"
- [14]=>
- string(1) "i"
- [15]=>
- string(1) "t"
- [16]=>
- string(1) "_"
- [17]=>
- string(1) "l"
- [18]=>
- string(1) "e"
- [19]=>
- string(1) "n"
- [20]=>
- string(1) "g"
- [21]=>
- string(1) "t"
- [22]=>
- string(1) "h"
-}
---Iteration 16 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 17 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %s on line %d
-NULL
---Iteration 18 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %s on line %d
-NULL
---Iteration 19 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %s on line %d
-NULL
---Iteration 20 --
-
-Warning: str_split() expects parameter 2 to be int, string given in %s on line %d
-NULL
---Iteration 21 --
-
-Warning: str_split() expects parameter 2 to be int, object given in %s on line %d
-NULL
---Iteration 22 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 23 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
---Iteration 24 --
-
-Warning: str_split() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strcspn_variation1.phpt b/ext/standard/tests/strings/strcspn_variation1.phpt
deleted file mode 100644
index 89a4e5cc72..0000000000
--- a/ext/standard/tests/strings/strcspn_variation1.phpt
+++ /dev/null
@@ -1,273 +0,0 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values for str argument
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strspn() : with different unexpected values for str argument
-*/
-
-echo "*** Testing strcspn() : with unexpected values for str argument ***\n";
-
-// Initialise function arguments not being substititued (if any)
-$mask = 'abons1234567890';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\n-- Iteration with str value as \"$value\"\n";
- var_dump( strcspn($value,$mask) ); // with default args
- var_dump( strcspn($value,$mask,$start) ); // with default len value
- var_dump( strcspn($value,$mask,$start,$len) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with unexpected values for str argument ***
-
--- Iteration with str value as "0"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "1"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "12345"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "-2345"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "10.5"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "-10.5"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "101234567000"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "1.07654321E-9"
-int(0)
-int(1)
-int(1)
-
--- Iteration with str value as "0.5"
-int(0)
-int(1)
-int(1)
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "object"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "Resource id #%d"
-
-Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strcspn_variation2.phpt b/ext/standard/tests/strings/strcspn_variation2.phpt
deleted file mode 100644
index d7d25f2ec0..0000000000
--- a/ext/standard/tests/strings/strcspn_variation2.phpt
+++ /dev/null
@@ -1,272 +0,0 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values for mask argument
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strcspn() : with different unexpected values for mask argument
-*/
-
-echo "*** Testing strcspn() : with different unexpected values of mask argument ***\n";
-
-$str = 'string_val';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for mask
-
-foreach($values as $value) {
- echo "\n-- Iteration with mask value as \"$value\" --\n";
- var_dump( strcspn($str,$value) ); // with defalut args
- var_dump( strcspn($str,$value,$start) ); // with default len value
- var_dump( strcspn($str,$value,$start,$len) ); // with all args
-};
-
-// close the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with different unexpected values of mask argument ***
-
--- Iteration with mask value as "0" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "12345" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "-2345" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "10.5" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "-10.5" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "101234567000" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1.07654321E-9" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "0.5" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "object" --
-int(1)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "Resource id #%d" --
-
-Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strcspn_variation3.phpt b/ext/standard/tests/strings/strcspn_variation3.phpt
deleted file mode 100644
index 745fe88b4c..0000000000
--- a/ext/standard/tests/strings/strcspn_variation3.phpt
+++ /dev/null
@@ -1,243 +0,0 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values of start argument
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [,int start [,int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strcspn() : with unexpected values of start argument
-*/
-
-echo "*** Testing strcspn() : with unexpected values of start argument ***\n";
-
-// initialing required variables
-$str = 'string_val';
-$mask = 'soibtFTf1234567890';
-$len = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for start
-
-foreach($values as $value) {
- echo "\n-- Iteration with start value as \"$value\" --\n";
- var_dump( strcspn($str,$mask,$value) ); // with default len value
- var_dump( strcspn($str,$mask,$value,$len) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with unexpected values of start argument ***
-
--- Iteration with start value as "10.5" --
-int(0)
-int(0)
-
--- Iteration with start value as "-10.5" --
-int(0)
-int(0)
-
--- Iteration with start value as "1012345670" --
-bool(false)
-bool(false)
-
--- Iteration with start value as "1.07654321E-7" --
-int(0)
-int(0)
-
--- Iteration with start value as "0.5" --
-int(0)
-int(0)
-
--- Iteration with start value as "Array" --
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "" --
-int(0)
-int(0)
-
--- Iteration with start value as "" --
-int(0)
-int(0)
-
--- Iteration with start value as "1" --
-int(0)
-int(0)
-
--- Iteration with start value as "" --
-int(0)
-int(0)
-
--- Iteration with start value as "1" --
-int(0)
-int(0)
-
--- Iteration with start value as "" --
-int(0)
-int(0)
-
--- Iteration with start value as "" --
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "" --
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "string" --
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "string" --
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "object" --
-
-Warning: strcspn() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
--- Iteration with start value as "" --
-int(0)
-int(0)
-
--- Iteration with start value as "" --
-int(0)
-int(0)
-
--- Iteration with start value as "Resource id #%d" --
-
-Warning: strcspn() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strcspn_variation4.phpt b/ext/standard/tests/strings/strcspn_variation4.phpt
deleted file mode 100644
index 0af1228293..0000000000
--- a/ext/standard/tests/strings/strcspn_variation4.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values of len argument
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strcspn() : with unexpected values of len argument
-*/
-
-echo "*** Testing strcspn() : with unexpected values of len argument ***\n";
-
-// initialing required variables
-$str = 'string_val';
-$mask = 'soibtFTf1234567890';
-$start = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for start
-
-foreach($values as $value) {
- echo "\n-- Iteration with len value as \"$value\" --\n";
- var_dump( strcspn($str,$mask,$start,$value) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with unexpected values of len argument ***
-
--- Iteration with len value as "10.5" --
-int(0)
-
--- Iteration with len value as "-10.5" --
-int(0)
-
--- Iteration with len value as "101234567000" --
-int(0)
-
--- Iteration with len value as "1.07654321E-9" --
-int(0)
-
--- Iteration with len value as "0.5" --
-int(0)
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "1" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "1" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-
-Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-
-Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "string" --
-
-Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "string" --
-
-Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "object" --
-
-Warning: strcspn() expects parameter 4 to be int, object given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "Resource id #%d" --
-
-Warning: strcspn() expects parameter 4 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strip_tags_variation1.phpt b/ext/standard/tests/strings/strip_tags_variation1.phpt
deleted file mode 100644
index cca444c0e0..0000000000
--- a/ext/standard/tests/strings/strip_tags_variation1.phpt
+++ /dev/null
@@ -1,159 +0,0 @@
---TEST--
-Test strip_tags() function : usage variations - unexpected values for 'str' argument
---INI--
-set short_open_tag = on
---FILE--
-<?php
-/* Prototype : string strip_tags(string $str [, string $allowable_tags])
- * Description: Strips HTML and PHP tags from a string
- * Source code: ext/standard/string.c
-*/
-
-/*
- * testing functionality of strip_tags() by giving unexpected input values for $str argument
-*/
-
-echo "*** Testing strip_tags() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get a resource variable
-$fp = fopen(__FILE__, "r");
-
-//get a class
-class classA{
- public function __toString(){
- return "Class A object";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*21*/ "",
- '',
-
- // object data
-/*23*/ new classA(),
-
- // undefined data
-/*24*/ @$undefined_var,
-
- // unset data
-/*25*/ @$unset_var,
-
- // resource variable
-/*26*/ $fp
-
-);
-
-// loop through each element of the array for allowable_tags
-$iterator = 1;
-foreach($values as $value) {
- echo "-- Iteration $iterator --\n";
- var_dump( strip_tags($value) );
- $iterator++;
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strip_tags() : usage variations ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "101234567000"
--- Iteration 8 --
-string(13) "1.07654321E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(0) ""
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(1) "1"
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
--- Iteration 23 --
-string(14) "Class A object"
--- Iteration 24 --
-string(0) ""
--- Iteration 25 --
-string(0) ""
--- Iteration 26 --
-
-Warning: strip_tags() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/strings/strip_tags_variation3.phpt b/ext/standard/tests/strings/strip_tags_variation3.phpt
deleted file mode 100644
index d6dc34a080..0000000000
--- a/ext/standard/tests/strings/strip_tags_variation3.phpt
+++ /dev/null
@@ -1,159 +0,0 @@
---TEST--
-Test strip_tags() function : usage variations - unexpected values for both 'str' and 'allowable_tags'
---INI--
-set short_open_tag = on
---FILE--
-<?php
-/* Prototype : string strip_tags(string $str [, string $allowable_tags])
- * Description: Strips HTML and PHP tags from a string
- * Source code: ext/standard/string.c
-*/
-
-/*
- * testing functionality of strip_tags() by giving unexpected values for $str and $allowable_tags arguments
-*/
-
-echo "*** Testing strip_tags() : usage variations ***\n";
-
-// get a resource
-$fp=fopen(__FILE__, "r");
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA{
- public function __toString(){
- return "Class A object";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-
-);
-
-// loop through each element of the array for allowable_tags
-$iterator = 1;
-foreach($values as $value) {
- echo "-- Iteration $iterator --\n";
- var_dump( strip_tags($value, $value) );
- $iterator++;
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strip_tags() : usage variations ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "101234567000"
--- Iteration 8 --
-string(13) "1.07654321E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(0) ""
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(1) "1"
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
--- Iteration 23 --
-string(14) "Class A object"
--- Iteration 24 --
-string(0) ""
--- Iteration 25 --
-string(0) ""
--- Iteration 26 --
-
-Warning: strip_tags() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/strings/stripcslashes_variation1.phpt b/ext/standard/tests/strings/stripcslashes_variation1.phpt
deleted file mode 100644
index fe3a786678..0000000000
--- a/ext/standard/tests/strings/stripcslashes_variation1.phpt
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test stripcslashes() function : usage variations - non-string type argument
---FILE--
-<?php
-/* Prototype : string stripcslashes ( string $str )
- * Description: Returns a string with backslashes stripped off. Recognizes C-like \n, \r ...,
- * octal and hexadecimal representation.
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Test stripcslashes() with non-string type argument such as int, float, etc
-*/
-
-echo "*** Testing stripcslashes() : with non-string type argument ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj'ct";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float values
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
-/*15*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
-/*19*/ "",
- '',
-
- // undefined variable
-/*21*/ $undefined_var,
-
- // unset variable
-/*22*/ $unset_var,
-
- // objects
-/*23*/ new sample(),
-
- // resource
-/*24*/ $file_handle,
-
- // null values
-/*25*/ NULL,
- null
-);
-
-
-// loop through each element of the array and check the working of stripcslashes()
-// when $str argument is supplied with different values
-echo "\n--- Testing stripcslashes() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( stripcslashes($str) );
-
- $counter ++;
-}
-
-// closing the file
-fclose($file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing stripcslashes() : with non-string type argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing stripcslashes() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "101234567000"
--- Iteration 8 --
-string(13) "1.07654321E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(0) ""
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
--- Iteration 23 --
-string(6) "obj'ct"
--- Iteration 24 --
-
-Warning: stripcslashes() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-string(0) ""
--- Iteration 26 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/stripos_variation14.phpt b/ext/standard/tests/strings/stripos_variation14.phpt
deleted file mode 100644
index 10b481fb71..0000000000
--- a/ext/standard/tests/strings/stripos_variation14.phpt
+++ /dev/null
@@ -1,153 +0,0 @@
---TEST--
-Test stripos() function : usage variations - unexpected inputs for 'offset' argument
---FILE--
-<?php
-/* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
- * Description: Find position of first occurrence of a case-insensitive string
- * Source code: ext/standard/string.c
-*/
-
-/* Test stripos() function with unexpected inputs for 'offset' argument */
-
-echo "*** Testing stripos() function with unexpected values for offset ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// defining a class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-//definition of input args
-$haystack = "hello world";
-$needle = "world";
-
-// array with different values
-$offsets = array (
-
- // float values
- 1.5,
- -1.5,
- 1.5e6,
- 1.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- //resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-
-// loop through each element of the array and check the working of stripos()
-$counter = 1;
-for($index = 0; $index < count($offsets); $index ++) {
- echo "-- Iteration $counter --\n";
- var_dump( stripos($haystack, $needle, $offsets[$index]) );
- $counter ++;
-}
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing stripos() function with unexpected values for offset ***
--- Iteration 1 --
-int(6)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-
-Warning: stripos(): Offset not contained in string in %s on line %d
-bool(false)
--- Iteration 4 --
-int(6)
--- Iteration 5 --
-int(6)
--- Iteration 6 --
-
-Warning: stripos() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: stripos() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: stripos() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: stripos() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: stripos() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-int(6)
--- Iteration 12 --
-int(6)
--- Iteration 13 --
-int(6)
--- Iteration 14 --
-int(6)
--- Iteration 15 --
-
-Warning: stripos() expects parameter 3 to be int, object given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: stripos() expects parameter 3 to be int, string given in %s on line %d
-NULL
--- Iteration 18 --
-int(6)
--- Iteration 19 --
-int(6)
--- Iteration 20 --
-
-Warning: stripos() expects parameter 3 to be int, resource given in %s on line %d
-NULL
--- Iteration 21 --
-int(6)
--- Iteration 22 --
-int(6)
-*** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation9.phpt b/ext/standard/tests/strings/stripos_variation9.phpt
deleted file mode 100644
index c0713c57ab..0000000000
--- a/ext/standard/tests/strings/stripos_variation9.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test stripos() function : usage variations - unexpected inputs for 'haystack' argument
---FILE--
-<?php
-/* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
- * Description: Find position of first occurrence of a case-insensitive string
- * Source code: ext/standard/string.c
-*/
-
-/* Test stripos() function with unexpected inputs for haystack argument */
-
-echo "*** Testing stripos() function with unexpected values for haystack ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// defining a class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values
-$haystacks = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-$needle = "heredoc 0 1 2 -2 10.5 -10.5 10.5e10 10.6E-10 .5 array true false object \"\" null Resource";
-
-// loop through each element of the array and check the working of stripos()
-$counter = 1;
-for($index = 0; $index < count($haystacks); $index ++) {
- echo "\n-- Iteration $counter --\n";
- var_dump( stripos($haystacks[$index], $needle) );
- $counter ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing stripos() function with unexpected values for haystack ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
--- Iteration 25 --
-bool(false)
-
--- Iteration 26 --
-bool(false)
-*** Done ***
diff --git a/ext/standard/tests/strings/stripslashes_variation1.phpt b/ext/standard/tests/strings/stripslashes_variation1.phpt
deleted file mode 100644
index 2f9239ceee..0000000000
--- a/ext/standard/tests/strings/stripslashes_variation1.phpt
+++ /dev/null
@@ -1,172 +0,0 @@
---TEST--
-Test stripslashes() function : usage variations - non-string type argument
---FILE--
-<?php
-/* Prototype : string stripslashes ( string $str )
- * Description: Returns an un-quoted string
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Test stripslashes() with non-string type argument such as int, float, etc
-*/
-
-echo "*** Testing stripslashes() : with non-string type argument ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj\'ct";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float values
-/*5*/ 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
-/*15*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
-/*19*/ "",
- '',
-
- // undefined variable
-/*21*/ $undefined_var,
-
- // unset variable
-/*22*/ $unset_var,
-
- // objects
-/*23*/ new sample(),
-
- // resource
-/*24*/ $file_handle,
-
- // null values
-/*25*/ NULL,
- null
-);
-
-
-// loop through each element of the array and check the working of stripslashes()
-// when $str argument is supplied with different values
-echo "\n--- Testing stripslashes() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( stripslashes($str) );
-
- $counter ++;
-}
-
-// closing the file
-fclose($file_handle);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing stripslashes() : with non-string type argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing stripslashes() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "101234567000"
--- Iteration 8 --
-string(13) "1.07654321E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(0) ""
--- Iteration 20 --
-string(0) ""
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
--- Iteration 23 --
-string(6) "obj'ct"
--- Iteration 24 --
-
-Warning: stripslashes() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-string(0) ""
--- Iteration 26 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/stristr_variation1.phpt b/ext/standard/tests/strings/stristr_variation1.phpt
deleted file mode 100644
index 795bf09323..0000000000
--- a/ext/standard/tests/strings/stristr_variation1.phpt
+++ /dev/null
@@ -1,133 +0,0 @@
---TEST--
-Test stristr() function : usage variations - test values for $haystack argument
---FILE--
-<?php
-
-/* Prototype: string stristr ( string $haystack, string $needle );
- Description: Case-insensitive strstr().
-*/
-
-echo "*** Testing stristr() function: with unexpected inputs for 'string' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
- -PHP_INT_MAX,
-
- // float values
-/*5*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*8*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*11*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*15*/ NULL,
- null,
-
- // objects
-/*17*/ new sample(),
-
- // resource
-/*18*/ $file_handle,
-
- // undefined variable
-/*19*/ @$undefined_var,
-
- // unset variable
-/*20*/ @$unset_var
-);
-
-//defining '$pad_length' argument
-$pad_length = "20";
-
-// loop through with each element of the $inputs array to test stristr() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( stristr($input, " ") );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing stristr() function: with unexpected inputs for 'string' argument ***
--- Iteration 1 --
-bool(false)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(false)
--- Iteration 7 --
-bool(false)
--- Iteration 8 --
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d2
-NULL
--- Iteration 9 --
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d2
-NULL
--- Iteration 10 --
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d2
-NULL
--- Iteration 11 --
-bool(false)
--- Iteration 12 --
-bool(false)
--- Iteration 13 --
-bool(false)
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-string(7) " object"
--- Iteration 18 --
-
-Warning: stristr() expects parameter 1 to be string, resource given in %s on line %d2
-NULL
--- Iteration 19 --
-bool(false)
--- Iteration 20 --
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/strncasecmp_variation10.phpt b/ext/standard/tests/strings/strncasecmp_variation10.phpt
deleted file mode 100644
index 1c5708ae69..0000000000
--- a/ext/standard/tests/strings/strncasecmp_variation10.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test strncasecmp() function : usage variations - unexpected values for 'str1'
---FILE--
-<?php
-/* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
- * Description: Binary safe case-insensitive string comparison of the first n characters
- * Source code: Zend/zend_builtin_functions.c
-*/
-
-/* Test strncasecmp() function with the unexpected inputs for 'str1' */
-
-echo "*** Testing strncasecmp() function: with unexpected values for 'str1' ***\n";
-/* get an unset variable */
-$unset_var = 'string_val';
-unset($unset_var);
-
-/* get resource handle */
-$file_handle = fopen(__FILE__, "r");
-
-/* declaring a class */
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-
-/* array with different values */
-$values = array (
- /* integer values */
- 0,
- 1,
- 12345,
- -2345,
-
- /* float values */
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- /* hexadecimal values */
- 0x12,
- -0x12,
-
- /* octal values */
- 012,
- -012,
- 01.2,
-
- /* array values */
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- /* boolean values */
- true,
- false,
- TRUE,
- FALSE,
-
- /* nulls */
- NULL,
- null,
-
- /* empty string */
- "",
- '',
-
- /* undefined variable */
- @$undefined_var,
-
- /* unset variable */
- @$unset_var,
-
- /* resource */
- $file_handle,
-
- /* object */
- new sample()
-);
-
-/* loop through each element of the array and check the working of strncasecmp() */
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str1 = $values[$index];
- $len = strlen($values[$index]) + 1;
- var_dump( strncasecmp($str1, "string", $len) );
- $counter ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Testing strncasecmp() function: with unexpected values for 'str1' ***
--- Iteration 1 --
-int(-%d)
--- Iteration 2 --
-int(-%d)
--- Iteration 3 --
-int(-%d)
--- Iteration 4 --
-int(-%d)
--- Iteration 5 --
-int(-%d)
--- Iteration 6 --
-int(-%d)
--- Iteration 7 --
-int(-%d)
--- Iteration 8 --
-int(-%d)
--- Iteration 9 --
-int(-%d)
--- Iteration 10 --
-int(-%d)
--- Iteration 11 --
-int(-%d)
--- Iteration 12 --
-int(-%d)
--- Iteration 13 --
-int(-%d)
--- Iteration 14 --
-int(-%d)
--- Iteration 15 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line 88
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
-NULL
--- Iteration 16 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line 88
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
-NULL
--- Iteration 17 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line 88
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
-NULL
--- Iteration 18 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line 88
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
-NULL
--- Iteration 19 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line 88
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
-NULL
--- Iteration 20 --
-int(-%d)
--- Iteration 21 --
-int(-%d)
--- Iteration 22 --
-int(-%d)
--- Iteration 23 --
-int(-%d)
--- Iteration 24 --
-int(-%d)
--- Iteration 25 --
-int(-%d)
--- Iteration 26 --
-int(-%d)
--- Iteration 27 --
-int(-%d)
--- Iteration 28 --
-int(-%d)
--- Iteration 29 --
-int(-%d)
--- Iteration 30 --
-
-Warning: strlen() expects parameter 1 to be string, resource given in %s on line 88
-
-Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line 89
-NULL
--- Iteration 31 --
-int(-%d)
-*** Done ***
diff --git a/ext/standard/tests/strings/strncasecmp_variation11.phpt b/ext/standard/tests/strings/strncasecmp_variation11.phpt
deleted file mode 100644
index 362bbf1167..0000000000
--- a/ext/standard/tests/strings/strncasecmp_variation11.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-Test strncasecmp() function : usage variations - unexpected values for 'str2'
---FILE--
-<?php
-/* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
- * Description: Binary safe case-insensitive string comparison of the first n characters
- * Source code: Zend/zend_builtin_functions.c
-*/
-
-/* Test strncasecmp() function with the unexpected inputs for 'str2' */
-
-echo "*** Testing strncasecmp() function: with unexpected values for 'str2' ***\n";
-/* get an unset variable */
-$unset_var = 'string_val';
-unset($unset_var);
-
-/* get resource handle */
-$file_handle = fopen(__FILE__, "r");
-
-/* declaring a class */
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-
-/* array with different values */
-$values = array (
- /* integer values */
- 0,
- 1,
- 12345,
- -2345,
-
- /* float values */
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- /* hexadecimal values */
- 0x12,
- -0x12,
-
- /* octal values */
- 012,
- -012,
- 01.2,
-
- /* array values */
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- /* boolean values */
- true,
- false,
- TRUE,
- FALSE,
-
- /* nulls */
- NULL,
- null,
-
- /* empty string */
- "",
- '',
-
- /* undefined variable */
- @$undefined_var,
-
- /* unset variable */
- @$unset_var,
-
- /* resource */
- $file_handle,
-
- /* object */
- new sample()
-);
-
-/* loop through each element of the array and check the working of strncasecmp() */
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str1 = $values[$index];
- $str2 = $values[$index];
- $len = strlen($values[$index]) + 1;
- var_dump( strncasecmp("string", $str2, $len) );
- $counter ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Testing strncasecmp() function: with unexpected values for 'str2' ***
--- Iteration 1 --
-int(%d)
--- Iteration 2 --
-int(%d)
--- Iteration 3 --
-int(%d)
--- Iteration 4 --
-int(%d)
--- Iteration 5 --
-int(%d)
--- Iteration 6 --
-int(%d)
--- Iteration 7 --
-int(%d)
--- Iteration 8 --
-int(%d)
--- Iteration 9 --
-int(%d)
--- Iteration 10 --
-int(%d)
--- Iteration 11 --
-int(%d)
--- Iteration 12 --
-int(%d)
--- Iteration 13 --
-int(%d)
--- Iteration 14 --
-int(%d)
--- Iteration 15 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 20 --
-int(%d)
--- Iteration 21 --
-int(%d)
--- Iteration 22 --
-int(%d)
--- Iteration 23 --
-int(%d)
--- Iteration 24 --
-int(%d)
--- Iteration 25 --
-int(%d)
--- Iteration 26 --
-int(%d)
--- Iteration 27 --
-int(%d)
--- Iteration 28 --
-int(%d)
--- Iteration 29 --
-int(%d)
--- Iteration 30 --
-
-Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d
-
-Warning: strncasecmp() expects parameter 2 to be string, resource given in %s on line %d
-NULL
--- Iteration 31 --
-int(4)
-*** Done ***
diff --git a/ext/standard/tests/strings/strncasecmp_variation4.phpt b/ext/standard/tests/strings/strncasecmp_variation4.phpt
deleted file mode 100644
index 93968db2da..0000000000
--- a/ext/standard/tests/strings/strncasecmp_variation4.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-Test strncasecmp() function : usage variations - unexpected values for 'str1' & 'str2'
---FILE--
-<?php
-/* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
- * Description: Binary safe case-insensitive string comparison of the first n characters
- * Source code: Zend/zend_builtin_functions.c
-*/
-
-/* Test strncasecmp() function with the unexpected inputs for 'str1' and 'str2' */
-
-echo "*** Testing strncasecmp() function: with unexpected values for 'str1' and 'str2' ***\n";
-/* get an unset variable */
-$unset_var = 'string_val';
-unset($unset_var);
-
-/* get resource handle */
-$file_handle = fopen(__FILE__, "r");
-
-/* declaring a class */
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-
-/* array with different values */
-$values = array (
- /* integer values */
- 0,
- 1,
- 12345,
- -2345,
-
- /* float values */
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- /* hexadecimal values */
- 0x12,
- -0x12,
-
- /* octal values */
- 012,
- -012,
- 01.2,
-
- /* array values */
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- /* boolean values */
- true,
- false,
- TRUE,
- FALSE,
-
- /* nulls */
- NULL,
- null,
-
- /* empty string */
- "",
- '',
-
- /* undefined variable */
- @$undefined_var,
-
- /* unset variable */
- @$unset_var,
-
- /* resource */
- $file_handle,
-
- /* object */
- new sample()
-);
-
-/* loop through each element of the array and check the working of strncasecmp() */
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str1 = $values[$index];
- $str2 = $values[$index];
- $len = strlen($values[$index]) + 1;
- var_dump( strncasecmp($str1, $str2, $len) );
- $counter ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Testing strncasecmp() function: with unexpected values for 'str1' and 'str2' ***
--- Iteration 1 --
-int(0)
--- Iteration 2 --
-int(0)
--- Iteration 3 --
-int(0)
--- Iteration 4 --
-int(0)
--- Iteration 5 --
-int(0)
--- Iteration 6 --
-int(0)
--- Iteration 7 --
-int(0)
--- Iteration 8 --
-int(0)
--- Iteration 9 --
-int(0)
--- Iteration 10 --
-int(0)
--- Iteration 11 --
-int(0)
--- Iteration 12 --
-int(0)
--- Iteration 13 --
-int(0)
--- Iteration 14 --
-int(0)
--- Iteration 15 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 20 --
-int(0)
--- Iteration 21 --
-int(0)
--- Iteration 22 --
-int(0)
--- Iteration 23 --
-int(0)
--- Iteration 24 --
-int(0)
--- Iteration 25 --
-int(0)
--- Iteration 26 --
-int(0)
--- Iteration 27 --
-int(0)
--- Iteration 28 --
-int(0)
--- Iteration 29 --
-int(0)
--- Iteration 30 --
-
-Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d
-
-Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 31 --
-int(0)
-*** Done ***
diff --git a/ext/standard/tests/strings/strncasecmp_variation5.phpt b/ext/standard/tests/strings/strncasecmp_variation5.phpt
deleted file mode 100644
index 44a58f78e1..0000000000
--- a/ext/standard/tests/strings/strncasecmp_variation5.phpt
+++ /dev/null
@@ -1,165 +0,0 @@
---TEST--
-Test strncasecmp() function : usage variations - unexpected values for 'len'
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
- * Description: Binary safe case-insensitive string comparison of the first n characters
- * Source code: Zend/zend_builtin_functions.c
-*/
-
-/* Test strncasecmp() function with the unexpected values, and giving the same strings for 'str1' and 'str2' */
-
-echo "*** Test strncasecmp() function: unexpected values for 'len' ***\n";
-
-/* definition of required variables */
-$str1 = "Hello, World\n";
-$str2 = "Hello, World\n";
-
-/* get an unset variable */
-$unset_var = 'string_val';
-unset($unset_var);
-
-/* get resource handle */
-$file_handle = fopen(__FILE__, "r");
-
-/* declaring a class */
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-
-/* array with different values */
-$lengths = array (
-
- /* float values */
- 10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- /* hexadecimal values */
- 0x12,
-
- /* octal values */
- 012,
- 01.2,
-
- /* array values */
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- /* boolean values */
- true,
- false,
- TRUE,
- FALSE,
-
- /* nulls */
- NULL,
- null,
-
- /* empty string */
- "",
- '',
-
- /* undefined variable */
- @$undefined_var,
-
- /* unset variable */
- @$unset_var,
-
- /* resource */
- $file_handle,
-
- /* object */
- new sample()
-);
-
-/* loop through each element of the array and check the working of strncasecmp() */
-$counter = 1;
-for($index = 0; $index < count($lengths); $index ++) {
- $len = $lengths[$index];
- echo "-- Iteration $counter --\n";
- var_dump( strncasecmp($str1, $str2, $len) );
- $counter ++;
-}
-fclose($file_handle);
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Test strncasecmp() function: unexpected values for 'len' ***
--- Iteration 1 --
-int(0)
--- Iteration 2 --
-int(0)
--- Iteration 3 --
-int(0)
--- Iteration 4 --
-int(0)
--- Iteration 5 --
-int(0)
--- Iteration 6 --
-int(0)
--- Iteration 7 --
-int(0)
--- Iteration 8 --
-
-Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d
-NULL
--- Iteration 13 --
-int(0)
--- Iteration 14 --
-int(0)
--- Iteration 15 --
-int(0)
--- Iteration 16 --
-int(0)
--- Iteration 17 --
-int(0)
--- Iteration 18 --
-int(0)
--- Iteration 19 --
-
-Warning: strncasecmp() expects parameter 3 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: strncasecmp() expects parameter 3 to be int, string given in %s on line %d
-NULL
--- Iteration 21 --
-int(0)
--- Iteration 22 --
-int(0)
--- Iteration 23 --
-
-Warning: strncasecmp() expects parameter 3 to be int, resource given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: strncasecmp() expects parameter 3 to be int, object given in %s on line %d
-NULL
-*** Done ***
diff --git a/ext/standard/tests/strings/strncmp_variation4.phpt b/ext/standard/tests/strings/strncmp_variation4.phpt
deleted file mode 100644
index 5e96e5d16f..0000000000
--- a/ext/standard/tests/strings/strncmp_variation4.phpt
+++ /dev/null
@@ -1,192 +0,0 @@
---TEST--
-Test strncmp() function : usage variations - different inputs(all types)
---FILE--
-<?php
-/* Prototype : int strncmp ( string $str1, string $str2, int $len );
- * Description: Binary safe case-sensitive string comparison of the first n characters
- * Source code: Zend/zend_builtin_functions.c
-*/
-
-/* Test strncmp() function with the input strings are of all types */
-
-echo "*** Testing strncmp() function: by supplying all types for 'str1' and 'str2' ***\n";
-/* get an unset variable */
-$unset_var = 'string_val';
-unset($unset_var);
-
-/* get resource handle */
-$file_handle = fopen(__FILE__, "r");
-
-/* declaring a class */
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-
-/* array with different values */
-$values = array (
- /* integer values */
- 0,
- 1,
- 12345,
- -2345,
-
- /* float values */
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- /* hexadecimal values */
- 0x12,
- -0x12,
-
- /* octal values */
- 012,
- -012,
- 01.2,
-
- /* array values */
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- /* boolean values */
- true,
- false,
- TRUE,
- FALSE,
-
- /* nulls */
- NULL,
- null,
-
- /* empty string */
- "",
- '',
-
- /* undefined variable */
- $undefined_var,
-
- /* unset variable */
- $unset_var,
-
- /* resource */
- $file_handle,
-
- /* object */
- new sample()
-);
-
-/* loop through each element of the array and check the working of strncmp() */
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str1 = $values[$index];
- $str2 = $values[$index];
- $len = strlen($values[$index]) + 1;
- var_dump( strncmp($str1, $str2, $len) );
- $counter ++;
-}
-fclose($file_handle);
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Testing strncmp() function: by supplying all types for 'str1' and 'str2' ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
--- Iteration 1 --
-int(0)
--- Iteration 2 --
-int(0)
--- Iteration 3 --
-int(0)
--- Iteration 4 --
-int(0)
--- Iteration 5 --
-int(0)
--- Iteration 6 --
-int(0)
--- Iteration 7 --
-int(0)
--- Iteration 8 --
-int(0)
--- Iteration 9 --
-int(0)
--- Iteration 10 --
-int(0)
--- Iteration 11 --
-int(0)
--- Iteration 12 --
-int(0)
--- Iteration 13 --
-int(0)
--- Iteration 14 --
-int(0)
--- Iteration 15 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: strlen() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 20 --
-int(0)
--- Iteration 21 --
-int(0)
--- Iteration 22 --
-int(0)
--- Iteration 23 --
-int(0)
--- Iteration 24 --
-int(0)
--- Iteration 25 --
-int(0)
--- Iteration 26 --
-int(0)
--- Iteration 27 --
-int(0)
--- Iteration 28 --
-int(0)
--- Iteration 29 --
-int(0)
--- Iteration 30 --
-
-Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d
-
-Warning: strncmp() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 31 --
-int(0)
-*** Done ***
diff --git a/ext/standard/tests/strings/strncmp_variation5.phpt b/ext/standard/tests/strings/strncmp_variation5.phpt
deleted file mode 100644
index 85e50f5929..0000000000
--- a/ext/standard/tests/strings/strncmp_variation5.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test strncmp() function : usage variations - different lengths(all types)
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
---FILE--
-<?php
-/* Prototype : int strncmp ( string $str1, string $str2, int $len );
- * Description: Binary safe case-sensitive string comparison of the first n characters
- * Source code: Zend/zend_builtin_functions.c
-*/
-
-/* Test strncmp() function with the length as all types, and giving the same strings for 'str1' and 'str2' */
-
-echo "*** Test strncmp() function: by supplying all types for 'len' ***\n";
-
-/* definition of required variables */
-$str1 = "Hello, World\n";
-$str2 = "Hello, World\n";
-
-/* get an unset variable */
-$unset_var = 'string_val';
-unset($unset_var);
-
-/* get resource handle */
-$file_handle = fopen(__FILE__, "r");
-
-/* declaring a class */
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-
-/* array with different values */
-$lengths = array (
- /* integer values */
- 0,
- 1,
- 12345,
-
- /* float values */
- 10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- /* hexadecimal values */
- 0x12,
-
- /* octal values */
- 012,
- 01.2,
-
- /* array values */
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- /* boolean values */
- true,
- false,
- TRUE,
- FALSE,
-
- /* nulls */
- NULL,
- null,
-
- /* empty string */
- "",
- '',
-
- /* undefined variable */
- $undefined_var,
-
- /* unset variable */
- $unset_var,
-
- /* resource */
- $file_handle,
-
- /* object */
- new sample()
-);
-
-/* loop through each element of the array and check the working of strncmp() */
-$counter = 1;
-for($index = 0; $index < count($lengths); $index ++) {
- $len = $lengths[$index];
- echo "-- Iteration $counter --\n";
- var_dump( strncmp($str1, $str2, $len) );
- $counter ++;
-}
-fclose($file_handle);
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Test strncmp() function: by supplying all types for 'len' ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
--- Iteration 1 --
-int(0)
--- Iteration 2 --
-int(0)
--- Iteration 3 --
-int(0)
--- Iteration 4 --
-int(0)
--- Iteration 5 --
-int(0)
--- Iteration 6 --
-int(0)
--- Iteration 7 --
-int(0)
--- Iteration 8 --
-int(0)
--- Iteration 9 --
-int(0)
--- Iteration 10 --
-int(0)
--- Iteration 11 --
-
-Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d
-NULL
--- Iteration 13 --
-
-Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d
-NULL
--- Iteration 14 --
-
-Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d
-NULL
--- Iteration 15 --
-
-Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d
-NULL
--- Iteration 16 --
-int(0)
--- Iteration 17 --
-int(0)
--- Iteration 18 --
-int(0)
--- Iteration 19 --
-int(0)
--- Iteration 20 --
-int(0)
--- Iteration 21 --
-int(0)
--- Iteration 22 --
-
-Warning: strncmp() expects parameter 3 to be int, string given in%s on line %d
-NULL
--- Iteration 23 --
-
-Warning: strncmp() expects parameter 3 to be int, string given in%s on line %d
-NULL
--- Iteration 24 --
-int(0)
--- Iteration 25 --
-int(0)
--- Iteration 26 --
-
-Warning: strncmp() expects parameter 3 to be int, resource given in%s on line %d
-NULL
--- Iteration 27 --
-
-Warning: strncmp() expects parameter 3 to be int, object given in%s on line %d
-NULL
-*** Done ***
diff --git a/ext/standard/tests/strings/strrchr_variation9.phpt b/ext/standard/tests/strings/strrchr_variation9.phpt
deleted file mode 100644
index 760bfa6067..0000000000
--- a/ext/standard/tests/strings/strrchr_variation9.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test strrchr() function : usage variations - unexpected inputs for haystack
---FILE--
-<?php
-/* Prototype : string strrchr(string $haystack, string $needle);
- * Description: Finds the last occurrence of a character in a string.
- * Source code: ext/standard/string.c
-*/
-
-/* Test strrchr() function with unexpected inputs for haystack
- * and expected type for 'needle'
-*/
-
-echo "*** Testing strrchr() function: with unexpected inputs for haystack ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values
-$haystacks = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // null values
- NULL,
- null,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-$needles = array (
- //integer numeric strings
- "0",
- "1",
- "2",
- "-2",
-
- //float numeric strings
- "10.5",
- "-10.5",
- "10.5e10",
- "10.6E-10",
- ".5",
-
- //regular strings
- "array",
- "a",
- "r",
- "y",
- "ay",
- "true",
- "false",
- "TRUE",
- "FALSE",
- "NULL",
- "null",
- "object",
-
- //empty string
- "",
- '',
-
- //resource variable in string form
- "\$file_handle",
-
- //undefined variable in string form
- @"$undefined_var",
- @"$unset_var"
-);
-
-// loop through each element of the array and check the working of strrchr()
-$count = 1;
-for($index = 0; $index < count($haystacks); $index++) {
- echo "-- Iteration $count --\n";
- var_dump( strrchr($haystacks[$index], $needles[$index]) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing strrchr() function: with unexpected inputs for haystack ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(4) "2345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(12) "105000000000"
--- Iteration 8 --
-string(7) "1.06E-9"
--- Iteration 9 --
-string(2) ".5"
--- Iteration 10 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-bool(false)
--- Iteration 20 --
-bool(false)
--- Iteration 21 --
-string(6) "object"
--- Iteration 22 --
-bool(false)
--- Iteration 23 --
-bool(false)
--- Iteration 24 --
-
-Warning: strrchr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-bool(false)
--- Iteration 26 --
-bool(false)
-*** Done ***
diff --git a/ext/standard/tests/strings/strrev_variation4.phpt b/ext/standard/tests/strings/strrev_variation4.phpt
deleted file mode 100644
index b585035c11..0000000000
--- a/ext/standard/tests/strings/strrev_variation4.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test strrev() function : usage variations - unexpected inputs
---FILE--
-<?php
-/* Prototype : string strrev(string $str);
- * Description: Reverse a string
- * Source code: ext/standard/string.c
-*/
-
-/* Testing strrev() function with unexpected inputs for 'str' */
-
-echo "*** Testing strrev() : unexpected inputs for 'str' ***\n";
-//class declaration
-class sample {
- public function __toString(){
- return "object";
- }
-}
-
-//get the resource
-$resource = fopen(__FILE__, "r");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample(),
-
- // resource
- $resource,
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var
-);
-
-// loop through each element of the array for str
-
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iterator $count --\n";
- var_dump( strrev($value) );
- $count++;
-};
-
-fclose($resource); //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing strrev() : unexpected inputs for 'str' ***
-
--- Iterator 1 --
-string(1) "0"
-
--- Iterator 2 --
-string(1) "1"
-
--- Iterator 3 --
-string(5) "54321"
-
--- Iterator 4 --
-string(5) "5432-"
-
--- Iterator 5 --
-string(4) "5.01"
-
--- Iterator 6 --
-string(5) "5.01-"
-
--- Iterator 7 --
-string(12) "000000000501"
-
--- Iterator 8 --
-string(7) "9-E60.1"
-
--- Iterator 9 --
-string(3) "5.0"
-
--- Iterator 10 --
-
-Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iterator 11 --
-
-Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iterator 12 --
-
-Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iterator 13 --
-
-Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iterator 14 --
-
-Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iterator 15 --
-string(0) ""
-
--- Iterator 16 --
-string(0) ""
-
--- Iterator 17 --
-string(1) "1"
-
--- Iterator 18 --
-string(0) ""
-
--- Iterator 19 --
-string(1) "1"
-
--- Iterator 20 --
-string(0) ""
-
--- Iterator 21 --
-string(0) ""
-
--- Iterator 22 --
-string(0) ""
-
--- Iterator 23 --
-string(6) "tcejbo"
-
--- Iterator 24 --
-
-Warning: strrev() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
--- Iterator 25 --
-string(0) ""
-
--- Iterator 26 --
-string(0) ""
-*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation14.phpt b/ext/standard/tests/strings/strrpos_variation14.phpt
deleted file mode 100644
index db4a0590d0..0000000000
--- a/ext/standard/tests/strings/strrpos_variation14.phpt
+++ /dev/null
@@ -1,155 +0,0 @@
---TEST--
-Test strrpos() function : usage variations - unexpected inputs for 'offset' argument
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
- * Description: Find position of last occurrence of 'needle' in 'haystack'.
- * Source code: ext/standard/string.c
-*/
-
-/* Test strrpos() function with unexpected inputs for 'offset' argument */
-
-echo "*** Testing strrpos() function: with unexpected values for offset ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// defining a class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-//definition of input args
-$haystack = "hello world";
-$needle = "world";
-
-// array with different values
-$offsets = array (
-
- // float values
- 1.5,
- -1.5,
- 1.5e10,
- 1.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- //resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-
-// loop through each element of the array and check the working of strrpos()
-$counter = 1;
-for($index = 0; $index < count($offsets); $index ++) {
- echo "-- Iteration $counter --\n";
- var_dump( strrpos($haystack, $needle, $offsets[$index]) );
- $counter ++;
-}
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing strrpos() function: with unexpected values for offset ***
--- Iteration 1 --
-int(6)
--- Iteration 2 --
-int(6)
--- Iteration 3 --
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-int(6)
--- Iteration 5 --
-int(6)
--- Iteration 6 --
-
-Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d
-bool(false)
--- Iteration 11 --
-int(6)
--- Iteration 12 --
-int(6)
--- Iteration 13 --
-int(6)
--- Iteration 14 --
-int(6)
--- Iteration 15 --
-
-Warning: strrpos() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: strrpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: strrpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-int(6)
--- Iteration 19 --
-int(6)
--- Iteration 20 --
-
-Warning: strrpos() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
--- Iteration 21 --
-int(6)
--- Iteration 22 --
-int(6)
-*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation9.phpt b/ext/standard/tests/strings/strrpos_variation9.phpt
deleted file mode 100644
index 576d5b41e4..0000000000
--- a/ext/standard/tests/strings/strrpos_variation9.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-Test strrpos() function : usage variations - unexpected inputs for 'haystack' argument
---FILE--
-<?php
-/* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
- * Description: Find position of last occurrence of 'needle' in 'haystack'.
- * Source code: ext/standard/string.c
-*/
-
-/* Test strrpos() function with unexpected inputs for haystack argument */
-
-echo "*** Testing strrpos() function with unexpected values for haystack ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// defining a class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values
-$haystacks = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-$needle = "heredoc 0 1 2 -2 10.5 -10.5 10.5e10 10.6E-10 .5 array true false object \"\" null Resource";
-
-// loop through each element of the array and check the working of strrpos()
-$counter = 1;
-for($index = 0; $index < count($haystacks); $index ++) {
- echo "\n-- Iteration $counter --\n";
- var_dump( strrpos($haystacks[$index], $needle) );
- $counter ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing strrpos() function with unexpected values for haystack ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-
--- Iteration 25 --
-bool(false)
-
--- Iteration 26 --
-bool(false)
-*** Done ***
diff --git a/ext/standard/tests/strings/strspn_variation1.phpt b/ext/standard/tests/strings/strspn_variation1.phpt
deleted file mode 100644
index db6e8f9a15..0000000000
--- a/ext/standard/tests/strings/strspn_variation1.phpt
+++ /dev/null
@@ -1,273 +0,0 @@
---TEST--
-Test strspn() function : usage variations - unexpected values for str argument
---FILE--
-<?php
-/* Prototype : proto int strspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters found in mask.
- If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strspn() : with different unexpected values for str argument
-*/
-
-echo "*** Testing strspn() : with unexpected values for str argument ***\n";
-
-// Initialise function arguments not being substititued (if any)
-$mask = 'abons1234567890';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\n-- Iteration with str value as \"$value\"\n";
- var_dump( strspn($value,$mask) ); // with default args
- var_dump( strspn($value,$mask,$start) ); // with default len value
- var_dump( strspn($value,$mask,$start,$len) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strspn() : with unexpected values for str argument ***
-
--- Iteration with str value as "0"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "1"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "12345"
-int(5)
-int(4)
-int(4)
-
--- Iteration with str value as "-2345"
-int(0)
-int(4)
-int(4)
-
--- Iteration with str value as "10.5"
-int(2)
-int(1)
-int(1)
-
--- Iteration with str value as "-10.5"
-int(0)
-int(2)
-int(2)
-
--- Iteration with str value as "101234567000"
-int(12)
-int(11)
-int(10)
-
--- Iteration with str value as "1.07654321E-9"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "0.5"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "object"
-int(2)
-int(1)
-int(1)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "Resource id #%d"
-
-Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strspn_variation2.phpt b/ext/standard/tests/strings/strspn_variation2.phpt
deleted file mode 100644
index 1d31a1c802..0000000000
--- a/ext/standard/tests/strings/strspn_variation2.phpt
+++ /dev/null
@@ -1,272 +0,0 @@
---TEST--
-Test strspn() function : usage variations - unexpected values for mask argument
---FILE--
-<?php
-/* Prototype : proto int strspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters found in mask.
- If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strspn() : with different unexpected values for mask argument
-*/
-
-echo "*** Testing strspn() : with different unexpected values of mask argument ***\n";
-
-$str = 'string_val';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for mask
-
-foreach($values as $value) {
- echo "\n-- Iteration with mask value as \"$value\" --\n";
- var_dump( strspn($str,$value) ); // with defalut args
- var_dump( strspn($str,$value,$start) ); // with default len value
- var_dump( strspn($str,$value,$start,$len) ); // with all args
-};
-
-// close the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strspn() : with different unexpected values of mask argument ***
-
--- Iteration with mask value as "0" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "1" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "12345" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "-2345" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "10.5" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "-10.5" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "101234567000" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "1.07654321E-9" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "0.5" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "Array" --
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "1" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "1" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "object" --
-int(0)
-int(1)
-int(1)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(0)
-int(0)
-int(0)
-
--- Iteration with mask value as "Resource id #%d" --
-
-Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strspn_variation3.phpt b/ext/standard/tests/strings/strspn_variation3.phpt
deleted file mode 100644
index 76f11acc26..0000000000
--- a/ext/standard/tests/strings/strspn_variation3.phpt
+++ /dev/null
@@ -1,243 +0,0 @@
---TEST--
-Test strspn() function : usage variations - unexpected values of start argument
---FILE--
-<?php
-/* Prototype : proto int strspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters found in mask.
- If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strspn() : with unexpected values of start argument
-*/
-
-echo "*** Testing strspn() : with unexpected values of start argument ***\n";
-
-// initialing required variables
-$str = 'string_val';
-$mask = 'soibtFTf1234567890';
-$len = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for start
-
-foreach($values as $value) {
- echo "\n-- Iteration with start value as \"$value\" --\n";
- var_dump( strspn($str,$mask,$value) ); // with default len value
- var_dump( strspn($str,$mask,$value,$len) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strspn() : with unexpected values of start argument ***
-
--- Iteration with start value as "10.5" --
-int(0)
-int(0)
-
--- Iteration with start value as "-10.5" --
-int(2)
-int(2)
-
--- Iteration with start value as "1012345670" --
-bool(false)
-bool(false)
-
--- Iteration with start value as "1.07654321E-7" --
-int(2)
-int(2)
-
--- Iteration with start value as "0.5" --
-int(2)
-int(2)
-
--- Iteration with start value as "Array" --
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "Array" --
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, array given in %s on line %d
-NULL
-
--- Iteration with start value as "" --
-int(2)
-int(2)
-
--- Iteration with start value as "" --
-int(2)
-int(2)
-
--- Iteration with start value as "1" --
-int(1)
-int(1)
-
--- Iteration with start value as "" --
-int(2)
-int(2)
-
--- Iteration with start value as "1" --
-int(1)
-int(1)
-
--- Iteration with start value as "" --
-int(2)
-int(2)
-
--- Iteration with start value as "" --
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "" --
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "string" --
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "string" --
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
--- Iteration with start value as "object" --
-
-Warning: strspn() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, object given in %s on line %d
-NULL
-
--- Iteration with start value as "" --
-int(2)
-int(2)
-
--- Iteration with start value as "" --
-int(2)
-int(2)
-
--- Iteration with start value as "Resource id #%d" --
-
-Warning: strspn() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 3 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strspn_variation4.phpt b/ext/standard/tests/strings/strspn_variation4.phpt
deleted file mode 100644
index 858a4fb608..0000000000
--- a/ext/standard/tests/strings/strspn_variation4.phpt
+++ /dev/null
@@ -1,196 +0,0 @@
---TEST--
-Test strspn() function : usage variations - unexpected values of len argument
---FILE--
-<?php
-/* Prototype : proto int strspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters found in mask.
- If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-/*
-* Testing strspn() : with unexpected values of len argument
-*/
-
-echo "*** Testing strspn() : with unexpected values of len argument ***\n";
-
-// initialing required variables
-$str = 'string_val';
-$mask = 'soibtFTf1234567890';
-$start = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for start
-
-foreach($values as $value) {
- echo "\n-- Iteration with len value as \"$value\" --\n";
- var_dump( strspn($str,$mask,$start,$value) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strspn() : with unexpected values of len argument ***
-
--- Iteration with len value as "10.5" --
-int(2)
-
--- Iteration with len value as "-10.5" --
-int(0)
-
--- Iteration with len value as "1012345670" --
-int(2)
-
--- Iteration with len value as "1.07654321E-7" --
-int(0)
-
--- Iteration with len value as "0.5" --
-int(0)
-
--- Iteration with len value as "Array" --
-
-Warning: strspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strspn() expects parameter 4 to be int, array given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "1" --
-int(1)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "1" --
-int(1)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-
-Warning: strspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-
-Warning: strspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "string" --
-
-Warning: strspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "string" --
-
-Warning: strspn() expects parameter 4 to be int, string given in %s on line %d
-NULL
-
--- Iteration with len value as "object" --
-
-Warning: strspn() expects parameter 4 to be int, object given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "Resource id #%d" --
-
-Warning: strspn() expects parameter 4 to be int, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strtok_variation1.phpt b/ext/standard/tests/strings/strtok_variation1.phpt
deleted file mode 100644
index 9c46428a65..0000000000
--- a/ext/standard/tests/strings/strtok_variation1.phpt
+++ /dev/null
@@ -1,174 +0,0 @@
---TEST--
-Test strtok() function : usage variations - first argument as non-string
---FILE--
-<?php
-/* Prototype : string strtok ( string $str, string $token )
- * Description: splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Testing strtok() : with first argument as non-string
-*/
-
-echo "*** Testing strtok() : with first argument as non-string ***\n";
-// initialize all required variables
-$token = '-';
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj-ect";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red-color', 'item' => 'pen-color'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // resource
- $file_handle
-);
-
-
-// loop through each element of the array and check the working of strtok()
-// when $str argument is supplied with different values
-
-echo "\n--- Testing strtok() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( strtok($str, $token) );
-
- $counter ++;
-}
-
-//closing the resource
-fclose($file_handle);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing strtok() : with first argument as non-string ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing strtok() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(4) "2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(4) "10.5"
--- Iteration 7 --
-string(12) "101234567000"
--- Iteration 8 --
-string(11) "1.07654321E"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: strtok() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: strtok() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strtok() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: strtok() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: strtok() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-string(3) "obj"
--- Iteration 20 --
-bool(false)
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
--- Iteration 23 --
-bool(false)
--- Iteration 24 --
-bool(false)
--- Iteration 25 --
-bool(false)
--- Iteration 26 --
-
-Warning: strtok() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strtok_variation2.phpt b/ext/standard/tests/strings/strtok_variation2.phpt
deleted file mode 100644
index 26de1ae0b5..0000000000
--- a/ext/standard/tests/strings/strtok_variation2.phpt
+++ /dev/null
@@ -1,174 +0,0 @@
---TEST--
-Test strtok() function : usage variations - with different token strings
---FILE--
-<?php
-/* Prototype : string strtok ( str $str, str $token )
- * Description: splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Testing strtok() : with different token strings
-*/
-
-echo "*** Testing strtok() : with different token strings ***\n";
-// initialize all required variables
-$str = 'this testcase test strtok() function ';
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj-ect";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null values
- NULL,
- null,
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // resource
- $file_handle
-);
-
-
-// loop through each element of the array and check the working of strtok()
-// when $token argument is supplied with different values
-
-echo "\n--- Testing strtok() by supplying different values for 'token' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $token = $values [$index];
-
- var_dump( strtok($str, $token) );
-
- $counter ++;
-}
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing strtok() : with different token strings ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing strtok() by supplying different values for 'token' argument ---
--- Iteration 1 --
-string(37) "this testcase test strtok() function "
--- Iteration 2 --
-string(37) "this testcase test strtok() function "
--- Iteration 3 --
-string(37) "this testcase test strtok() function "
--- Iteration 4 --
-string(37) "this testcase test strtok() function "
--- Iteration 5 --
-string(37) "this testcase test strtok() function "
--- Iteration 6 --
-string(37) "this testcase test strtok() function "
--- Iteration 7 --
-string(37) "this testcase test strtok() function "
--- Iteration 8 --
-string(37) "this testcase test strtok() function "
--- Iteration 9 --
-string(37) "this testcase test strtok() function "
--- Iteration 10 --
-
-Warning: strtok() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: strtok() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: strtok() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: strtok() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: strtok() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(37) "this testcase test strtok() function "
--- Iteration 16 --
-string(37) "this testcase test strtok() function "
--- Iteration 17 --
-string(37) "this testcase test strtok() function "
--- Iteration 18 --
-string(37) "this testcase test strtok() function "
--- Iteration 19 --
-string(4) "his "
--- Iteration 20 --
-string(37) "this testcase test strtok() function "
--- Iteration 21 --
-string(37) "this testcase test strtok() function "
--- Iteration 22 --
-string(37) "this testcase test strtok() function "
--- Iteration 23 --
-string(37) "this testcase test strtok() function "
--- Iteration 24 --
-string(37) "this testcase test strtok() function "
--- Iteration 25 --
-string(37) "this testcase test strtok() function "
--- Iteration 26 --
-
-Warning: strtok() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/strtr_variation5.phpt b/ext/standard/tests/strings/strtr_variation5.phpt
deleted file mode 100644
index cb6ad267ad..0000000000
--- a/ext/standard/tests/strings/strtr_variation5.phpt
+++ /dev/null
@@ -1,139 +0,0 @@
---TEST--
-Test strtr() function : usage variations - unexpected inputs for 'str' argument
---FILE--
-<?php
-/* Prototype : string strtr(string $str, string $from[, string $to]);
- string strtr(string $str, array $replace_pairs);
- * Description: Translates characters in str using given translation tables
- * Source code: ext/standard/string.c
-*/
-
-/* Test strtr() function: with unexpected inputs for 'str'
- * and expected type for 'from' & 'to' arguments
-*/
-
-echo "*** Testing strtr() function: with unexpected inputs for 'str' ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values
-$strings = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
-
- // float values
-/*4*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*7*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*10*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*14*/ NULL,
- null,
-
- // objects
-/*16*/ new sample(),
-
- // resource
-/*17*/ $file_handle,
-
- // undefined variable
-/*18*/ @$undefined_var,
-
- // unset variable
-/*19*/ @$unset_var
-);
-
-//defining 'from' argument
-$from = "012atm";
-
-//defining 'to' argument
-$to = "atm012";
-
-// loop through with each element of the $strings array to test strtr() function
-$count = 1;
-for($index = 0; $index < count($strings); $index++) {
- echo "-- Iteration $count --\n";
- $str = $strings[$index];
- var_dump( strtr($str, $from, $to) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strtr() function: with unexpected inputs for 'str' ***
--- Iteration 1 --
-string(1) "a"
--- Iteration 2 --
-string(1) "t"
--- Iteration 3 --
-string(2) "-m"
--- Iteration 4 --
-string(4) "ta.5"
--- Iteration 5 --
-string(5) "-ma.5"
--- Iteration 6 --
-string(12) "tatm34567aaa"
--- Iteration 7 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 10 --
-string(1) "t"
--- Iteration 11 --
-string(0) ""
--- Iteration 12 --
-string(1) "t"
--- Iteration 13 --
-string(0) ""
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(0) ""
--- Iteration 16 --
-string(13) "s02ple objec1"
--- Iteration 17 --
-
-Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/strtr_variation7.phpt b/ext/standard/tests/strings/strtr_variation7.phpt
deleted file mode 100644
index 9f7cb95371..0000000000
--- a/ext/standard/tests/strings/strtr_variation7.phpt
+++ /dev/null
@@ -1,158 +0,0 @@
---TEST--
-Test strtr() function : usage variations - unexpected inputs for 'to' argument
---FILE--
-<?php
-/* Prototype : string strtr(string $str, string $from[, string $to]);
- string strtr(string $str, array $replace_pairs);
- * Description: Translates characters in str using given translation tables
- * Source code: ext/standard/string.c
-*/
-
-/* Test strtr() function: with unexpected inputs for 'to'
- * and expected types for 'str' & 'from' arguments
-*/
-
-echo "*** Testing strtr() function: with unexpected inputs for 'to' ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-//defining 'str' argument
-$str = "012atm";
-
-//defining 'from' argument
-$from = "atm012";
-
-// array of values for 'to' argument
-$to_arr = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
-
- // float values
-/*4*/ 10.5,
- -20.5,
- 10.12345675e10,
-
- // array values
-/*7*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*10*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*14*/ NULL,
- null,
-
- // objects
-/*16*/ new sample(),
-
- // resource
-/*17*/ $file_handle,
-
- // undefined variable
-/*18*/ @$undefined_var,
-
- // unset variable
-/*19*/ @$unset_var
-);
-
-// loop through with each element of the $to array to test strtr() function
-$count = 1;
-for($index = 0; $index < count($to_arr); $index++) {
- echo "\n-- Iteration $count --\n";
- $to = $to_arr[$index];
- var_dump( strtr($str, $from, $to) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strtr() function: with unexpected inputs for 'to' ***
-
--- Iteration 1 --
-string(6) "0120tm"
-
--- Iteration 2 --
-string(6) "0121tm"
-
--- Iteration 3 --
-string(6) "012-2m"
-
--- Iteration 4 --
-string(6) "51210."
-
--- Iteration 5 --
-string(6) ".52-20"
-
--- Iteration 6 --
-string(6) "234101"
-
--- Iteration 7 --
-
-Warning: strtr() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: strtr() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: strtr() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
--- Iteration 10 --
-string(6) "0121tm"
-
--- Iteration 11 --
-string(6) "012atm"
-
--- Iteration 12 --
-string(6) "0121tm"
-
--- Iteration 13 --
-string(6) "012atm"
-
--- Iteration 14 --
-string(6) "012atm"
-
--- Iteration 15 --
-string(6) "012atm"
-
--- Iteration 16 --
-string(6) "plesam"
-
--- Iteration 17 --
-
-Warning: strtr() expects parameter 3 to be string, resource given in %s on line %d
-NULL
-
--- Iteration 18 --
-string(6) "012atm"
-
--- Iteration 19 --
-string(6) "012atm"
-===DONE===
diff --git a/ext/standard/tests/strings/strtr_variation9.phpt b/ext/standard/tests/strings/strtr_variation9.phpt
deleted file mode 100644
index 427fde5f75..0000000000
--- a/ext/standard/tests/strings/strtr_variation9.phpt
+++ /dev/null
@@ -1,225 +0,0 @@
---TEST--
-Test strtr() function : usage variations - unexpected inputs for all arguments
---FILE--
-<?php
-/* Prototype : string strtr(string $str, string $from[, string $to]);
- string strtr(string $str, array $replace_pairs);
- * Description: Translates characters in str using given translation tables
- * Source code: ext/standard/string.c
-*/
-
-/* Test strtr() function: with unexpected inputs for 'str', 'from', 'to' & 'replace_pairs' arguments */
-
-echo "*** Testing strtr() function: with unexpected inputs for all arguments ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values
-$values = array (
-
- // integer values
-/*1*/ 0,
- 1,
- -2,
-
- // float values
-/*4*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*7*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*16*/ NULL,
- null,
-
- // objects
-/*18*/ new sample(),
-
- // resource
-/*19*/ $file_handle,
-
- // undefined variable
-/*20*/ @$undefined_var,
-
- // unset variable
-/*21*/ @$unset_var
-);
-
-// loop through with each element of the $values array to test strtr() function
-$count = 1;
-for($index = 0; $index < count($values); $index++) {
- echo "\n-- Iteration $count --\n";
- var_dump( strtr($values[$index], $values[$index], $values[$index]) ); //fn call with three args
- var_dump( strtr($values[$index], $values[$index]) ); //fn call with two args
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing strtr() function: with unexpected inputs for all arguments ***
-
--- Iteration 1 --
-string(1) "0"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 2 --
-string(1) "1"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 3 --
-string(2) "-2"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 4 --
-string(4) "10.5"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 5 --
-string(5) "-20.5"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 6 --
-string(12) "101234567000"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 12 --
-string(1) "1"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 13 --
-string(0) ""
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 14 --
-string(1) "1"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 15 --
-string(0) ""
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 16 --
-string(0) ""
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 17 --
-string(0) ""
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 18 --
-string(13) "sample object"
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
--- Iteration 20 --
-string(0) ""
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-
--- Iteration 21 --
-string(0) ""
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/trim_variation1.phpt b/ext/standard/tests/strings/trim_variation1.phpt
deleted file mode 100644
index 56578fb75c..0000000000
--- a/ext/standard/tests/strings/trim_variation1.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test trim() function : usage variations - test values for $str argument
---FILE--
-<?php
-
-/* Prototype : string trim ( string $str [, string $charlist ] )
- * Description: Strip whitespace (or other characters) from the beginning and end of a string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing trim() function: with unexpected inputs for 'str' argument ***\n";
-
-//get an unset variable
-$unset_var = ' !--string_val--! ';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return " !---sample object---! ";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test trim() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- // strip white space and any "minus" signs
- var_dump( trim($input, " !-") );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing trim() function: with unexpected inputs for 'str' argument ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(3) "255"
--- Iteration 4 --
-string(3) "256"
--- Iteration 5 --
-string(10) "2147483647"
--- Iteration 6 --
-string(10) "2147483648"
--- Iteration 7 --
-string(4) "10.5"
--- Iteration 8 --
-string(4) "20.5"
--- Iteration 9 --
-string(12) "101234567000"
--- Iteration 10 --
-
-Warning: trim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: trim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: trim() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(1) "1"
--- Iteration 14 --
-string(0) ""
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-string(0) ""
--- Iteration 17 --
-string(0) ""
--- Iteration 18 --
-string(0) ""
--- Iteration 19 --
-string(13) "sample object"
--- Iteration 20 --
-
-Warning: trim() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(0) ""
--- Iteration 22 --
-string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/trim_variation2.phpt b/ext/standard/tests/strings/trim_variation2.phpt
deleted file mode 100644
index d38f898862..0000000000
--- a/ext/standard/tests/strings/trim_variation2.phpt
+++ /dev/null
@@ -1,138 +0,0 @@
---TEST--
-Test trim() function : usage variations - test values for $charlist argument
---FILE--
-<?php
-
-/* Prototype : string trim ( string $str [, string $charlist ] )
- * Description: Strip whitespace (or other characters) from the beginning and end of a string.
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing trim() function: with unexpected inputs for 'charlist' argument ***\n";
-
-//get an unset variable
-$unset_var = ' string_val ';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return " sample object ";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $input
-$inputs = array (
-
- // integer values
-/*1*/ 0,
- 1,
- 255,
- 256,
- 2147483647,
- -2147483648,
-
- // float values
-/*7*/ 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
-/*10*/ array(),
- array(0),
- array(1, 2),
-
- // boolean values
-/*13*/ true,
- false,
- TRUE,
- FALSE,
-
- // null values
-/*17*/ NULL,
- null,
-
- // objects
-/*19*/ new sample(),
-
- // resource
-/*20*/ $file_handle,
-
- // undefined variable
-/*21*/ @$undefined_var,
-
- // unset variable
-/*22*/ @$unset_var
-);
-
-// loop through with each element of the $inputs array to test trim() function
-$count = 1;
-foreach($inputs as $charlist) {
- echo "-- Iteration $count --\n";
- // strip white space and any "minus" signs
- var_dump( trim("!---Hello World---!", $charlist) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing trim() function: with unexpected inputs for 'charlist' argument ***
--- Iteration 1 --
-string(19) "!---Hello World---!"
--- Iteration 2 --
-string(19) "!---Hello World---!"
--- Iteration 3 --
-string(19) "!---Hello World---!"
--- Iteration 4 --
-string(19) "!---Hello World---!"
--- Iteration 5 --
-string(19) "!---Hello World---!"
--- Iteration 6 --
-string(19) "!---Hello World---!"
--- Iteration 7 --
-string(19) "!---Hello World---!"
--- Iteration 8 --
-string(19) "!---Hello World---!"
--- Iteration 9 --
-string(19) "!---Hello World---!"
--- Iteration 10 --
-
-Warning: trim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: trim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: trim() expects parameter 2 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-string(19) "!---Hello World---!"
--- Iteration 14 --
-string(19) "!---Hello World---!"
--- Iteration 15 --
-string(19) "!---Hello World---!"
--- Iteration 16 --
-string(19) "!---Hello World---!"
--- Iteration 17 --
-string(19) "!---Hello World---!"
--- Iteration 18 --
-string(19) "!---Hello World---!"
--- Iteration 19 --
-string(19) "!---Hello World---!"
--- Iteration 20 --
-
-Warning: trim() expects parameter 2 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(19) "!---Hello World---!"
--- Iteration 22 --
-string(19) "!---Hello World---!"
-===DONE===
diff --git a/ext/standard/tests/strings/ucwords_variation1.phpt b/ext/standard/tests/strings/ucwords_variation1.phpt
deleted file mode 100644
index 1604402353..0000000000
--- a/ext/standard/tests/strings/ucwords_variation1.phpt
+++ /dev/null
@@ -1,201 +0,0 @@
---TEST--
-Test ucwords() function : usage variations - unexpected input values
---FILE--
-<?php
-/* Prototype : string ucwords ( string $str )
- * Description: Uppercase the first character of each word in a string
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Test ucwords() by passing different values including scalar and non scalar values
-*/
-
-echo "*** Testing ucwords() : usage variations ***\n";
-// initialize all required variables
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-class my
-{
- function __toString() {
- return "myString";
- }
-}
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // hex values
- 0x10,
- 0X20,
- 0xAA,
- -0XF5,
-
- // octal values
- 0123,
- -0342,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new my(),
-
- // empty string
- "",
- '',
-
- //NULL
- NULL,
- null,
-
- // hex in string
- "0x123",
- '0x123',
- "0xFF12",
- "-0xFF12",
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of the array and check the working of ucwords()
-// when $str argument is supplied with different values
-echo "\n--- Testing ucwords() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( ucwords($str) );
-
- $counter ++;
-}
-
-// close the file handle
-fclose($fp);
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing ucwords() : usage variations ***
-
---- Testing ucwords() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(5) "-2345"
--- Iteration 5 --
-string(2) "16"
--- Iteration 6 --
-string(2) "32"
--- Iteration 7 --
-string(3) "170"
--- Iteration 8 --
-string(4) "-245"
--- Iteration 9 --
-string(2) "83"
--- Iteration 10 --
-string(4) "-226"
--- Iteration 11 --
-string(4) "10.5"
--- Iteration 12 --
-string(5) "-10.5"
--- Iteration 13 --
-string(12) "101234567000"
--- Iteration 14 --
-string(13) "1.07654321E-9"
--- Iteration 15 --
-string(3) "0.5"
--- Iteration 16 --
-
-Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 21 --
-string(1) "1"
--- Iteration 22 --
-string(0) ""
--- Iteration 23 --
-string(1) "1"
--- Iteration 24 --
-string(0) ""
--- Iteration 25 --
-string(8) "MyString"
--- Iteration 26 --
-string(0) ""
--- Iteration 27 --
-string(0) ""
--- Iteration 28 --
-string(0) ""
--- Iteration 29 --
-string(0) ""
--- Iteration 30 --
-string(5) "0x123"
--- Iteration 31 --
-string(5) "0x123"
--- Iteration 32 --
-string(6) "0xFF12"
--- Iteration 33 --
-string(7) "-0xFF12"
--- Iteration 34 --
-string(0) ""
--- Iteration 35 --
-string(0) ""
--- Iteration 36 --
-
-Warning: ucwords() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/strings/utf8_decode_variation1.phpt b/ext/standard/tests/strings/utf8_decode_variation1.phpt
deleted file mode 100644
index 10d4f31ca4..0000000000
--- a/ext/standard/tests/strings/utf8_decode_variation1.phpt
+++ /dev/null
@@ -1,169 +0,0 @@
---TEST--
-Test utf8_decode() function : usage variations - different types for data
---FILE--
-<?php
-/* Prototype : proto string utf8_decode(string data)
- * Description: Converts a UTF-8 encoded string to ISO-8859-1
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing utf8_decode() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new aClass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for data
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( utf8_decode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing utf8_decode() : usage variations ***
-
-Arg value 0
-string(1) "0"
-
-Arg value 1
-string(1) "1"
-
-Arg value 12345
-string(5) "12345"
-
-Arg value -2345
-string(5) "-2345"
-
-Arg value 10.5
-string(4) "10.5"
-
-Arg value -10.5
-string(5) "-10.5"
-
-Arg value 101234567000
-string(12) "101234567000"
-
-Arg value 1.07654321E-9
-string(13) "1.07654321E-9"
-
-Arg value 0.5
-string(3) "0.5"
-
-Arg value Array
-
-Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value Some Ascii Data
-string(15) "Some Ascii Data"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/standard/tests/strings/utf8_encode_variation1.phpt b/ext/standard/tests/strings/utf8_encode_variation1.phpt
deleted file mode 100644
index a0212ea45e..0000000000
--- a/ext/standard/tests/strings/utf8_encode_variation1.phpt
+++ /dev/null
@@ -1,169 +0,0 @@
---TEST--
-Test utf8_encode() function : usage variations - <type here specifics of this variation>
---FILE--
-<?php
-/* Prototype : proto string utf8_encode(string data)
- * Description: Encodes an ISO-8859-1 string to UTF-8
- * Source code: ext/standard/string.c
- * Alias to functions:
- */
-
-echo "*** Testing utf8_encode() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new aClass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for data
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( utf8_encode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing utf8_encode() : usage variations ***
-
-Arg value 0
-string(1) "0"
-
-Arg value 1
-string(1) "1"
-
-Arg value 12345
-string(5) "12345"
-
-Arg value -2345
-string(5) "-2345"
-
-Arg value 10.5
-string(4) "10.5"
-
-Arg value -10.5
-string(5) "-10.5"
-
-Arg value 101234567000
-string(12) "101234567000"
-
-Arg value 1.07654321E-9
-string(13) "1.07654321E-9"
-
-Arg value 0.5
-string(3) "0.5"
-
-Arg value Array
-
-Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value Some Ascii Data
-string(15) "Some Ascii Data"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/standard/tests/strings/wordwrap_variation1.phpt b/ext/standard/tests/strings/wordwrap_variation1.phpt
deleted file mode 100644
index 86f6fac482..0000000000
--- a/ext/standard/tests/strings/wordwrap_variation1.phpt
+++ /dev/null
@@ -1,335 +0,0 @@
---TEST--
-Test wordwrap() function : usage variations - unexpected values for str argument
---FILE--
-<?php
-/* Prototype : string wordwrap ( string $str [, int $width [, string $break [, bool $cut]]] )
- * Description: Wraps buffer to selected number of characters using string break char
- * Source code: ext/standard/string.c
-*/
-
-/*
- * testing wordwrap() by providing different values for str argument
-*/
-
-echo "*** Testing wordwrap() : usage variations ***\n";
-// initialize all required variables
-$width = 3;
-$break = '<br />\n';
-$cut = true;
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new stdclass(),
-
- // Null
- NULL,
- null,
-
- // empty string
- "",
- '',
-
- // resource variable
- $fp,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop though each element of the array and check the working of wordwrap()
-// when $str argument is supplied with different values
-echo "\n--- Testing wordwrap() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( wordwrap($str) );
- var_dump( wordwrap($str, $width) );
- var_dump( wordwrap($str, $width, $break) );
-
- // $cut as false
- $cut = false;
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- // $cut as true
- $cut = true;
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- $counter ++;
-}
-
-// close the resource
-fclose($fp);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing wordwrap() : usage variations ***
-
---- Testing wordwrap() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
-string(1) "0"
-string(1) "0"
-string(1) "0"
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
-string(5) "12345"
-string(5) "12345"
-string(5) "12345"
-string(13) "123<br />\n45"
--- Iteration 4 --
-string(5) "-2345"
-string(5) "-2345"
-string(5) "-2345"
-string(5) "-2345"
-string(13) "-23<br />\n45"
--- Iteration 5 --
-string(4) "10.5"
-string(4) "10.5"
-string(4) "10.5"
-string(4) "10.5"
-string(12) "10.<br />\n5"
--- Iteration 6 --
-string(5) "-10.5"
-string(5) "-10.5"
-string(5) "-10.5"
-string(5) "-10.5"
-string(13) "-10<br />\n.5"
--- Iteration 7 --
-string(12) "101234567000"
-string(12) "101234567000"
-string(12) "101234567000"
-string(12) "101234567000"
-string(36) "101<br />\n234<br />\n567<br />\n000"
--- Iteration 8 --
-string(13) "1.07654321E-9"
-string(13) "1.07654321E-9"
-string(13) "1.07654321E-9"
-string(13) "1.07654321E-9"
-string(45) "1.0<br />\n765<br />\n432<br />\n1E-<br />\n9"
--- Iteration 9 --
-string(3) "0.5"
-string(3) "0.5"
-string(3) "0.5"
-string(3) "0.5"
-string(3) "0.5"
--- Iteration 10 --
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
--- Iteration 16 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 17 --
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
--- Iteration 18 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 19 --
-
-Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d
-NULL
--- Iteration 20 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 21 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 22 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 23 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 24 --
-
-Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 26 --
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-Done
diff --git a/ext/standard/tests/strings/wordwrap_variation2.phpt b/ext/standard/tests/strings/wordwrap_variation2.phpt
deleted file mode 100644
index 4756e98674..0000000000
--- a/ext/standard/tests/strings/wordwrap_variation2.phpt
+++ /dev/null
@@ -1,340 +0,0 @@
---TEST--
-Test wordwrap() function : usage variations - unexpected values for width argument
---FILE--
-<?php
-/* Prototype : string wordwrap ( string $str [, int $width [, string $break [, bool $cut]]] )
- * Description: Wraps buffer to selected number of characters using string break char
- * Source code: ext/standard/string.c
-*/
-
-/*
- * test wordwrap by passing different values for width argument
-*/
-echo "*** Testing wordwrap() : usage variations ***\n";
-// initialize all required variables
-$str = 'testing wordwrap function';
-$break = '<br />\n';
-$cut = true;
-
-// resource var
-$fp = fopen(__FILE__, "r");
-
-// get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-
-// array with different values as width
-$values = array (
- // zerovalue for width
- 0,
-
- // -ve value for width
- -1,
- -10,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // string values
- "string",
- 'string',
-
- // objects
- new stdclass(),
-
- // Null value
- NULL,
- null,
-
- // empty string
- "",
- '',
-
- // resource variable
- $fp,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-
-// loop though each element of the array and check the working of wordwrap()
-// when $width argument is supplied with different values
-echo "\n--- Testing wordwrap() by supplying different values for 'width' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $width = $values [$index];
-
- var_dump( wordwrap($str, $width) );
- var_dump( wordwrap($str, $width, $break) );
-
- // cut as false
- $cut = false;
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- // cut as true
- $cut = true;
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- $counter ++;
-}
-
-// close the resource
-fclose($fp);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing wordwrap() : usage variations ***
-
---- Testing wordwrap() by supplying different values for 'width' argument ---
--- Iteration 1 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
--- Iteration 2 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(223) "<br />\nt<br />\ne<br />\ns<br />\nt<br />\ni<br />\nn<br />\ng<br />\n<br />\nw<br />\no<br />\nr<br />\nd<br />\nw<br />\nr<br />\na<br />\np<br />\n<br />\nf<br />\nu<br />\nn<br />\nc<br />\nt<br />\ni<br />\no<br />\nn"
--- Iteration 3 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(223) "<br />\nt<br />\ne<br />\ns<br />\nt<br />\ni<br />\nn<br />\ng<br />\n<br />\nw<br />\no<br />\nr<br />\nd<br />\nw<br />\nr<br />\na<br />\np<br />\n<br />\nf<br />\nu<br />\nn<br />\nc<br />\nt<br />\ni<br />\no<br />\nn"
--- Iteration 4 --
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d
-NULL
--- Iteration 9 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(199) "t<br />\ne<br />\ns<br />\nt<br />\ni<br />\nn<br />\ng<br />\nw<br />\no<br />\nr<br />\nd<br />\nw<br />\nr<br />\na<br />\np<br />\nf<br />\nu<br />\nn<br />\nc<br />\nt<br />\ni<br />\no<br />\nn"
--- Iteration 10 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
--- Iteration 11 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(199) "t<br />\ne<br />\ns<br />\nt<br />\ni<br />\nn<br />\ng<br />\nw<br />\no<br />\nr<br />\nd<br />\nw<br />\nr<br />\na<br />\np<br />\nf<br />\nu<br />\nn<br />\nc<br />\nt<br />\ni<br />\no<br />\nn"
--- Iteration 12 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d
-NULL
--- Iteration 16 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
--- Iteration 17 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d
-NULL
--- Iteration 21 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
--- Iteration 22 --
-string(25) "testing
-wordwrap
-function"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/strings/wordwrap_variation3.phpt b/ext/standard/tests/strings/wordwrap_variation3.phpt
deleted file mode 100644
index 5774ce3752..0000000000
--- a/ext/standard/tests/strings/wordwrap_variation3.phpt
+++ /dev/null
@@ -1,301 +0,0 @@
---TEST--
-Test wordwrap() function : usage variations - unexptected values for break argument
---FILE--
-<?php
-/* Prototype : string wordwrap ( string $str [, int $width [, string $break [, bool $cut]]] )
- * Description: Wraps buffer to selected number of characters using string break char
- * Source code: ext/standard/string.c
-*/
-
-/*
- * test wordwrap by passing different values for break argument
-*/
-echo "*** Testing wordwrap() : usage variations ***\n";
-// initialize all required variables
-$str = 'testing wordwrap function';
-$width = 10;
-$cut = true;
-
-// resource var
-$fp = fopen(__FILE__, "r");
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-
-// array with different values for break arg
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new stdclass(),
-
- // empty string
- "",
- '',
-
- //Null
- NULL,
- null,
-
- // resource var
- $fp,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop though each element of the array and check the working of wordwrap()
-// when $break argument is supplied with different values
-echo "\n--- Testing wordwrap() by supplying different values for 'break' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $break = $values [$index];
-
- var_dump( wordwrap($str, $width, $break) );
-
- // $cut as false
- $cut = false;
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- // $cut as true
- $cut = true;
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- $counter ++;
-}
-
-// close the resource used
-fclose($fp);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing wordwrap() : usage variations ***
-
---- Testing wordwrap() by supplying different values for 'break' argument ---
--- Iteration 1 --
-string(25) "testing0wordwrap0function"
-string(25) "testing0wordwrap0function"
-string(25) "testing0wordwrap0function"
--- Iteration 2 --
-string(25) "testing1wordwrap1function"
-string(25) "testing1wordwrap1function"
-string(25) "testing1wordwrap1function"
--- Iteration 3 --
-string(33) "testing12345wordwrap12345function"
-string(33) "testing12345wordwrap12345function"
-string(33) "testing12345wordwrap12345function"
--- Iteration 4 --
-string(33) "testing-2345wordwrap-2345function"
-string(33) "testing-2345wordwrap-2345function"
-string(33) "testing-2345wordwrap-2345function"
--- Iteration 5 --
-string(31) "testing10.5wordwrap10.5function"
-string(31) "testing10.5wordwrap10.5function"
-string(31) "testing10.5wordwrap10.5function"
--- Iteration 6 --
-string(33) "testing-10.5wordwrap-10.5function"
-string(33) "testing-10.5wordwrap-10.5function"
-string(33) "testing-10.5wordwrap-10.5function"
--- Iteration 7 --
-string(47) "testing101234567000wordwrap101234567000function"
-string(47) "testing101234567000wordwrap101234567000function"
-string(47) "testing101234567000wordwrap101234567000function"
--- Iteration 8 --
-string(49) "testing1.07654321E-9wordwrap1.07654321E-9function"
-string(49) "testing1.07654321E-9wordwrap1.07654321E-9function"
-string(49) "testing1.07654321E-9wordwrap1.07654321E-9function"
--- Iteration 9 --
-string(29) "testing0.5wordwrap0.5function"
-string(29) "testing0.5wordwrap0.5function"
-string(29) "testing0.5wordwrap0.5function"
--- Iteration 10 --
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(25) "testing1wordwrap1function"
-string(25) "testing1wordwrap1function"
-string(25) "testing1wordwrap1function"
--- Iteration 16 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 17 --
-string(25) "testing1wordwrap1function"
-string(25) "testing1wordwrap1function"
-string(25) "testing1wordwrap1function"
--- Iteration 18 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 24 --
-
-Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d
-NULL
-
-Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
--- Iteration 26 --
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-
-Warning: wordwrap(): Break string cannot be empty in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/strings/wordwrap_variation4.phpt b/ext/standard/tests/strings/wordwrap_variation4.phpt
deleted file mode 100644
index 656db58b15..0000000000
--- a/ext/standard/tests/strings/wordwrap_variation4.phpt
+++ /dev/null
@@ -1,144 +0,0 @@
---TEST--
-Test wordwrap() function : usage variations - unexptected value for cut argument
---FILE--
-<?php
-/* Prototype : string wordwrap ( string $str [, int $width [, string $break [, bool $cut]]] )
- * Description: Wraps buffer to selected number of characters using string break char
- * Source code: ext/standard/string.c
-*/
-
-/*
- * test wordwrap() by supplying different values for cut argument
-*/
-
-echo "*** Testing wordwrap() : usage variations ***\n";
-// initialize all required variables
-$str = 'testing wordwrap function';
-$width = 10;
-$break = '<br />\n';
-
-// get an unset variable
-$unset_var = true;
-unset($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // string values
- "string",
- 'string',
-
- // objects
- new stdclass(),
-
- // empty string
- "",
- '',
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop though each element of the array and check the working of wordwrap()
-// when $cut argument is supplied with different values
-echo "\n--- Testing wordwrap() by supplying different values for 'cut' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $cut = $values [$index];
-
- var_dump( wordwrap($str, $width, $break, $cut) );
-
- $counter ++;
-}
-
-// close the resource
-fclose($fp);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing wordwrap() : usage variations ***
-
---- Testing wordwrap() by supplying different values for 'cut' argument ---
--- Iteration 1 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 2 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 3 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 4 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 5 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 6 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 7 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 8 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 9 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 10 --
-
-Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d
-NULL
--- Iteration 15 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 16 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 17 --
-
-Warning: wordwrap() expects parameter 4 to be bool, object given in %s on line %d
-NULL
--- Iteration 18 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 19 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 20 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
--- Iteration 21 --
-string(39) "testing<br />\nwordwrap<br />\nfunction"
-Done
diff --git a/ext/standard/tests/url/base64_decode_variation_001.phpt b/ext/standard/tests/url/base64_decode_variation_001.phpt
deleted file mode 100644
index 10e8736846..0000000000
--- a/ext/standard/tests/url/base64_decode_variation_001.phpt
+++ /dev/null
@@ -1,181 +0,0 @@
---TEST--
-Test base64_decode() function : usage variations - unexpected types for arg 1
---FILE--
-<?php
-/* Prototype : proto string base64_decode(string str[, bool strict])
- * Description: Decodes string using MIME base64 algorithm
- * Source code: ext/standard/base64.c
- * Alias to functions:
- */
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing base64_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$strict = true;
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array (
- // int data
- "0" => 0,
- "1" => 1,
- "12345" => 12345,
- "-2345" => -2345,
-
- // float data
- "10.5" => 10.5,
- "-10.5" => -10.5,
- "10.1234567e10" => 10.1234567e10,
- "10.7654321E-10" => 10.7654321E-10,
- ".5" => .5,
-
- // array data
- "array()" => array(),
- "array(0)" => array(0),
- "array(1)" => array(1),
- "array(1, 2)" => array(1, 2),
- "array('color' => 'red', 'item' => 'pen'" => array('color' => 'red', 'item' => 'pen'),
-
- // null data
- "NULL" => NULL,
- "null" => null,
-
- // boolean data
- "true" => true,
- "false" => false,
- "TRUE" => TRUE,
- "FALSE" => FALSE,
-
- // empty data
- "\"\"" => "",
- "''" => '',
-
- // object data
- "stdClass object" => new stdclass(),
-
- // undefined data
- "undefined variable" => $undefined_var,
-
- // unset data
- "unset variable" => $unset_var,
-
- // resource data
- "resource" => $file_handle
-);
-
-// loop through each element of the array for str argument
-
-foreach($values as $key=>$value) {
- echo "\n-- Arg value $key --\n";
- $output = base64_decode($value, $strict);
-
- if (is_string($output)) {
- var_dump(bin2hex($output));
- } else {
- var_dump($output);
- }
-};
-
-?>
-===Done===
---EXPECTF--
-*** Testing base64_decode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(%d)
-Error: 8 - Undefined variable: unset_var, %s(%d)
-
--- Arg value 0 --
-bool(false)
-
--- Arg value 1 --
-bool(false)
-
--- Arg value 12345 --
-bool(false)
-
--- Arg value -2345 --
-bool(false)
-
--- Arg value 10.5 --
-bool(false)
-
--- Arg value -10.5 --
-bool(false)
-
--- Arg value 10.1234567e10 --
-string(18) "d74d76df8e7aef4d34"
-
--- Arg value 10.7654321E-10 --
-bool(false)
-
--- Arg value .5 --
-bool(false)
-
--- Arg value array() --
-Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value array(0) --
-Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value array(1) --
-Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value array(1, 2) --
-Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value array('color' => 'red', 'item' => 'pen' --
-Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d)
-NULL
-
--- Arg value NULL --
-string(0) ""
-
--- Arg value null --
-string(0) ""
-
--- Arg value true --
-bool(false)
-
--- Arg value false --
-string(0) ""
-
--- Arg value TRUE --
-bool(false)
-
--- Arg value FALSE --
-string(0) ""
-
--- Arg value "" --
-string(0) ""
-
--- Arg value '' --
-string(0) ""
-
--- Arg value stdClass object --
-Error: 2 - base64_decode() expects parameter 1 to be string, object given, %s(%d)
-NULL
-
--- Arg value undefined variable --
-string(0) ""
-
--- Arg value unset variable --
-string(0) ""
-
--- Arg value resource --
-Error: 2 - base64_decode() expects parameter 1 to be string, resource given, %s(%d)
-NULL
-===Done===
diff --git a/ext/standard/tests/url/base64_decode_variation_002.phpt b/ext/standard/tests/url/base64_decode_variation_002.phpt
deleted file mode 100644
index 56232f58c4..0000000000
--- a/ext/standard/tests/url/base64_decode_variation_002.phpt
+++ /dev/null
@@ -1,175 +0,0 @@
---TEST--
-Test base64_decode() function : usage variations - unexpected types for arg 2
---FILE--
-<?php
-/* Prototype : proto string base64_decode(string str[, bool strict])
- * Description: Decodes string using MIME base64 algorithm
- * Source code: ext/standard/base64.c
- * Alias to functions:
- */
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing base64_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$str = 'aGVsbG8gd29ybGQh!';
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array (
- // int data
- "0" => 0,
- "1" => 1,
- "12345" => 12345,
- "-2345" => -2345,
-
- // float data
- "10.5" => 10.5,
- "-10.5" => -10.5,
- "10.1234567e10" => 10.1234567e10,
- "10.7654321E-10" => 10.7654321E-10,
- ".5" => .5,
-
- // array data
- "array()" => array(),
- "array(0)" => array(0),
- "array(1)" => array(1),
- "array(1, 2)" => array(1, 2),
- "array('color' => 'red', 'item' => 'pen'" => array('color' => 'red', 'item' => 'pen'),
-
- // null data
- "NULL" => NULL,
- "null" => null,
-
- // boolean data
- "true" => true,
- "false" => false,
- "TRUE" => TRUE,
- "FALSE" => FALSE,
-
- // empty data
- "\"\"" => "",
- "''" => '',
-
- // object data
- "stdClass object" => new stdclass(),
-
- // undefined data
- "undefined variable" => $undefined_var,
-
- // unset data
- "unset variable" => $unset_var,
-
- // resource data
- "resource" => $file_handle
-);
-
-// loop through each element of the array for strict argument
-
-foreach($values as $key=>$value) {
- echo "\n-- Arg value $key --\n";
- var_dump(base64_decode($str, $value));
-};
-
-?>
-===Done===
---EXPECTF--
-*** Testing base64_decode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(%d)
-Error: 8 - Undefined variable: unset_var, %s(%d)
-
--- Arg value 0 --
-string(12) "hello world!"
-
--- Arg value 1 --
-bool(false)
-
--- Arg value 12345 --
-bool(false)
-
--- Arg value -2345 --
-bool(false)
-
--- Arg value 10.5 --
-bool(false)
-
--- Arg value -10.5 --
-bool(false)
-
--- Arg value 10.1234567e10 --
-bool(false)
-
--- Arg value 10.7654321E-10 --
-bool(false)
-
--- Arg value .5 --
-bool(false)
-
--- Arg value array() --
-Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
--- Arg value array(0) --
-Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
--- Arg value array(1) --
-Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
--- Arg value array(1, 2) --
-Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
--- Arg value array('color' => 'red', 'item' => 'pen' --
-Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d)
-NULL
-
--- Arg value NULL --
-string(12) "hello world!"
-
--- Arg value null --
-string(12) "hello world!"
-
--- Arg value true --
-bool(false)
-
--- Arg value false --
-string(12) "hello world!"
-
--- Arg value TRUE --
-bool(false)
-
--- Arg value FALSE --
-string(12) "hello world!"
-
--- Arg value "" --
-string(12) "hello world!"
-
--- Arg value '' --
-string(12) "hello world!"
-
--- Arg value stdClass object --
-Error: 2 - base64_decode() expects parameter 2 to be bool, object given, %s(%d)
-NULL
-
--- Arg value undefined variable --
-string(12) "hello world!"
-
--- Arg value unset variable --
-string(12) "hello world!"
-
--- Arg value resource --
-Error: 2 - base64_decode() expects parameter 2 to be bool, resource given, %s(%d)
-NULL
-===Done===
diff --git a/ext/standard/tests/url/base64_encode_variation_001.phpt b/ext/standard/tests/url/base64_encode_variation_001.phpt
deleted file mode 100644
index bdf2bc0dd4..0000000000
--- a/ext/standard/tests/url/base64_encode_variation_001.phpt
+++ /dev/null
@@ -1,172 +0,0 @@
---TEST--
-Test base64_encode() function : usage variations - unexpected types for argument 1
---FILE--
-<?php
-/* Prototype : proto string base64_encode(string str)
- * Description: Encodes string using MIME base64 algorithm
- * Source code: ext/standard/base64.c
- * Alias to functions:
- */
-
-echo "*** Testing base64_encode() : usage variations ***\n";
-
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( base64_encode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing base64_encode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(63)
-Error: 8 - Undefined variable: unset_var, %s(66)
-
-Arg value 0
-string(4) "MA=="
-
-Arg value 1
-string(4) "MQ=="
-
-Arg value 12345
-string(8) "MTIzNDU="
-
-Arg value -2345
-string(8) "LTIzNDU="
-
-Arg value 10.5
-string(8) "MTAuNQ=="
-
-Arg value -10.5
-string(8) "LTEwLjU="
-
-Arg value 101234567000
-string(16) "MTAxMjM0NTY3MDAw"
-
-Arg value 1.07654321E-9
-string(20) "MS4wNzY1NDMyMUUtOQ=="
-
-Arg value 0.5
-string(4) "MC41"
-Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
-NULL
-Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
-NULL
-Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
-NULL
-Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
-NULL
-Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(4) "MQ=="
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(4) "MQ=="
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Error: 4096 - Object of class stdClass could not be converted to string, %s(72)
-
-Arg value
-Error: 2 - base64_encode() expects parameter 1 to be string, object given, %s(73)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/standard/tests/url/parse_url_variation_001.phpt b/ext/standard/tests/url/parse_url_variation_001.phpt
deleted file mode 100644
index 6c492e36f1..0000000000
--- a/ext/standard/tests/url/parse_url_variation_001.phpt
+++ /dev/null
@@ -1,226 +0,0 @@
---TEST--
-Test parse_url() function : usage variations - unexpected type for arg 1.
---FILE--
-<?php
-/* Prototype : proto mixed parse_url(string url, [int url_component])
- * Description: Parse a URL and return its components
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing parse_url() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for url
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( parse_url($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing parse_url() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(60)
-Error: 8 - Undefined variable: unset_var, %s(63)
-
-Arg value 0
-array(1) {
- ["path"]=>
- string(1) "0"
-}
-
-Arg value 1
-array(1) {
- ["path"]=>
- string(1) "1"
-}
-
-Arg value 12345
-array(1) {
- ["path"]=>
- string(5) "12345"
-}
-
-Arg value -2345
-array(1) {
- ["path"]=>
- string(5) "-2345"
-}
-
-Arg value 10.5
-array(1) {
- ["path"]=>
- string(4) "10.5"
-}
-
-Arg value -10.5
-array(1) {
- ["path"]=>
- string(5) "-10.5"
-}
-
-Arg value 101234567000
-array(1) {
- ["path"]=>
- string(12) "101234567000"
-}
-
-Arg value 1.07654321E-9
-array(1) {
- ["path"]=>
- string(13) "1.07654321E-9"
-}
-
-Arg value 0.5
-array(1) {
- ["path"]=>
- string(3) "0.5"
-}
-Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
-NULL
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-
-Arg value 1
-array(1) {
- ["path"]=>
- string(1) "1"
-}
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-
-Arg value 1
-array(1) {
- ["path"]=>
- string(1) "1"
-}
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-Error: 4096 - Object of class stdClass could not be converted to string, %s(69)
-
-Arg value
-Error: 2 - parse_url() expects parameter 1 to be string, object given, %s(70)
-NULL
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-
-Arg value
-array(1) {
- ["path"]=>
- string(0) ""
-}
-Done
diff --git a/ext/standard/tests/url/parse_url_variation_002_32bit.phpt b/ext/standard/tests/url/parse_url_variation_002_32bit.phpt
deleted file mode 100644
index 70138ffe77..0000000000
--- a/ext/standard/tests/url/parse_url_variation_002_32bit.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-Test parse_url() function : usage variations - unexpected type for arg 2.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); ?>
---FILE--
-<?php
-/* Prototype : proto mixed parse_url(string url, [int url_component])
- * Description: Parse a URL and return its components
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing parse_url() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for url_component
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( parse_url($url, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing parse_url() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(%d)
-Error: 8 - Undefined variable: unset_var, %s(%d)
-
-Arg value 10.5
-Error: 2 - parse_url(): Invalid URL component identifier 10, %s(%d)
-bool(false)
-
-Arg value -10.5
-array(8) {
- ["scheme"]=>
- string(4) "http"
- ["host"]=>
- string(11) "www.php.net"
- ["port"]=>
- int(80)
- ["user"]=>
- string(6) "secret"
- ["pass"]=>
- string(7) "hideout"
- ["path"]=>
- string(10) "/index.php"
- ["query"]=>
- string(31) "test=1&test2=char&test3=mixesCI"
- ["fragment"]=>
- string(16) "some_page_ref123"
-}
-
-Arg value 101234567000
-Error: 2 - parse_url() expects parameter 2 to be int, float given, %s(%d)
-NULL
-
-Arg value 1.07654321E-9
-string(4) "http"
-
-Arg value 0.5
-string(4) "http"
-Error: 8 - Array to string conversion, %s(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %s(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %s(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %s(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d)
-NULL
-Error: 8 - Array to string conversion, %s(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
-Arg value
-string(4) "http"
-
-Arg value
-string(4) "http"
-
-Arg value 1
-string(%d) "www.php.net"
-
-Arg value
-string(4) "http"
-
-Arg value 1
-string(%d) "www.php.net"
-
-Arg value
-string(4) "http"
-
-Arg value
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
-Arg value
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
-Arg value string
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
-Arg value string
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d)
-NULL
-Error: 4096 - Object of class stdClass could not be converted to string, %s(%d)
-
-Arg value
-Error: 2 - parse_url() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
-Arg value
-string(4) "http"
-
-Arg value
-string(4) "http"
-Done
diff --git a/ext/standard/tests/url/parse_url_variation_002_64bit.phpt b/ext/standard/tests/url/parse_url_variation_002_64bit.phpt
deleted file mode 100644
index 69ebe274b5..0000000000
--- a/ext/standard/tests/url/parse_url_variation_002_64bit.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-Test parse_url() function : usage variations - unexpected type for arg 2.
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
---FILE--
-<?php
-/* Prototype : proto mixed parse_url(string url, [int url_component])
- * Description: Parse a URL and return its components
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing parse_url() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for url_component
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( parse_url($url, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing parse_url() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(61)
-Error: 8 - Undefined variable: unset_var, %s(64)
-
-Arg value 10.5
-Error: 2 - parse_url(): Invalid URL component identifier 10, %s(71)
-bool(false)
-
-Arg value -10.5
-array(8) {
- ["scheme"]=>
- string(4) "http"
- ["host"]=>
- string(11) "www.php.net"
- ["port"]=>
- int(80)
- ["user"]=>
- string(6) "secret"
- ["pass"]=>
- string(7) "hideout"
- ["path"]=>
- string(10) "/index.php"
- ["query"]=>
- string(31) "test=1&test2=char&test3=mixesCI"
- ["fragment"]=>
- string(16) "some_page_ref123"
-}
-
-Arg value 101234567000
-Error: 2 - parse_url(): Invalid URL component identifier %d, %s(71)
-bool(false)
-
-Arg value 1.07654321E-9
-string(4) "http"
-
-Arg value 0.5
-string(4) "http"
-Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71)
-NULL
-Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
-
-Arg value Array
-Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71)
-NULL
-
-Arg value
-string(4) "http"
-
-Arg value
-string(4) "http"
-
-Arg value 1
-string(11) "www.php.net"
-
-Arg value
-string(4) "http"
-
-Arg value 1
-string(11) "www.php.net"
-
-Arg value
-string(4) "http"
-
-Arg value
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71)
-NULL
-
-Arg value
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71)
-NULL
-
-Arg value string
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71)
-NULL
-
-Arg value string
-Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71)
-NULL
-Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
-
-Arg value
-Error: 2 - parse_url() expects parameter 2 to be int, object given, %s(71)
-NULL
-
-Arg value
-string(4) "http"
-
-Arg value
-string(4) "http"
-Done
diff --git a/ext/standard/tests/url/rawurldecode_variation_001.phpt b/ext/standard/tests/url/rawurldecode_variation_001.phpt
deleted file mode 100644
index 40b96c775d..0000000000
--- a/ext/standard/tests/url/rawurldecode_variation_001.phpt
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test rawurldecode() function : usage variations - unexpected type for arg 1.
---FILE--
-<?php
-/* Prototype : proto string rawurldecode(string str)
- * Description: Decodes URL-encodes string
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-// NB: basic functionality tested in tests/strings/001.phpt
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing rawurldecode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( rawurldecode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing rawurldecode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(64)
-Error: 8 - Undefined variable: unset_var, %s(67)
-
-Arg value 0
-string(1) "0"
-
-Arg value 1
-string(1) "1"
-
-Arg value 12345
-string(5) "12345"
-
-Arg value -2345
-string(5) "-2345"
-
-Arg value 10.5
-string(4) "10.5"
-
-Arg value -10.5
-string(5) "-10.5"
-
-Arg value 101234567000
-string(12) "101234567000"
-
-Arg value 1.07654321E-9
-string(13) "1.07654321E-9"
-
-Arg value 0.5
-string(3) "0.5"
-Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
-
-Arg value
-Error: 2 - rawurldecode() expects parameter 1 to be string, object given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/standard/tests/url/rawurlencode_variation_001.phpt b/ext/standard/tests/url/rawurlencode_variation_001.phpt
deleted file mode 100644
index 105eec6887..0000000000
--- a/ext/standard/tests/url/rawurlencode_variation_001.phpt
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test rawurlencode() function : usage variations - unexpected type for arg 1.
---FILE--
-<?php
-/* Prototype : proto string rawurlencode(string str)
- * Description: URL-encodes string
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-// NB: basic functionality tested in tests/strings/001.phpt
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing rawurlencode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( rawurlencode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing rawurlencode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(64)
-Error: 8 - Undefined variable: unset_var, %s(67)
-
-Arg value 0
-string(1) "0"
-
-Arg value 1
-string(1) "1"
-
-Arg value 12345
-string(5) "12345"
-
-Arg value -2345
-string(5) "-2345"
-
-Arg value 10.5
-string(4) "10.5"
-
-Arg value -10.5
-string(5) "-10.5"
-
-Arg value 101234567000
-string(12) "101234567000"
-
-Arg value 1.07654321E-9
-string(13) "1.07654321E-9"
-
-Arg value 0.5
-string(3) "0.5"
-Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
-
-Arg value
-Error: 2 - rawurlencode() expects parameter 1 to be string, object given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/standard/tests/url/urldecode_variation_001.phpt b/ext/standard/tests/url/urldecode_variation_001.phpt
deleted file mode 100644
index 617648b9e4..0000000000
--- a/ext/standard/tests/url/urldecode_variation_001.phpt
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test urldecode() function : usage variations - <type here specifics of this variation>
---FILE--
-<?php
-/* Prototype : proto string urldecode(string str)
- * Description: Decodes URL-encoded string
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-// NB: basic functionality tested in tests/strings/001.phpt
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing urldecode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( urldecode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing urldecode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(64)
-Error: 8 - Undefined variable: unset_var, %s(67)
-
-Arg value 0
-string(1) "0"
-
-Arg value 1
-string(1) "1"
-
-Arg value 12345
-string(5) "12345"
-
-Arg value -2345
-string(5) "-2345"
-
-Arg value 10.5
-string(4) "10.5"
-
-Arg value -10.5
-string(5) "-10.5"
-
-Arg value 101234567000
-string(12) "101234567000"
-
-Arg value 1.07654321E-9
-string(13) "1.07654321E-9"
-
-Arg value 0.5
-string(3) "0.5"
-Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
-
-Arg value
-Error: 2 - urldecode() expects parameter 1 to be string, object given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/standard/tests/url/urlencode_variation_001.phpt b/ext/standard/tests/url/urlencode_variation_001.phpt
deleted file mode 100644
index 9c5296f1c5..0000000000
--- a/ext/standard/tests/url/urlencode_variation_001.phpt
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test urlencode() function : usage variations - <type here specifics of this variation>
---FILE--
-<?php
-/* Prototype : proto string urlencode(string str)
- * Description: URL-encodes string
- * Source code: ext/standard/url.c
- * Alias to functions:
- */
-
-// NB: basic functionality tested in tests/strings/001.phpt
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
-}
-set_error_handler('test_error_handler');
-
-echo "*** Testing urlencode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new stdclass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( urlencode($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing urlencode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(64)
-Error: 8 - Undefined variable: unset_var, %s(67)
-
-Arg value 0
-string(1) "0"
-
-Arg value 1
-string(1) "1"
-
-Arg value 12345
-string(5) "12345"
-
-Arg value -2345
-string(5) "-2345"
-
-Arg value 10.5
-string(4) "10.5"
-
-Arg value -10.5
-string(5) "-10.5"
-
-Arg value 101234567000
-string(12) "101234567000"
-
-Arg value 1.07654321E-9
-string(13) "1.07654321E-9"
-
-Arg value 0.5
-string(3) "0.5"
-Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d)
-
-Arg value Array
-Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value 1
-string(1) "1"
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
-
-Arg value
-Error: 2 - urlencode() expects parameter 1 to be string, object given, %s(74)
-NULL
-
-Arg value
-string(0) ""
-
-Arg value
-string(0) ""
-Done
diff --git a/ext/tokenizer/tests/token_get_all_variation1.phpt b/ext/tokenizer/tests/token_get_all_variation1.phpt
deleted file mode 100644
index 14ece715eb..0000000000
--- a/ext/tokenizer/tests/token_get_all_variation1.phpt
+++ /dev/null
@@ -1,287 +0,0 @@
---TEST--
-Test token_get_all() function : usage variations - unexpected values for 'source' argument
---SKIPIF--
-<?php if (!extension_loaded("tokenizer")) print "skip"; ?>
---FILE--
-<?php
-/* Prototype : array token_get_all(string $source)
- * Description: splits the given source into an array of PHP languange tokens
- * Source code: ext/tokenizer/tokenizer.c
-*/
-
-/*
- * Passing different scalar/non-scalar values in place of 'source' argument
- * It returns either T_INLINE_HTML by converting values into string or gives warning
-*/
-
-echo "*** Testing token_get_all() : unexpected values for 'source' argument ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// class definition
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-// get resource
-$fp = fopen(__FILE__, 'r');
-
-// different scalar/nonscalar values for 'source'
-$source_values = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 10.1234567e8,
- 10.7654321E-8,
- .5,
-
- // array data
-/*10*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*15*/ NULL,
- null,
-
- // boolean data
-/*17*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty string
-/*21*/ "",
- '',
-
- // object data
-/*23*/ new MyClass(),
-
- // resource data
- $fp,
-
- // undefined data
- @$undefined_var,
-
- // unset data
-/*26*/ @$unset_var,
-);
-
-for($count = 0; $count < count($source_values); $count++) {
- echo "--Iteration ".($count + 1)." --\n";
- var_dump( token_get_all($source_values[$count]));
-};
-
-fclose($fp);
-echo "Done"
-?>
---EXPECTF--
-*** Testing token_get_all() : unexpected values for 'source' argument ***
---Iteration 1 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(1) "0"
- [2]=>
- int(1)
- }
-}
---Iteration 2 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(1) "1"
- [2]=>
- int(1)
- }
-}
---Iteration 3 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(5) "12345"
- [2]=>
- int(1)
- }
-}
---Iteration 4 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(5) "-2345"
- [2]=>
- int(1)
- }
-}
---Iteration 5 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(4) "10.5"
- [2]=>
- int(1)
- }
-}
---Iteration 6 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(5) "-10.5"
- [2]=>
- int(1)
- }
-}
---Iteration 7 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(10) "1012345670"
- [2]=>
- int(1)
- }
-}
---Iteration 8 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(13) "1.07654321E-7"
- [2]=>
- int(1)
- }
-}
---Iteration 9 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(3) "0.5"
- [2]=>
- int(1)
- }
-}
---Iteration 10 --
-
-Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
-NULL
---Iteration 11 --
-
-Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
-NULL
---Iteration 12 --
-
-Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
-NULL
---Iteration 13 --
-
-Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
-NULL
---Iteration 14 --
-
-Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
-NULL
---Iteration 15 --
-array(0) {
-}
---Iteration 16 --
-array(0) {
-}
---Iteration 17 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(1) "1"
- [2]=>
- int(1)
- }
-}
---Iteration 18 --
-array(0) {
-}
---Iteration 19 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(1) "1"
- [2]=>
- int(1)
- }
-}
---Iteration 20 --
-array(0) {
-}
---Iteration 21 --
-array(0) {
-}
---Iteration 22 --
-array(0) {
-}
---Iteration 23 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- string(6) "object"
- [2]=>
- int(1)
- }
-}
---Iteration 24 --
-
-Warning: token_get_all() expects parameter 1 to be string, resource given in %s on line %d
-NULL
---Iteration 25 --
-array(0) {
-}
---Iteration 26 --
-array(0) {
-}
-Done
diff --git a/ext/xml/tests/xml_error_string_variation1.phpt b/ext/xml/tests/xml_error_string_variation1.phpt
deleted file mode 100644
index 7143e871ad..0000000000
--- a/ext/xml/tests/xml_error_string_variation1.phpt
+++ /dev/null
@@ -1,177 +0,0 @@
---TEST--
-Test xml_error_string() function : usage variations - test different types for code
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto string xml_error_string(int code)
- * Description: Get XML parser error string
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_error_string() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for code
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_error_string($value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_error_string() : usage variations ***
-
-Arg value 10.5
-string(22) "XML_ERR_CHARREF_AT_EOF"
-
-Arg value -10.5
-string(7) "Unknown"
-
-Arg value 101234567000
-string(7) "Unknown"
-
-Arg value 1.07654321E-9
-string(8) "No error"
-
-Arg value 0.5
-string(8) "No error"
-
-Arg value Array
-
-Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Arg value
-string(8) "No error"
-
-Arg value
-string(8) "No error"
-
-Arg value 1
-string(9) "No memory"
-
-Arg value
-string(8) "No error"
-
-Arg value 1
-string(9) "No memory"
-
-Arg value
-string(8) "No error"
-
-Arg value
-
-Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_error_string() expects parameter 1 to be int, object given in %s on line %d
-NULL
-
-Arg value
-string(8) "No error"
-
-Arg value
-string(8) "No error"
-Done
diff --git a/ext/xml/tests/xml_get_current_byte_index_variation1.phpt b/ext/xml/tests/xml_get_current_byte_index_variation1.phpt
deleted file mode 100644
index 87740185d9..0000000000
--- a/ext/xml/tests/xml_get_current_byte_index_variation1.phpt
+++ /dev/null
@@ -1,239 +0,0 @@
---TEST--
-Test xml_get_current_byte_index() function : usage variations - <type here specifics of this variation>
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_get_current_byte_index(resource parser)
- * Description: Get current byte index for an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_get_current_byte_index() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_get_current_byte_index($value) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_get_current_byte_index() : usage variations ***
-
-Arg value 0
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_get_current_byte_index(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_get_current_column_number_variation1.phpt b/ext/xml/tests/xml_get_current_column_number_variation1.phpt
deleted file mode 100644
index 2fde617f60..0000000000
--- a/ext/xml/tests/xml_get_current_column_number_variation1.phpt
+++ /dev/null
@@ -1,240 +0,0 @@
---TEST--
-Test xml_get_current_column_number() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_get_current_column_number(resource parser)
- * Description: Get current column number for an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-
-echo "*** Testing xml_get_current_column_number() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_get_current_column_number($value) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_get_current_column_number() : usage variations ***
-
-Arg value 0
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_get_current_column_number(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_get_current_line_number_variation1.phpt b/ext/xml/tests/xml_get_current_line_number_variation1.phpt
deleted file mode 100644
index 6155c0696c..0000000000
--- a/ext/xml/tests/xml_get_current_line_number_variation1.phpt
+++ /dev/null
@@ -1,239 +0,0 @@
---TEST--
-Test xml_get_current_line_number() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_get_current_line_number(resource parser)
- * Description: Get current line number for an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_get_current_line_number() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_get_current_line_number($value) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_get_current_line_number() : usage variations ***
-
-Arg value 0
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_get_current_line_number(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_get_error_code_variation1.phpt b/ext/xml/tests/xml_get_error_code_variation1.phpt
deleted file mode 100644
index 73feae24c2..0000000000
--- a/ext/xml/tests/xml_get_error_code_variation1.phpt
+++ /dev/null
@@ -1,239 +0,0 @@
---TEST--
-Test xml_get_error_code() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_get_error_code(resource parser)
- * Description: Get XML parser error code
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_get_error_code() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_get_error_code($value) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_get_error_code() : usage variations ***
-
-Arg value 0
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_get_error_code(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_parse_into_struct_variation1.phpt b/ext/xml/tests/xml_parse_into_struct_variation1.phpt
deleted file mode 100644
index 811f4c8a3c..0000000000
--- a/ext/xml/tests/xml_parse_into_struct_variation1.phpt
+++ /dev/null
@@ -1,240 +0,0 @@
---TEST--
-Test xml_parse_into_struct() function : usage variations - different types for parser
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parse_into_struct(resource parser, string data, array &struct, array &index)
- * Description: Parsing a XML document
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parse_into_struct() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$data = 'string_val';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parse_into_struct($value, $data, $struct, $index) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parse_into_struct() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_parse_into_struct(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_parse_variation1.phpt b/ext/xml/tests/xml_parse_variation1.phpt
deleted file mode 100644
index d902fab34f..0000000000
--- a/ext/xml/tests/xml_parse_variation1.phpt
+++ /dev/null
@@ -1,241 +0,0 @@
---TEST--
-Test xml_parse() function : usage variations - different types of parser
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parse(resource parser, string data [, int isFinal])
- * Description: Start parsing an XML document
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parse() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$data = 'string_val';
-$isFinal = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parse($value, $data, $isFinal) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parse() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parse() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_parse(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_parser_create_ns_variation1.phpt b/ext/xml/tests/xml_parser_create_ns_variation1.phpt
deleted file mode 100644
index 430bebe676..0000000000
--- a/ext/xml/tests/xml_parser_create_ns_variation1.phpt
+++ /dev/null
@@ -1,245 +0,0 @@
---TEST--
-Test xml_parser_create_ns() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto resource xml_parser_create_ns([string encoding [, string sep]])
- * Description: Create an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_create_ns() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
- "ISO-8859-1",
- "UTF-8",
- "US-ASCII",
- "UTF-32",
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for encoding
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- $res = xml_parser_create_ns($value);
- var_dump($res);
- if ($res !== false) {
- xml_parser_free($res);
- }
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_create_ns() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parser_create_ns(): unsupported source encoding "0" in %s on line %d
-bool(false)
-
-Arg value 1
-
-Warning: xml_parser_create_ns(): unsupported source encoding "1" in %s on line %d
-bool(false)
-
-Arg value 12345
-
-Warning: xml_parser_create_ns(): unsupported source encoding "12345" in %s on line %d
-bool(false)
-
-Arg value -2345
-
-Warning: xml_parser_create_ns(): unsupported source encoding "-2345" in %s on line %d
-bool(false)
-
-Arg value 10.5
-
-Warning: xml_parser_create_ns(): unsupported source encoding "10.5" in %s on line %d
-bool(false)
-
-Arg value -10.5
-
-Warning: xml_parser_create_ns(): unsupported source encoding "-10.5" in %s on line %d
-bool(false)
-
-Arg value 101234567000
-
-Warning: xml_parser_create_ns(): unsupported source encoding "101234567000" in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_create_ns(): unsupported source encoding "1.07654321E-9" in %s on line %d
-bool(false)
-
-Arg value 0.5
-
-Warning: xml_parser_create_ns(): unsupported source encoding "0.5" in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value 1
-
-Warning: xml_parser_create_ns(): unsupported source encoding "1" in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value 1
-
-Warning: xml_parser_create_ns(): unsupported source encoding "1" in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value string
-
-Warning: xml_parser_create_ns(): unsupported source encoding "string" in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: xml_parser_create_ns(): unsupported source encoding "string" in %s on line %d
-bool(false)
-
-Arg value ISO-8859-1
-resource(%d) of type (xml)
-
-Arg value UTF-8
-resource(%d) of type (xml)
-
-Arg value US-ASCII
-resource(%d) of type (xml)
-
-Arg value UTF-32
-
-Warning: xml_parser_create_ns(): unsupported source encoding "UTF-32" in %s on line %d
-bool(false)
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_create_ns(): unsupported source encoding "Some Ascii Data" in %s on line %d
-bool(false)
-
-Arg value Resource id %s
-
-Warning: xml_parser_create_ns() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-Done
diff --git a/ext/xml/tests/xml_parser_create_variation1.phpt b/ext/xml/tests/xml_parser_create_variation1.phpt
deleted file mode 100644
index 347ff26514..0000000000
--- a/ext/xml/tests/xml_parser_create_variation1.phpt
+++ /dev/null
@@ -1,245 +0,0 @@
---TEST--
-Test xml_parser_create() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto resource xml_parser_create([string encoding])
- * Description: Create an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_create() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
- "ISO-8859-1",
- "UTF-8",
- "US-ASCII",
- "UTF-32",
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for encoding
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- $res = xml_parser_create($value);
- var_dump($res);
- if ($res !== false) {
- xml_parser_free($res);
- }
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_create() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parser_create(): unsupported source encoding "0" in %s on line %d
-bool(false)
-
-Arg value 1
-
-Warning: xml_parser_create(): unsupported source encoding "1" in %s on line %d
-bool(false)
-
-Arg value 12345
-
-Warning: xml_parser_create(): unsupported source encoding "12345" in %s on line %d
-bool(false)
-
-Arg value -2345
-
-Warning: xml_parser_create(): unsupported source encoding "-2345" in %s on line %d
-bool(false)
-
-Arg value 10.5
-
-Warning: xml_parser_create(): unsupported source encoding "10.5" in %s on line %d
-bool(false)
-
-Arg value -10.5
-
-Warning: xml_parser_create(): unsupported source encoding "-10.5" in %s on line %d
-bool(false)
-
-Arg value 101234567000
-
-Warning: xml_parser_create(): unsupported source encoding "101234567000" in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_create(): unsupported source encoding "1.07654321E-9" in %s on line %d
-bool(false)
-
-Arg value 0.5
-
-Warning: xml_parser_create(): unsupported source encoding "0.5" in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value 1
-
-Warning: xml_parser_create(): unsupported source encoding "1" in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value 1
-
-Warning: xml_parser_create(): unsupported source encoding "1" in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value string
-
-Warning: xml_parser_create(): unsupported source encoding "string" in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: xml_parser_create(): unsupported source encoding "string" in %s on line %d
-bool(false)
-
-Arg value ISO-8859-1
-resource(%d) of type (xml)
-
-Arg value UTF-8
-resource(%d) of type (xml)
-
-Arg value US-ASCII
-resource(%d) of type (xml)
-
-Arg value UTF-32
-
-Warning: xml_parser_create(): unsupported source encoding "UTF-32" in %s on line %d
-bool(false)
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_create(): unsupported source encoding "Some Ascii Data" in %s on line %d
-bool(false)
-
-Arg value Resource id %s
-
-Warning: xml_parser_create() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-
-Arg value
-resource(%d) of type (xml)
-
-Arg value
-resource(%d) of type (xml)
-Done
diff --git a/ext/xml/tests/xml_parser_free_variation1.phpt b/ext/xml/tests/xml_parser_free_variation1.phpt
deleted file mode 100644
index 1e91e452eb..0000000000
--- a/ext/xml/tests/xml_parser_free_variation1.phpt
+++ /dev/null
@@ -1,239 +0,0 @@
---TEST--
-Test xml_parser_free() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parser_free(resource parser)
- * Description: Free an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_free() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parser_free($value) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_free() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_free() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_parser_free(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_parser_get_option_variation1.phpt b/ext/xml/tests/xml_parser_get_option_variation1.phpt
deleted file mode 100644
index c45644b561..0000000000
--- a/ext/xml/tests/xml_parser_get_option_variation1.phpt
+++ /dev/null
@@ -1,240 +0,0 @@
---TEST--
-Test xml_parser_get_option() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parser_get_option(resource parser, int option)
- * Description: Get options from an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_get_option() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$option = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parser_get_option($value, $option) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_get_option() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_parser_get_option(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_parser_get_option_variation2.phpt b/ext/xml/tests/xml_parser_get_option_variation2.phpt
deleted file mode 100644
index eb965b7a8d..0000000000
--- a/ext/xml/tests/xml_parser_get_option_variation2.phpt
+++ /dev/null
@@ -1,225 +0,0 @@
---TEST--
-Test xml_parser_get_option() function : usage variations
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parser_get_option(resource parser, int option)
- * Description: Get options from an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_get_option() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$parser = xml_parser_create();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // outside of range int data
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for option
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parser_get_option($parser, $value) );
-};
-
-fclose($fp);
-xml_parser_free($parser);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_get_option() : usage variations ***
-
-Arg value 12345
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value -2345
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 10.5
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value -10.5
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 101234567000
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 0.5
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 1
-int(1)
-
-Arg value
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 1
-int(1)
-
-Arg value
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_parser_get_option() expects parameter 2 to be int, resource given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_get_option(): Unknown option in %s on line %d
-bool(false)
-Done
diff --git a/ext/xml/tests/xml_parser_set_option_variation1.phpt b/ext/xml/tests/xml_parser_set_option_variation1.phpt
deleted file mode 100644
index 23a24d58b9..0000000000
--- a/ext/xml/tests/xml_parser_set_option_variation1.phpt
+++ /dev/null
@@ -1,240 +0,0 @@
---TEST--
-Test xml_parser_set_option() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parser_set_option(resource parser, int option, mixed value)
- * Description: Set options in an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_set_option() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$option = 10;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parser_set_option($value, $option, 1) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_set_option() : usage variations ***
-
-Arg value 0
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_parser_set_option(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_parser_set_option_variation2.phpt b/ext/xml/tests/xml_parser_set_option_variation2.phpt
deleted file mode 100644
index b2c49806d1..0000000000
--- a/ext/xml/tests/xml_parser_set_option_variation2.phpt
+++ /dev/null
@@ -1,215 +0,0 @@
---TEST--
-Test xml_parser_set_option() function : usage variations
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_parser_set_option(resource parser, int option, mixed value)
- * Description: Set options in an XML parser
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_parser_set_option() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$parser = xml_parser_create();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // outside of range int data
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for option
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_parser_set_option($parser, $value, 1) );
-};
-
-xml_parser_free($parser);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_parser_set_option() : usage variations ***
-
-Arg value 12345
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value -2345
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 10.5
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value -10.5
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 101234567000
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 0.5
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 1
-bool(true)
-
-Arg value
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value 1
-bool(true)
-
-Arg value
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_parser_set_option() expects parameter 2 to be int, object given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_parser_set_option(): Unknown option in %s on line %d
-bool(false)
-Done
diff --git a/ext/xml/tests/xml_set_character_data_handler_variation1.phpt b/ext/xml/tests/xml_set_character_data_handler_variation1.phpt
deleted file mode 100644
index 3291853f0c..0000000000
--- a/ext/xml/tests/xml_set_character_data_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_character_data_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_character_data_handler(resource parser, string hdl)
- * Description: Set up character data handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_character_data_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_character_data_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_character_data_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_character_data_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_default_handler_variation1.phpt b/ext/xml/tests/xml_set_default_handler_variation1.phpt
deleted file mode 100644
index 8ce13842a2..0000000000
--- a/ext/xml/tests/xml_set_default_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_default_handler() function : usage variations - test different types for parser
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_default_handler(resource parser, string hdl)
- * Description: Set up default handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_default_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_default_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_default_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_default_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_element_handler_variation1.phpt b/ext/xml/tests/xml_set_element_handler_variation1.phpt
deleted file mode 100644
index 258b676d99..0000000000
--- a/ext/xml/tests/xml_set_element_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_element_handler() function : usage variations - test different types for parser
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_element_handler(resource parser, string shdl, string ehdl)
- * Description: Set up start and end element handlers
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_element_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_element_handler($value, $hdl, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_element_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_element_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt
deleted file mode 100644
index 67b25356f6..0000000000
--- a/ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_end_namespace_decl_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_end_namespace_decl_handler(resource parser, string hdl)
- * Description: Set up character data handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_end_namespace_decl_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_end_namespace_decl_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_end_namespace_decl_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_end_namespace_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt b/ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt
deleted file mode 100644
index 1d628b9a0c..0000000000
--- a/ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_external_entity_ref_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_external_entity_ref_handler(resource parser, string hdl)
- * Description: Set up external entity reference handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_external_entity_ref_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_external_entity_ref_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_external_entity_ref_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_external_entity_ref_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt
deleted file mode 100644
index 1c4bdf1ffb..0000000000
--- a/ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_notation_decl_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_notation_decl_handler(resource parser, string hdl)
- * Description: Set up notation declaration handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_notation_decl_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_notation_decl_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_notation_decl_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_notation_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_object_variation1.phpt b/ext/xml/tests/xml_set_object_variation1.phpt
deleted file mode 100644
index 5d34d03b09..0000000000
--- a/ext/xml/tests/xml_set_object_variation1.phpt
+++ /dev/null
@@ -1,240 +0,0 @@
---TEST--
-Test xml_set_object() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_object(resource parser, object &obj)
- * Description: Set up object which should be used for callbacks
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_object() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-// Initialise function arguments not being substituted (if any)
-$obj = new aClass();
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_object($value, $obj) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_object() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_object() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_object(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_object_variation2.phpt b/ext/xml/tests/xml_set_object_variation2.phpt
deleted file mode 100644
index f2a064d217..0000000000
--- a/ext/xml/tests/xml_set_object_variation2.phpt
+++ /dev/null
@@ -1,229 +0,0 @@
---TEST--
-Test xml_set_object() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_object(resource parser, object &obj)
- * Description: Set up object which should be used for callbacks
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_object() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-// Initialise function arguments not being substituted (if any)
-
-$parser = xml_parser_create();
-$fp = fopen(__FILE__, "r");
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for obj
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_object($parser, $value) );
-};
-
-xml_parser_free($parser);
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_object() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_object() expects parameter 2 to be object, resource given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt b/ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt
deleted file mode 100644
index 8b2ea91444..0000000000
--- a/ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_processing_instruction_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_processing_instruction_handler(resource parser, string hdl)
- * Description: Set up processing instruction (PI) handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_processing_instruction_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_processing_instruction_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_processing_instruction_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_processing_instruction_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt
deleted file mode 100644
index 472e8a3eaa..0000000000
--- a/ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_start_namespace_decl_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_start_namespace_decl_handler(resource parser, string hdl)
- * Description: Set up character data handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_start_namespace_decl_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_start_namespace_decl_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_start_namespace_decl_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_start_namespace_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt
deleted file mode 100644
index 6d94c656ec..0000000000
--- a/ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test xml_set_unparsed_entity_decl_handler() function : usage variations
---SKIPIF--
-<?php
-if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)
- * Description: Set up unparsed entity declaration handler
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
-
-echo "*** Testing xml_set_unparsed_entity_decl_handler() : usage variations ***\n";
-error_reporting(E_ALL & ~E_NOTICE);
-
-class aClass {
- function __toString() {
- return "Some Ascii Data";
- }
-}
-
-function validHandler(resource $parser ,string $data) {
-}
-
-// Initialise function arguments not being substituted (if any)
-$hdl = 'validHandler';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-$fp = fopen(__FILE__, "r");
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new aClass(),
-
- // resource data
- $fp,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-);
-
-// loop through each element of the array for parser
-
-foreach($values as $value) {
- echo @"\nArg value $value \n";
- var_dump( xml_set_unparsed_entity_decl_handler($value, $hdl) );
-};
-
-fclose($fp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing xml_set_unparsed_entity_decl_handler() : usage variations ***
-
-Arg value 0
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 12345
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value -2345
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d
-NULL
-
-Arg value 10.5
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value -10.5
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 101234567000
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 1.07654321E-9
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value 0.5
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value Array
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value 1
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value string
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Arg value Some Ascii Data
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, object given in %s on line %d
-NULL
-
-Arg value Resource id %s
-
-Warning: xml_set_unparsed_entity_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-Arg value
-
-Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-Done
diff --git a/ext/zlib/tests/gzopen_variation1.phpt b/ext/zlib/tests/gzopen_variation1.phpt
deleted file mode 100644
index 270758911f..0000000000
--- a/ext/zlib/tests/gzopen_variation1.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test gzopen() function : usage variation
---SKIPIF--
-<?php
-if (!extension_loaded("zlib")) {
- print "skip - zlib extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
- * Description: Open a .gz-file and return a .gz-file pointer
- * Source code: ext/zlib/zlib.c
- * Alias to functions:
- */
-
-echo "*** Testing gzopen() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$mode = 'r';
-$use_include_path = false;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for filename
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gzopen($value, $mode, $use_include_path) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gzopen() : usage variation ***
-
---int 0--
-Error: 2 - gzopen(0): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - gzopen(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - gzopen(12345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - gzopen(-2345): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - gzopen(10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - gzopen(-10.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - gzopen(123456789000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - gzopen(-123456789000): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - gzopen(0.5): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - gzopen(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - gzopen(1): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - gzopen(Class A object): failed to open stream: No such file or directory, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - gzopen() expects parameter 1 to be a valid path, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
-bool(false)
-
---resource--
-Error: 2 - gzopen() expects parameter 1 to be a valid path, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/zlib/tests/gzopen_variation2.phpt b/ext/zlib/tests/gzopen_variation2.phpt
deleted file mode 100644
index 1fd08455eb..0000000000
--- a/ext/zlib/tests/gzopen_variation2.phpt
+++ /dev/null
@@ -1,227 +0,0 @@
---TEST--
-Test gzopen() function : usage variation
---SKIPIF--
-<?php
-if (!extension_loaded("zlib")) {
- print "skip - zlib extension not loaded";
-}
-?>
---FILE--
-<?php
-/* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
- * Description: Open a .gz-file and return a .gz-file pointer
- * Source code: ext/zlib/zlib.c
- * Alias to functions:
- */
-
-echo "*** Testing gzopen() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = dirname(__FILE__)."/004.txt.gz";
-$use_include_path = false;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for mode
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( gzopen($filename, $value, $use_include_path) );
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gzopen() : usage variation ***
-
---int 0--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---int 1--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---int 12345--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---int -12345--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---float 10.5--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---float -10.5--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---float 12.3456789000e10--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---float -12.3456789000e10--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---float .5--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---empty array--
-Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---lowercase null--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---lowercase true--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---lowercase false--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---uppercase TRUE--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---uppercase FALSE--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---empty string DQ--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---empty string SQ--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---instance of classWithToString--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---instance of classWithoutToString--
-Error: 2 - gzopen() expects parameter 2 to be string, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---unset var--
-Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
-bool(false)
-
---resource--
-Error: 2 - gzopen() expects parameter 2 to be string, resource given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/zlib/tests/gzopen_variation3.phpt b/ext/zlib/tests/gzopen_variation3.phpt
deleted file mode 100644
index 824d4e333e..0000000000
--- a/ext/zlib/tests/gzopen_variation3.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test gzopen() function : usage variation
---SKIPIF--
-<?php
-if (!extension_loaded("zlib")) {
- print "skip - zlib extension not loaded";
-}
-if (PHP_INT_SIZE != 8) die('skip 64-bit only');
-?>
---FILE--
-<?php
-/* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
- * Description: Open a .gz-file and return a .gz-file pointer
- * Source code: ext/zlib/zlib.c
- * Alias to functions:
- */
-
-echo "*** Testing gzopen() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$filename = dirname(__FILE__)."/004.txt.gz";
-$mode = 'r';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-
- // resource variable
- 'resource' => $fp
-);
-
-// loop through each element of the array for use_include_path
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- $res = gzopen($filename, $mode, $value);
- var_dump($res);
- if ($res === true) {
- gzclose($res);
- }
-};
-
-fclose($fp);
-
-?>
-===DONE===
---EXPECTF--
-*** Testing gzopen() : usage variation ***
-
---float 10.5--
-resource(%d) of type (stream)
-
---float -10.5--
-resource(%d) of type (stream)
-
---float 12.3456789000e10--
-resource(%d) of type (stream)
-
---float -12.3456789000e10--
-resource(%d) of type (stream)
-
---float .5--
-resource(%d) of type (stream)
-
---empty array--
-Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-resource(%d) of type (stream)
-
---lowercase null--
-resource(%d) of type (stream)
-
---lowercase true--
-resource(%d) of type (stream)
-
---lowercase false--
-resource(%d) of type (stream)
-
---uppercase TRUE--
-resource(%d) of type (stream)
-
---uppercase FALSE--
-resource(%d) of type (stream)
-
---empty string DQ--
-Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - gzopen() expects parameter 3 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - gzopen() expects parameter 3 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-resource(%d) of type (stream)
-
---unset var--
-resource(%d) of type (stream)
-
---resource--
-Error: 2 - gzopen() expects parameter 3 to be int, resource given, %s(%d)
-NULL
-===DONE===