summaryrefslogtreecommitdiff
path: root/ext/standard/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests')
-rw-r--r--ext/standard/tests/array/002.phpt44
-rw-r--r--ext/standard/tests/array/005.phpt24
-rw-r--r--ext/standard/tests/array/009.phpt125
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk.phpt21
-rw-r--r--ext/standard/tests/array/array_chunk2.phpt24
-rw-r--r--ext/standard/tests/array/array_chunk_variation10.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation11.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation12.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation13.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation14.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation15.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation16.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation17.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation18.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation19.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation20.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation21.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation22.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation23.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation24.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation25.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation26.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation27.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation28.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation29.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation30.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation31.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation32.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation5.phpt52
-rw-r--r--ext/standard/tests/array/array_chunk_variation8.phpt13
-rw-r--r--ext/standard/tests/array/array_chunk_variation9.phpt13
-rw-r--r--ext/standard/tests/array/array_column_error.phpt80
-rw-r--r--ext/standard/tests/array/array_combine_error2.phpt39
-rw-r--r--ext/standard/tests/array/array_combine_variation4.phpt16
-rw-r--r--ext/standard/tests/array/array_count_values2.phpt6
-rw-r--r--ext/standard/tests/array/array_diff_1.phpt8
-rw-r--r--ext/standard/tests/array/array_diff_assoc_error.phpt21
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation1.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation2.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_error.phpt20
-rw-r--r--ext/standard/tests/array/array_diff_key_error.phpt22
-rw-r--r--ext/standard/tests/array/array_diff_key_variation1.phpt226
-rw-r--r--ext/standard/tests/array/array_diff_key_variation2.phpt226
-rw-r--r--ext/standard/tests/array/array_diff_key_variation3.phpt232
-rw-r--r--ext/standard/tests/array/array_diff_key_variation4.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_key_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_key_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_key_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_key_variation8.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_error.phpt42
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation1.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation10.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation11.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation12.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation13.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation2.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation4.phpt246
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation8.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_variation9.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation1.phpt226
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation10.phpt32
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation2.phpt226
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation3.phpt240
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation8.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation9.phpt2
-rw-r--r--ext/standard/tests/array/array_diff_variation1.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_variation2.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_variation9.phpt28
-rw-r--r--ext/standard/tests/array/array_fill.phpt3
-rw-r--r--ext/standard/tests/array/array_fill_error.phpt45
-rw-r--r--ext/standard/tests/array/array_fill_keys.phpt5
-rw-r--r--ext/standard/tests/array/array_fill_keys_variation1.phpt2
-rw-r--r--ext/standard/tests/array/array_fill_keys_variation3.phpt20
-rw-r--r--ext/standard/tests/array/array_fill_keys_variation4.phpt2
-rw-r--r--ext/standard/tests/array/array_filter.phpt14
-rw-r--r--ext/standard/tests/array/array_filter_variation10.phpt17
-rw-r--r--ext/standard/tests/array/array_filter_variation9.phpt28
-rw-r--r--ext/standard/tests/array/array_flip.phpt6
-rw-r--r--ext/standard/tests/array/array_flip_variation4.phpt24
-rw-r--r--ext/standard/tests/array/array_intersect_assoc_error.phpt22
-rw-r--r--ext/standard/tests/array/array_intersect_assoc_variation1.phpt218
-rw-r--r--ext/standard/tests/array/array_intersect_assoc_variation2.phpt220
-rw-r--r--ext/standard/tests/array/array_intersect_assoc_variation9.phpt24
-rw-r--r--ext/standard/tests/array/array_intersect_error.phpt22
-rw-r--r--ext/standard/tests/array/array_intersect_key_error.phpt24
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation1.phpt226
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation2.phpt226
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation3.phpt235
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation4.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_key_variation8.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation1.phpt226
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation10.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation2.phpt226
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation3.phpt243
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_variation8.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation1.phpt226
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation2.phpt226
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation4.phpt321
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation8.phpt29
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation9.phpt2
-rw-r--r--ext/standard/tests/array/array_intersect_variation1.phpt218
-rw-r--r--ext/standard/tests/array/array_intersect_variation2.phpt220
-rw-r--r--ext/standard/tests/array/array_intersect_variation9.phpt80
-rw-r--r--ext/standard/tests/array/array_key_exists.phpt102
-rw-r--r--ext/standard/tests/array/array_key_exists_object1.phpt85
-rw-r--r--ext/standard/tests/array/array_key_exists_object2.phpt91
-rw-r--r--ext/standard/tests/array/array_key_exists_variation1.phpt50
-rw-r--r--ext/standard/tests/array/array_key_exists_variation3.phpt18
-rw-r--r--ext/standard/tests/array/array_keys_error.phpt42
-rw-r--r--ext/standard/tests/array/array_map_error.phpt13
-rw-r--r--ext/standard/tests/array/array_map_object1.phpt47
-rw-r--r--ext/standard/tests/array/array_map_object2.phpt20
-rw-r--r--ext/standard/tests/array/array_map_object3.phpt20
-rw-r--r--ext/standard/tests/array/array_map_variation10.phpt12
-rw-r--r--ext/standard/tests/array/array_map_variation12.phpt31
-rw-r--r--ext/standard/tests/array/array_map_variation14.phpt20
-rw-r--r--ext/standard/tests/array/array_map_variation15.phpt12
-rw-r--r--ext/standard/tests/array/array_map_variation16.phpt40
-rw-r--r--ext/standard/tests/array/array_map_variation17.phpt70
-rw-r--r--ext/standard/tests/array/array_map_variation4.phpt12
-rw-r--r--ext/standard/tests/array/array_merge.phpt18
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation1.phpt224
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation2.phpt108
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation4.phpt6
-rw-r--r--ext/standard/tests/array/array_merge_variation1.phpt131
-rw-r--r--ext/standard/tests/array/array_merge_variation2.phpt108
-rw-r--r--ext/standard/tests/array/array_multisort_basic1.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_basic2.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_case.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_error.phpt33
-rw-r--r--ext/standard/tests/array/array_multisort_incase.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_natural.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_natural_case.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_natural_incase.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_variation1.phpt89
-rw-r--r--ext/standard/tests/array/array_multisort_variation10.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_variation11.phpt3
-rw-r--r--ext/standard/tests/array/array_multisort_variation2.phpt94
-rw-r--r--ext/standard/tests/array/array_multisort_variation3.phpt92
-rw-r--r--ext/standard/tests/array/array_multisort_variation4.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_variation7.phpt2
-rw-r--r--ext/standard/tests/array/array_multisort_variation8.phpt4
-rw-r--r--ext/standard/tests/array/array_multisort_variation9.phpt2
-rw-r--r--ext/standard/tests/array/array_pad.phpt30
-rw-r--r--ext/standard/tests/array/array_product_variation1.phpt2
-rw-r--r--ext/standard/tests/array/array_product_variation2.phpt2
-rw-r--r--ext/standard/tests/array/array_product_variation3.phpt2
-rw-r--r--ext/standard/tests/array/array_product_variation4.phpt2
-rw-r--r--ext/standard/tests/array/array_push.phpt22
-rw-r--r--ext/standard/tests/array/array_push_error2.phpt11
-rw-r--r--ext/standard/tests/array/array_rand.phpt62
-rw-r--r--ext/standard/tests/array/array_rand_variation5.phpt48
-rw-r--r--ext/standard/tests/array/array_reduce_variation1.phpt2
-rw-r--r--ext/standard/tests/array/array_reduce_variation3.phpt2
-rw-r--r--ext/standard/tests/array/array_replace.phpt24
-rw-r--r--ext/standard/tests/array/array_reverse_variation4.phpt12
-rw-r--r--ext/standard/tests/array/array_search1.phpt9
-rw-r--r--ext/standard/tests/array/array_search_variation3.phpt20
-rw-r--r--ext/standard/tests/array/array_slice.phpt40
-rw-r--r--ext/standard/tests/array/array_slice_variation1.phpt20
-rw-r--r--ext/standard/tests/array/array_slice_variation11.phpt105
-rw-r--r--ext/standard/tests/array/array_slice_variation2.phpt303
-rw-r--r--ext/standard/tests/array/array_splice_basic.phpt19
-rw-r--r--ext/standard/tests/array/array_udiff_assoc_variation.phpt2
-rw-r--r--ext/standard/tests/array/array_udiff_assoc_variation1.phpt112
-rw-r--r--ext/standard/tests/array/array_udiff_assoc_variation2.phpt112
-rw-r--r--ext/standard/tests/array/array_udiff_assoc_variation4.phpt228
-rw-r--r--ext/standard/tests/array/array_udiff_assoc_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_udiff_uassoc_variation1.phpt112
-rw-r--r--ext/standard/tests/array/array_udiff_uassoc_variation2.phpt112
-rw-r--r--ext/standard/tests/array/array_udiff_uassoc_variation5.phpt229
-rw-r--r--ext/standard/tests/array/array_udiff_uassoc_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_udiff_variation1.phpt112
-rw-r--r--ext/standard/tests/array/array_udiff_variation2.phpt112
-rw-r--r--ext/standard/tests/array/array_udiff_variation4.phpt228
-rw-r--r--ext/standard/tests/array/array_udiff_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_uintersect_assoc_basic2.phpt2
-rw-r--r--ext/standard/tests/array/array_uintersect_assoc_variation1.phpt112
-rw-r--r--ext/standard/tests/array/array_uintersect_assoc_variation2.phpt112
-rw-r--r--ext/standard/tests/array/array_uintersect_assoc_variation4.phpt228
-rw-r--r--ext/standard/tests/array/array_uintersect_assoc_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt112
-rw-r--r--ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt112
-rw-r--r--ext/standard/tests/array/array_uintersect_uassoc_variation5.phpt229
-rw-r--r--ext/standard/tests/array/array_uintersect_uassoc_variation6.phpt2
-rw-r--r--ext/standard/tests/array/array_uintersect_variation1.phpt112
-rw-r--r--ext/standard/tests/array/array_uintersect_variation2.phpt112
-rw-r--r--ext/standard/tests/array/array_uintersect_variation4.phpt228
-rw-r--r--ext/standard/tests/array/array_uintersect_variation5.phpt2
-rw-r--r--ext/standard/tests/array/array_unique_variation3.phpt6
-rw-r--r--ext/standard/tests/array/array_unique_variation8.phpt8
-rw-r--r--ext/standard/tests/array/array_unshift.phpt9
-rw-r--r--ext/standard/tests/array/array_unshift_variation4.phpt12
-rw-r--r--ext/standard/tests/array/array_walk.phpt14
-rw-r--r--ext/standard/tests/array/array_walk_closure.phpt16
-rw-r--r--ext/standard/tests/array/array_walk_error2.phpt4
-rw-r--r--ext/standard/tests/array/array_walk_objects.phpt9
-rw-r--r--ext/standard/tests/array/array_walk_rec_objects.phpt9
-rw-r--r--ext/standard/tests/array/array_walk_recursive1.phpt14
-rw-r--r--ext/standard/tests/array/array_walk_recursive_error2.phpt4
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation7.phpt7
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation8.phpt10
-rw-r--r--ext/standard/tests/array/array_walk_variation7.phpt7
-rw-r--r--ext/standard/tests/array/array_walk_variation8.phpt10
-rw-r--r--ext/standard/tests/array/bug21918.phpt2
-rw-r--r--ext/standard/tests/array/bug30074.phpt4
-rw-r--r--ext/standard/tests/array/bug30266.phpt2
-rw-r--r--ext/standard/tests/array/bug31158.phpt4
-rw-r--r--ext/standard/tests/array/bug35014.phpt5
-rw-r--r--ext/standard/tests/array/bug35014_64bit.phpt5
-rw-r--r--ext/standard/tests/array/bug40191.phpt12
-rw-r--r--ext/standard/tests/array/bug42177.phpt10
-rw-r--r--ext/standard/tests/array/bug43495.phpt17
-rw-r--r--ext/standard/tests/array/bug61058.phpt11
-rw-r--r--ext/standard/tests/array/bug65251.phpt10
-rw-r--r--ext/standard/tests/array/bug67693.phpt4
-rw-r--r--ext/standard/tests/array/bug70713.phpt11
-rw-r--r--ext/standard/tests/array/bug71220.phpt12
-rw-r--r--ext/standard/tests/array/bug77395.phpt9
-rw-r--r--ext/standard/tests/array/bug77931.phpt28
-rw-r--r--ext/standard/tests/array/compact_variation1.phpt43
-rw-r--r--ext/standard/tests/array/compact_variation2.phpt2
-rw-r--r--ext/standard/tests/array/count_recursive.phpt28
-rw-r--r--ext/standard/tests/array/current_basic.phpt2
-rw-r--r--ext/standard/tests/array/current_variation2.phpt2
-rw-r--r--ext/standard/tests/array/current_variation3.phpt2
-rw-r--r--ext/standard/tests/array/current_variation4.phpt2
-rw-r--r--ext/standard/tests/array/current_variation5.phpt3
-rw-r--r--ext/standard/tests/array/each.phptbin9679 -> 0 bytes
-rw-r--r--ext/standard/tests/array/each_basic.phpt76
-rw-r--r--ext/standard/tests/array/each_error.phpt41
-rw-r--r--ext/standard/tests/array/each_variation1.phpt223
-rw-r--r--ext/standard/tests/array/each_variation2.phpt249
-rw-r--r--ext/standard/tests/array/each_variation3.phpt254
-rw-r--r--ext/standard/tests/array/each_variation4.phpt60
-rw-r--r--ext/standard/tests/array/each_variation5.phpt97
-rw-r--r--ext/standard/tests/array/each_variation6.phpt52
-rw-r--r--ext/standard/tests/array/end.phpt30
-rw-r--r--ext/standard/tests/array/end_64bit.phpt30
-rw-r--r--ext/standard/tests/array/end_basic.phpt2
-rw-r--r--ext/standard/tests/array/end_variation2.phpt2
-rw-r--r--ext/standard/tests/array/end_variation3.phpt2
-rw-r--r--ext/standard/tests/array/extract_error.phpt54
-rw-r--r--ext/standard/tests/array/extract_error_variation1.phpt14
-rw-r--r--ext/standard/tests/array/in_array_variation3.phpt20
-rw-r--r--ext/standard/tests/array/key_basic.phpt2
-rw-r--r--ext/standard/tests/array/key_variation2.phpt2
-rw-r--r--ext/standard/tests/array/key_variation3.phpt2
-rw-r--r--ext/standard/tests/array/key_variation4.phpt2
-rw-r--r--ext/standard/tests/array/max.phpt38
-rw-r--r--ext/standard/tests/array/max_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/array/min.phpt38
-rw-r--r--ext/standard/tests/array/min_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/array/negative_index.phpt31
-rw-r--r--ext/standard/tests/array/next_basic.phpt2
-rw-r--r--ext/standard/tests/array/next_variation2.phpt2
-rw-r--r--ext/standard/tests/array/prev_basic.phpt2
-rw-r--r--ext/standard/tests/array/prev_variation2.phpt2
-rw-r--r--ext/standard/tests/array/range_bug70239_0.phpt12
-rw-r--r--ext/standard/tests/array/range_bug70239_1.phpt12
-rw-r--r--ext/standard/tests/array/range_bug70239_2.phpt11
-rw-r--r--ext/standard/tests/array/range_bug70239_3.phpt11
-rw-r--r--ext/standard/tests/array/range_errors.phpt165
-rw-r--r--ext/standard/tests/array/range_variation.phpt19
-rw-r--r--ext/standard/tests/array/reset_basic.phpt2
-rw-r--r--ext/standard/tests/array/reset_variation2.phpt2
-rw-r--r--ext/standard/tests/array/reset_variation3.phpt2
-rw-r--r--ext/standard/tests/array/sizeof_variation4.phpt120
-rw-r--r--ext/standard/tests/array/uasort_variation8.phpt16
-rw-r--r--ext/standard/tests/array/usort_basic.phpt2
-rw-r--r--ext/standard/tests/array/usort_object1.phpt2
-rw-r--r--ext/standard/tests/array/usort_object2.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation10.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation3.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation4.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation5.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation6.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation7.phpt2
-rw-r--r--ext/standard/tests/array/usort_variation8.phpt20
-rw-r--r--ext/standard/tests/array/usort_variation9.phpt2
-rw-r--r--ext/standard/tests/assert/assert.phpt23
-rw-r--r--ext/standard/tests/assert/assert02.phpt64
-rw-r--r--ext/standard/tests/assert/assert03.phpt27
-rw-r--r--ext/standard/tests/assert/assert04.phpt16
-rw-r--r--ext/standard/tests/assert/assert_basic.phpt19
-rw-r--r--ext/standard/tests/assert/assert_basic1.phpt11
-rw-r--r--ext/standard/tests/assert/assert_basic2.phpt1
-rw-r--r--ext/standard/tests/assert/assert_basic3.phpt8
-rw-r--r--ext/standard/tests/assert/assert_basic4.phpt5
-rw-r--r--ext/standard/tests/assert/assert_basic5.phpt13
-rw-r--r--ext/standard/tests/assert/assert_basic6.phpt27
-rw-r--r--ext/standard/tests/assert/assert_closures.phpt1
-rw-r--r--ext/standard/tests/assert/assert_error.phpt31
-rw-r--r--ext/standard/tests/assert/assert_error2.phpt15
-rw-r--r--ext/standard/tests/assert/assert_error3.phpt27
-rw-r--r--ext/standard/tests/assert/assert_error4.phpt28
-rw-r--r--ext/standard/tests/assert/assert_options_error.phpt13
-rw-r--r--ext/standard/tests/assert/assert_variation.phpt36
-rw-r--r--ext/standard/tests/assert/bug73303.phpt24
-rw-r--r--ext/standard/tests/bug64370_var1.phpt2
-rw-r--r--ext/standard/tests/bug64370_var2.phpt2
-rw-r--r--ext/standard/tests/class_object/forward_static_call_001.phpt2
-rw-r--r--ext/standard/tests/class_object/forward_static_call_003.phpt2
-rw-r--r--ext/standard/tests/class_object/get_class_methods_variation_001.phpt20
-rw-r--r--ext/standard/tests/class_object/get_class_variation_001.phpt116
-rw-r--r--ext/standard/tests/class_object/get_class_vars_variation2.phpt2
-rw-r--r--ext/standard/tests/class_object/get_parent_class_variation_002.phpt20
-rw-r--r--ext/standard/tests/class_object/is_a_variation_001.phpt4
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_variation_001.phpt20
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_variation_004.phpt20
-rw-r--r--ext/standard/tests/class_object/method_exists_variation_001.phpt20
-rw-r--r--ext/standard/tests/class_object/property_exists_error.phpt25
-rw-r--r--ext/standard/tests/class_object/property_exists_variation1.phpt2
-rw-r--r--ext/standard/tests/dir/bug41693.phpt14
-rw-r--r--ext/standard/tests/dir/bug72625.phpt2
-rw-r--r--ext/standard/tests/dir/chdir_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/chdir_basic.phpt2
-rw-r--r--ext/standard/tests/dir/chdir_error2-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/chdir_error2.phpt2
-rw-r--r--ext/standard/tests/dir/chdir_variation2-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/chdir_variation2.phpt2
-rw-r--r--ext/standard/tests/dir/closedir_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/closedir_basic.phpt2
-rw-r--r--ext/standard/tests/dir/closedir_error-win32-mb.phpt51
-rw-r--r--ext/standard/tests/dir/closedir_variation2-win32-mb.phpt12
-rw-r--r--ext/standard/tests/dir/closedir_variation2.phpt12
-rw-r--r--ext/standard/tests/dir/closedir_variation3.phpt13
-rw-r--r--ext/standard/tests/dir/dir_basic-win32-mb.phpt11
-rw-r--r--ext/standard/tests/dir/dir_basic.phpt11
-rw-r--r--ext/standard/tests/dir/dir_bug73971.phpt2
-rw-r--r--ext/standard/tests/dir/getcwd_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/getcwd_basic.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_basic.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_error2.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation3-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation3.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation4-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation4.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation5.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation6-win32.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation6.phpt2
-rw-r--r--ext/standard/tests/dir/opendir_variation7.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_basic.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation2-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation2.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation3-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation3.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation4-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation4.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation5.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation6-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation6.phpt2
-rw-r--r--ext/standard/tests/dir/readdir_variation7.phpt12
-rw-r--r--ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/rewinddir_basic.phpt2
-rw-r--r--ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt12
-rw-r--r--ext/standard/tests/dir/rewinddir_variation2.phpt12
-rw-r--r--ext/standard/tests/dir/rewinddir_variation3.phpt13
-rw-r--r--ext/standard/tests/dir/scandir_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_basic.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_error2.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation10-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation10.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation3-win32-mb.phpt244
-rw-r--r--ext/standard/tests/dir/scandir_variation4-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation4.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation5.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation6.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation7.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation8-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation8.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation9-win32-mb.phpt2
-rw-r--r--ext/standard/tests/dir/scandir_variation9.phpt2
-rw-r--r--ext/standard/tests/directory/DirectoryClass_basic_001.phpt11
-rw-r--r--ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt77
-rw-r--r--ext/standard/tests/directory/DirectoryClass_error_001.phpt78
-rw-r--r--ext/standard/tests/directory/bug74589_utf8.phpt2
-rw-r--r--ext/standard/tests/file/005_error.phpt75
-rw-r--r--ext/standard/tests/file/006_error.phpt34
-rw-r--r--ext/standard/tests/file/006_variation2.phpt66
-rw-r--r--ext/standard/tests/file/007_basic.phpt220
-rw-r--r--ext/standard/tests/file/007_error.phpt185
-rw-r--r--ext/standard/tests/file/basename-win32.phpt46
-rw-r--r--ext/standard/tests/file/basename.phptbin8212 -> 6843 bytes
-rw-r--r--ext/standard/tests/file/basename_bug66395-win32.phpt2
-rw-r--r--ext/standard/tests/file/basename_bug66395_variation2-win32.phpt2
-rw-r--r--ext/standard/tests/file/bug39863.phpt17
-rw-r--r--ext/standard/tests/file/bug41693.phpt13
-rw-r--r--ext/standard/tests/file/bug47517.phpt2
-rw-r--r--ext/standard/tests/file/bug52820.phpt2
-rw-r--r--ext/standard/tests/file/bug61961.phpt2
-rw-r--r--ext/standard/tests/file/bug71882.phpt2
-rw-r--r--ext/standard/tests/file/bug72035.phpt3
-rw-r--r--ext/standard/tests/file/bug74719.phpt2
-rw-r--r--ext/standard/tests/file/bug75679.phpt2
-rw-r--r--ext/standard/tests/file/chmod_error.phpt25
-rw-r--r--ext/standard/tests/file/copy_error.phpt16
-rw-r--r--ext/standard/tests/file/copy_variation4.phptbin4939 -> 4250 bytes
-rw-r--r--ext/standard/tests/file/directory_wrapper_fstat_basic.phpt2
-rw-r--r--ext/standard/tests/file/dirname_basic-win32.phpt2
-rw-r--r--ext/standard/tests/file/dirname_basic.phpt2
-rw-r--r--ext/standard/tests/file/dirname_no_path_normalization-win32.phpt2
-rw-r--r--ext/standard/tests/file/disk.phpt9
-rw-r--r--ext/standard/tests/file/disk_free_space_error-win32.phpt18
-rw-r--r--ext/standard/tests/file/disk_free_space_error.phpt18
-rw-r--r--ext/standard/tests/file/disk_free_space_variation.phpt44
-rw-r--r--ext/standard/tests/file/disk_total_space_error-win32.phpt10
-rw-r--r--ext/standard/tests/file/disk_total_space_error.phpt10
-rw-r--r--ext/standard/tests/file/disk_total_space_variation.phpt24
-rw-r--r--ext/standard/tests/file/fclose_variation1.phpt10
-rw-r--r--ext/standard/tests/file/feof_basic.phpt11
-rw-r--r--ext/standard/tests/file/fgetc_variation2.phpt27
-rw-r--r--ext/standard/tests/file/fgetcsv_variation32.phpt2
-rw-r--r--ext/standard/tests/file/fgets_error.phpt72
-rw-r--r--ext/standard/tests/file/fgets_variation2.phpt43
-rw-r--r--ext/standard/tests/file/fgetss.phpt144
-rw-r--r--ext/standard/tests/file/fgetss1.phpt73
-rw-r--r--ext/standard/tests/file/fgetss_basic1.phpt137
-rw-r--r--ext/standard/tests/file/fgetss_basic2-win32-mb.phpt218
-rw-r--r--ext/standard/tests/file/fgetss_basic2-win32.phpt218
-rw-r--r--ext/standard/tests/file/fgetss_basic2.phpt216
-rw-r--r--ext/standard/tests/file/fgetss_error.phpt108
-rw-r--r--ext/standard/tests/file/fgetss_variation1-win32.phpt192
-rw-r--r--ext/standard/tests/file/fgetss_variation1.phpt188
-rw-r--r--ext/standard/tests/file/fgetss_variation2.phpt436
-rw-r--r--ext/standard/tests/file/fgetss_variation3-win32.phpt573
-rw-r--r--ext/standard/tests/file/fgetss_variation3.phpt569
-rw-r--r--ext/standard/tests/file/fgetss_variation4.phpt170
-rw-r--r--ext/standard/tests/file/fgetss_variation5-win32.phpt222
-rw-r--r--ext/standard/tests/file/fgetss_variation5.phpt219
-rw-r--r--ext/standard/tests/file/file_error.phpt14
-rw-r--r--ext/standard/tests/file/file_get_contents_error.phpt14
-rw-r--r--ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt22
-rw-r--r--ext/standard/tests/file/file_get_contents_variation1.phpt2
-rw-r--r--ext/standard/tests/file/file_get_contents_variation2.phpt2
-rw-r--r--ext/standard/tests/file/file_get_contents_variation8-win32.phpt16
-rw-r--r--ext/standard/tests/file/file_get_contents_variation8.phpt14
-rw-r--r--ext/standard/tests/file/file_put_contents.phpt21
-rw-r--r--ext/standard/tests/file/file_put_contents_variation1.phpt2
-rw-r--r--ext/standard/tests/file/file_put_contents_variation2.phpt14
-rw-r--r--ext/standard/tests/file/file_put_contents_variation4.phpt2
-rw-r--r--ext/standard/tests/file/file_put_contents_variation5.phpt2
-rw-r--r--ext/standard/tests/file/file_put_contents_variation6.phpt2
-rw-r--r--ext/standard/tests/file/file_put_contents_variation8-win32.phpt30
-rw-r--r--ext/standard/tests/file/file_put_contents_variation8.phptbin2504 -> 2427 bytes
-rw-r--r--ext/standard/tests/file/filegroup_error.phpt10
-rw-r--r--ext/standard/tests/file/filegroup_variation2.phpt6
-rw-r--r--ext/standard/tests/file/filegroup_variation3.phpt14
-rw-r--r--ext/standard/tests/file/fileinode_error.phpt12
-rw-r--r--ext/standard/tests/file/fileinode_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fileinode_variation3.phpt14
-rw-r--r--ext/standard/tests/file/fileowner_error.phpt10
-rw-r--r--ext/standard/tests/file/fileowner_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fileowner_variation3.phpt14
-rw-r--r--ext/standard/tests/file/fileperms_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fileperms_variation3.phpt14
-rw-r--r--ext/standard/tests/file/filesize_error.phpt14
-rw-r--r--ext/standard/tests/file/filetype_error.phpt10
-rw-r--r--ext/standard/tests/file/filetype_variation2.phpt2
-rw-r--r--ext/standard/tests/file/filetype_variation3.phpt2
-rw-r--r--ext/standard/tests/file/flock.phpt18
-rw-r--r--ext/standard/tests/file/flock_error.phpt52
-rw-r--r--ext/standard/tests/file/fnmatch_variation.phpt146
-rw-r--r--ext/standard/tests/file/fopen_unlink.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation10-win32.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation11-win32.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation12.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation13.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation14-win32.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation14.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation15-win32.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation15.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation16.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation17.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation19.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation5.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation6.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation7.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation8.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation9.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv.phpt3
-rw-r--r--ext/standard/tests/file/fputcsv_002.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation15.phpt3
-rw-r--r--ext/standard/tests/file/fputcsv_variation16.phpt2
-rw-r--r--ext/standard/tests/file/fread_error.phpt80
-rw-r--r--ext/standard/tests/file/fscanf.phpt12
-rw-r--r--ext/standard/tests/file/fscanf_error.phpt34
-rw-r--r--ext/standard/tests/file/fscanf_variation14.phpt8
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_error1.phpt83
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_error2.phpt79
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_error3.phpt79
-rw-r--r--ext/standard/tests/file/fstat.phpt10
-rw-r--r--ext/standard/tests/file/fstat_basic.phpt2
-rw-r--r--ext/standard/tests/file/fstat_variation8.phpt2
-rw-r--r--ext/standard/tests/file/ftruncate_error.phpt93
-rw-r--r--ext/standard/tests/file/fwrite.phpt22
-rw-r--r--ext/standard/tests/file/fwrite_error.phpt82
-rw-r--r--ext/standard/tests/file/get_current_user.phpt3
-rw-r--r--ext/standard/tests/file/glob_variation-win32-mb.phpt45
-rw-r--r--ext/standard/tests/file/glob_variation-win32.phpt45
-rw-r--r--ext/standard/tests/file/glob_variation.phpt45
-rw-r--r--ext/standard/tests/file/glob_variation3.phpt2
-rw-r--r--ext/standard/tests/file/glob_variation4.phpt2
-rw-r--r--ext/standard/tests/file/glob_variation5.phpt2
-rw-r--r--ext/standard/tests/file/glob_variation6.phpt2
-rw-r--r--ext/standard/tests/file/is_dir_variation3.phpt7
-rw-r--r--ext/standard/tests/file/is_dir_variation4.phpt14
-rw-r--r--ext/standard/tests/file/is_executable_error.phpt13
-rw-r--r--ext/standard/tests/file/is_executable_variation1.phpt14
-rw-r--r--ext/standard/tests/file/is_executable_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_file_variation3.phpt8
-rw-r--r--ext/standard/tests/file/is_file_variation4.phpt14
-rw-r--r--ext/standard/tests/file/is_readable_error.phpt12
-rw-r--r--ext/standard/tests/file/is_readable_variation1.phpt18
-rw-r--r--ext/standard/tests/file/is_readable_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_uploaded_file_basic.phpt10
-rw-r--r--ext/standard/tests/file/is_writable_error.phpt24
-rw-r--r--ext/standard/tests/file/is_writable_variation1.phpt36
-rw-r--r--ext/standard/tests/file/is_writable_variation3.phpt7
-rw-r--r--ext/standard/tests/file/lchgrp_basic.phpt2
-rw-r--r--ext/standard/tests/file/lchown_basic.phpt2
-rw-r--r--ext/standard/tests/file/lchown_error.phpt25
-rw-r--r--ext/standard/tests/file/lstat_stat_error.phpt29
-rw-r--r--ext/standard/tests/file/lstat_stat_variation3.phpt2
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_error.phpt36
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_variation2.phpt20
-rw-r--r--ext/standard/tests/file/mkdir_variation5-win32.phpt2
-rw-r--r--ext/standard/tests/file/mkdir_variation5.phpt2
-rw-r--r--ext/standard/tests/file/move_uploaded_file_basic.phpt12
-rw-r--r--ext/standard/tests/file/parse_ini_file_error.phpt9
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation1.phpt2
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation2.phpt2
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation3.phpt7
-rw-r--r--ext/standard/tests/file/pathinfo_variation3.phpt2
-rw-r--r--ext/standard/tests/file/pathinfo_variaton.phpt53
-rw-r--r--ext/standard/tests/file/popen_pclose_error.phpt20
-rw-r--r--ext/standard/tests/file/readfile_error.phpt18
-rw-r--r--ext/standard/tests/file/readfile_variation10-win32.phpt14
-rw-r--r--ext/standard/tests/file/readfile_variation10.phptbin1853 -> 1727 bytes
-rw-r--r--ext/standard/tests/file/readfile_variation6.phpt2
-rw-r--r--ext/standard/tests/file/readfile_variation7.phpt2
-rw-r--r--ext/standard/tests/file/readlink_realpath_error.phpt23
-rw-r--r--ext/standard/tests/file/readlink_variation1.phpt6
-rw-r--r--ext/standard/tests/file/realpath_error-win32.phpt29
-rw-r--r--ext/standard/tests/file/realpath_variation2.phpt2
-rw-r--r--ext/standard/tests/file/rename_basic.phpt2
-rw-r--r--ext/standard/tests/file/rename_variation13-win32.phptbin5225 -> 4376 bytes
-rw-r--r--ext/standard/tests/file/rename_variation13.phpt20
-rw-r--r--ext/standard/tests/file/rmdir_variation3-win32.phpt2
-rw-r--r--ext/standard/tests/file/rmdir_variation3.phpt2
-rw-r--r--ext/standard/tests/file/stat_error-win32.phpt16
-rw-r--r--ext/standard/tests/file/stream_002.phpt7
-rw-r--r--ext/standard/tests/file/stream_rfc2397_001.phpt2
-rw-r--r--ext/standard/tests/file/stream_rfc2397_002.phpt25
-rw-r--r--ext/standard/tests/file/stream_rfc2397_003.phpt3
-rw-r--r--ext/standard/tests/file/stream_rfc2397_004.phpt3
-rw-r--r--ext/standard/tests/file/stream_rfc2397_005.phpt3
-rw-r--r--ext/standard/tests/file/stream_rfc2397_006.phpt16
-rw-r--r--ext/standard/tests/file/stream_rfc2397_007.phpt3
-rw-r--r--ext/standard/tests/file/stream_supports_lock.phpt10
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt22
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt22
-rw-r--r--ext/standard/tests/file/tempnam_variation3-win32.phpt16
-rw-r--r--ext/standard/tests/file/tempnam_variation3.phpt19
-rw-r--r--ext/standard/tests/file/tempnam_variation7-win32.phpt19
-rw-r--r--ext/standard/tests/file/tempnam_variation7.phpt19
-rw-r--r--ext/standard/tests/file/touch.phpt3
-rw-r--r--ext/standard/tests/file/touch_error.phpt8
-rw-r--r--ext/standard/tests/file/touch_variation5-win32.phpt2
-rw-r--r--ext/standard/tests/file/touch_variation5.phpt2
-rw-r--r--ext/standard/tests/file/touch_variation6-win32.phpt2
-rw-r--r--ext/standard/tests/file/unlink_error-win32-mb.phpt24
-rw-r--r--ext/standard/tests/file/unlink_error-win32.phpt24
-rw-r--r--ext/standard/tests/file/unlink_error.phpt25
-rw-r--r--ext/standard/tests/file/unlink_variation10.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation6.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation8-win32.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation8.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation9-win32.phpt2
-rw-r--r--ext/standard/tests/file/userstreams_002.phpt10
-rw-r--r--ext/standard/tests/file/userstreams_006.phpt3
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug54028.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug54028_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug54977.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug61315.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug64506.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug64699.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug70903.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug71509.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug74923.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/recursive_it.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt2
-rw-r--r--ext/standard/tests/filters/001.phpt8
-rw-r--r--ext/standard/tests/filters/php_user_filter_01.phpt2
-rw-r--r--ext/standard/tests/filters/php_user_filter_02.phpt2
-rw-r--r--ext/standard/tests/filters/php_user_filter_03.phpt2
-rw-r--r--ext/standard/tests/filters/stream_filter_remove_basic.phpt2
-rw-r--r--ext/standard/tests/filters/stream_filter_remove_error.phpt27
-rw-r--r--ext/standard/tests/filters/strip_tags_filter.phpt29
-rw-r--r--ext/standard/tests/general_functions/010.phpt23
-rw-r--r--ext/standard/tests/general_functions/bug25038.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug32647.phpt11
-rw-r--r--ext/standard/tests/general_functions/bug36011.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug40398.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug41970.phpt24
-rw-r--r--ext/standard/tests/general_functions/bug46587.phpt10
-rw-r--r--ext/standard/tests/general_functions/bug47857.phpt26
-rw-r--r--ext/standard/tests/general_functions/bug60723.phpt4
-rw-r--r--ext/standard/tests/general_functions/bug67498.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug70018.phpt6
-rw-r--r--ext/standard/tests/general_functions/bug76643.phpt2
-rw-r--r--ext/standard/tests/general_functions/call_user_func_return.phpt2
-rw-r--r--ext/standard/tests/general_functions/callbacks_001.phpt11
-rw-r--r--ext/standard/tests/general_functions/callbacks_002.phpt26
-rw-r--r--ext/standard/tests/general_functions/debug_zval_dump_v.phpt6
-rw-r--r--ext/standard/tests/general_functions/error_clear_last.phpt2
-rw-r--r--ext/standard/tests/general_functions/error_get_last.phpt27
-rw-r--r--ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt6
-rw-r--r--ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt2
-rw-r--r--ext/standard/tests/general_functions/escapeshellarg_variation1.phpt2
-rw-r--r--ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt6
-rw-r--r--ext/standard/tests/general_functions/floatval.phpt26
-rw-r--r--ext/standard/tests/general_functions/floatval_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/floatval_variation1.phpt2
-rw-r--r--ext/standard/tests/general_functions/get_defined_constants_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/get_defined_vars_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/get_extension_funcs_basic.phpt6
-rw-r--r--ext/standard/tests/general_functions/get_extension_funcs_error.phpt40
-rw-r--r--ext/standard/tests/general_functions/get_include_path_basic.phpt11
-rw-r--r--ext/standard/tests/general_functions/get_included_files.phpt10
-rw-r--r--ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/get_resource_type_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/getrusage.phpt6
-rw-r--r--ext/standard/tests/general_functions/getrusage_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/getservbyport_variation1.phpt16
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_basic.phpt4
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_error.phpt26
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation1.phpt21
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation2.phpt31
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation3.phpt31
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation4.phpt47
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation5.phpt25
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation6.phpt25
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation7.phpt25
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation8.phpt33
-rw-r--r--ext/standard/tests/general_functions/head.phpt6
-rw-r--r--ext/standard/tests/general_functions/include_path.phpt24
-rw-r--r--ext/standard/tests/general_functions/intval.phpt15
-rw-r--r--ext/standard/tests/general_functions/intval_variation1.phpt6
-rw-r--r--ext/standard/tests/general_functions/is_array.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_bool.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_callable_basic1.phpt2
-rw-r--r--ext/standard/tests/general_functions/is_callable_basic2.phpt50
-rw-r--r--ext/standard/tests/general_functions/is_callable_variation1.phpt2
-rw-r--r--ext/standard/tests/general_functions/is_callable_variation2.phpt2
-rw-r--r--ext/standard/tests/general_functions/is_countable_with_variables.phpt4
-rw-r--r--ext/standard/tests/general_functions/is_float.phpt35
-rw-r--r--ext/standard/tests/general_functions/is_float_64bit.phpt35
-rw-r--r--ext/standard/tests/general_functions/is_int.phpt31
-rw-r--r--ext/standard/tests/general_functions/is_int_64bit.phpt31
-rw-r--r--ext/standard/tests/general_functions/is_null.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_numeric.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_object.phpt15
-rw-r--r--ext/standard/tests/general_functions/is_resource_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/is_scalar.phpt19
-rw-r--r--ext/standard/tests/general_functions/is_string.phpt15
-rw-r--r--ext/standard/tests/general_functions/isset_basic1.phpt2
-rw-r--r--ext/standard/tests/general_functions/isset_basic2.phpt2
-rw-r--r--ext/standard/tests/general_functions/ob_get_flush_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/ob_get_flush_error.phpt9
-rw-r--r--ext/standard/tests/general_functions/ob_get_length_basic.phpt8
-rw-r--r--ext/standard/tests/general_functions/ob_start_closures.phpt2
-rw-r--r--ext/standard/tests/general_functions/parse_ini_file.phpt16
-rw-r--r--ext/standard/tests/general_functions/parse_ini_string_002.phpt8
-rw-r--r--ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt2
-rw-r--r--ext/standard/tests/general_functions/php_uname_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/php_uname_error.phpt36
-rw-r--r--ext/standard/tests/general_functions/phpcredits.phpt4
-rw-r--r--ext/standard/tests/general_functions/phpcredits2.phpt4
-rw-r--r--ext/standard/tests/general_functions/phpinfo.phpt7
-rw-r--r--ext/standard/tests/general_functions/phpinfo2.phpt7
-rw-r--r--ext/standard/tests/general_functions/print_r.phpt37
-rw-r--r--ext/standard/tests/general_functions/print_r_64bit.phpt37
-rw-r--r--ext/standard/tests/general_functions/proc_nice_basic-win.phpt4
-rw-r--r--ext/standard/tests/general_functions/proc_open-mb0.phpt3
-rw-r--r--ext/standard/tests/general_functions/proc_open-mb1.phpt3
-rw-r--r--ext/standard/tests/general_functions/putenv.phpt21
-rw-r--r--ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt2
-rw-r--r--ext/standard/tests/general_functions/putenv_bug75574_utf8.phpt2
-rw-r--r--ext/standard/tests/general_functions/rand.phpt24
-rw-r--r--ext/standard/tests/general_functions/register_tick_function_error.phpt14
-rw-r--r--ext/standard/tests/general_functions/sleep_basic.phpt6
-rw-r--r--ext/standard/tests/general_functions/sleep_error.phpt42
-rw-r--r--ext/standard/tests/general_functions/strval.phpt23
-rw-r--r--ext/standard/tests/general_functions/sys_getloadavg.phpt3
-rw-r--r--ext/standard/tests/general_functions/uniqid_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/usleep_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/usleep_error.phpt43
-rw-r--r--ext/standard/tests/general_functions/var_dump.phpt25
-rw-r--r--ext/standard/tests/general_functions/var_dump_64bit.phpt25
-rw-r--r--ext/standard/tests/general_functions/var_export-locale.phpt16
-rw-r--r--ext/standard/tests/general_functions/var_export-locale_32.phpt16
-rw-r--r--ext/standard/tests/general_functions/var_export_basic1.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic1_32.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic2.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic3.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic4.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic5.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic6.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_basic7.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export_error2.phpt7
-rw-r--r--ext/standard/tests/general_functions/var_export_error3.phpt2
-rw-r--r--ext/standard/tests/http/bug69337.phpt2
-rw-r--r--ext/standard/tests/http/bug75535.phpt2
-rw-r--r--ext/standard/tests/http/http_response_header_01.phpt2
-rw-r--r--ext/standard/tests/http/http_response_header_02.phpt2
-rw-r--r--ext/standard/tests/http/http_response_header_03.phpt2
-rw-r--r--ext/standard/tests/http/http_response_header_04.phpt2
-rw-r--r--ext/standard/tests/http/http_response_header_05.phpt2
-rw-r--r--ext/standard/tests/image/bug71848.phpt2
-rw-r--r--ext/standard/tests/image/bug72278.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_basic.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_jpgapp.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_tif_mm.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_variation2.phpt12
-rw-r--r--ext/standard/tests/image/getimagesize_variation3.phpt6
-rw-r--r--ext/standard/tests/image/getimagesize_variation4.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_variation_005.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_wbmp.phpt2
-rw-r--r--ext/standard/tests/image/getimagesize_xbm.phpt2
-rw-r--r--ext/standard/tests/image/image_type_to_extension.phpt16
-rw-r--r--ext/standard/tests/image/image_type_to_mime_type_variation2.phpt2
-rw-r--r--ext/standard/tests/image/image_type_to_mime_type_variation3.phpt2
-rw-r--r--ext/standard/tests/image/image_type_to_mime_type_variation4.phpt2
-rw-r--r--ext/standard/tests/mail/bug51604.phpt2
-rw-r--r--ext/standard/tests/mail/bug66535.phpt2
-rw-r--r--ext/standard/tests/mail/bug69115.phpt2
-rw-r--r--ext/standard/tests/mail/bug69874.phpt2
-rw-r--r--ext/standard/tests/mail/bug69874_2.phpt2
-rw-r--r--ext/standard/tests/mail/bug73203.phpt2
-rw-r--r--ext/standard/tests/mail/ezmlm_hash_basic.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic2.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic3.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic4.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic5.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic6.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic7.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic_alt1-win32.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic_alt2-win32.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic_alt3-win32.phpt2
-rw-r--r--ext/standard/tests/mail/mail_basic_alt4-win32.phpt2
-rw-r--r--ext/standard/tests/mail/mail_variation1.phpt2
-rw-r--r--ext/standard/tests/mail/mail_variation2.phpt2
-rw-r--r--ext/standard/tests/mail/mail_variation_alt1-win32.phpt2
-rw-r--r--ext/standard/tests/mail/mail_variation_alt2-win32.phpt2
-rw-r--r--ext/standard/tests/mail/mail_variation_alt3-win32.phpt2
-rw-r--r--ext/standard/tests/math/abs_basic.phpt2
-rw-r--r--ext/standard/tests/math/abs_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/abs_variation.phpt28
-rw-r--r--ext/standard/tests/math/acos_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/acos_variation.phpt4
-rw-r--r--ext/standard/tests/math/acosh_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/acosh_variation.phpt4
-rw-r--r--ext/standard/tests/math/asin_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/asin_variation.phpt4
-rw-r--r--ext/standard/tests/math/asinh_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/asinh_variation.phpt4
-rw-r--r--ext/standard/tests/math/atan2_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/atan_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/atan_variation.phpt4
-rw-r--r--ext/standard/tests/math/atanh_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/atanh_variation.phpt4
-rw-r--r--ext/standard/tests/math/base_convert_error.phpt33
-rw-r--r--ext/standard/tests/math/base_convert_variation1.phpt4
-rw-r--r--ext/standard/tests/math/bindec_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/bindec_variation1.phpt18
-rw-r--r--ext/standard/tests/math/bindec_variation1_64bit.phpt18
-rw-r--r--ext/standard/tests/math/bug75514.phpt2
-rw-r--r--ext/standard/tests/math/ceil_basic.phpt2
-rw-r--r--ext/standard/tests/math/ceil_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/ceil_variation1.phpt28
-rw-r--r--ext/standard/tests/math/cos_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/cos_variation.phpt4
-rw-r--r--ext/standard/tests/math/cosh_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/cosh_variation.phpt4
-rw-r--r--ext/standard/tests/math/decbin_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/decbin_variation1.phpt2
-rw-r--r--ext/standard/tests/math/decbin_variation1_64bit.phpt2
-rw-r--r--ext/standard/tests/math/dechex_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/dechex_variation1.phpt2
-rw-r--r--ext/standard/tests/math/dechex_variation1_64bit.phpt2
-rw-r--r--ext/standard/tests/math/decoct_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/decoct_variation1.phpt2
-rw-r--r--ext/standard/tests/math/decoct_variation1_64bit.phpt2
-rw-r--r--ext/standard/tests/math/deg2rad_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/deg2rad_variation.phpt4
-rw-r--r--ext/standard/tests/math/exp_basic.phpt2
-rw-r--r--ext/standard/tests/math/exp_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/expm1_basic.phpt2
-rw-r--r--ext/standard/tests/math/expm1_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/fdiv.phpt78
-rw-r--r--ext/standard/tests/math/floor_basic.phpt2
-rw-r--r--ext/standard/tests/math/floor_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/floor_variation1.phpt28
-rw-r--r--ext/standard/tests/math/fmod_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/hexdec_basic_64bit.phpt2
-rw-r--r--ext/standard/tests/math/hexdec_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/hexdec_variation1.phpt18
-rw-r--r--ext/standard/tests/math/hexdec_variation1_64bit.phpt18
-rw-r--r--ext/standard/tests/math/hypot_basic.phpt2
-rw-r--r--ext/standard/tests/math/hypot_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/is_finite_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/is_infinite_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/is_nan_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/lcg_value_basic.phpt24
-rw-r--r--ext/standard/tests/math/log10_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/log10_variation.phpt4
-rw-r--r--ext/standard/tests/math/log1p_basic.phpt2
-rw-r--r--ext/standard/tests/math/log1p_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/log_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/log_error.phpt6
-rw-r--r--ext/standard/tests/math/octdec_basic_64bit.phpt2
-rw-r--r--ext/standard/tests/math/octdec_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/octdec_variation1.phpt16
-rw-r--r--ext/standard/tests/math/pow_basic.phpt2
-rw-r--r--ext/standard/tests/math/pow_basic2.phpt2
-rw-r--r--ext/standard/tests/math/pow_basic_64bit.phpt2
-rw-r--r--ext/standard/tests/math/pow_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/pow_variation1.phpt14
-rw-r--r--ext/standard/tests/math/pow_variation1_64bit.phpt14
-rw-r--r--ext/standard/tests/math/pow_variation2.phpt14
-rw-r--r--ext/standard/tests/math/rad2deg_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/rad2deg_variation.phpt4
-rw-r--r--ext/standard/tests/math/round_basic.phpt2
-rw-r--r--ext/standard/tests/math/round_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/round_bug71201.phpt2
-rw-r--r--ext/standard/tests/math/round_variation1.phpt32
-rw-r--r--ext/standard/tests/math/sin_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/sin_variation.phpt4
-rw-r--r--ext/standard/tests/math/sinh_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/sinh_variation.phpt4
-rw-r--r--ext/standard/tests/math/sqrt_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/sqrt_variation.phpt6
-rw-r--r--ext/standard/tests/math/srand_basic.phpt2
-rw-r--r--ext/standard/tests/math/tan_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/tan_variation.phpt4
-rw-r--r--ext/standard/tests/math/tanh_basiclong_64bit.phpt2
-rw-r--r--ext/standard/tests/math/tanh_variation.phpt4
-rw-r--r--ext/standard/tests/misc/bug65550.phpt2
-rw-r--r--ext/standard/tests/misc/get_browser_basic.phpt2
-rw-r--r--ext/standard/tests/misc/get_browser_error.phpt8
-rw-r--r--ext/standard/tests/misc/get_browser_variation1.phpt2
-rw-r--r--ext/standard/tests/misc/time_nanosleep_error3.phpt8
-rw-r--r--ext/standard/tests/misc/time_nanosleep_error4.phpt8
-rw-r--r--ext/standard/tests/misc/time_nanosleep_error5.phpt8
-rw-r--r--ext/standard/tests/network/bug64330.phpt2
-rw-r--r--ext/standard/tests/network/closelog_basic.phpt2
-rw-r--r--ext/standard/tests/network/fsockopen_error.phpt27
-rw-r--r--ext/standard/tests/network/gethostbyaddr_basic1.phpt2
-rw-r--r--ext/standard/tests/network/gethostbyaddr_error.phpt20
-rw-r--r--ext/standard/tests/network/gethostbyname_basic003.phpt2
-rw-r--r--ext/standard/tests/network/gethostbynamel_basic1.phpt2
-rw-r--r--ext/standard/tests/network/gethostname.phpt6
-rw-r--r--ext/standard/tests/network/getprotobyname_error.phpt11
-rw-r--r--ext/standard/tests/network/getprotobynumber_error.phpt11
-rw-r--r--ext/standard/tests/network/inet.phpt8
-rw-r--r--ext/standard/tests/network/ip.phpt20
-rw-r--r--ext/standard/tests/network/ip2long_variation2.phpt2
-rw-r--r--ext/standard/tests/network/ip2long_variation2_x64.phpt2
-rw-r--r--ext/standard/tests/network/ip_x86_64.phpt20
-rw-r--r--ext/standard/tests/network/syslog_basic.phpt2
-rw-r--r--ext/standard/tests/password/bug75221.phpt2
-rw-r--r--ext/standard/tests/password/password_bcrypt_errors.phpt26
-rw-r--r--ext/standard/tests/password/password_deprecated_salts.phpt20
-rw-r--r--ext/standard/tests/password/password_hash_error.phpt61
-rw-r--r--ext/standard/tests/password/password_needs_rehash_error.phpt33
-rw-r--r--ext/standard/tests/password/password_removed_salt_option.phpt20
-rw-r--r--ext/standard/tests/password/password_verify_error.phpt16
-rw-r--r--ext/standard/tests/php_version_win_const.phpt2
-rw-r--r--ext/standard/tests/random/reflection.phpt2
-rw-r--r--ext/standard/tests/serialize/002.phpt2
-rw-r--r--ext/standard/tests/serialize/005.phpt3
-rw-r--r--ext/standard/tests/serialize/bug25378.phpt2
-rw-r--r--ext/standard/tests/serialize/bug30234.phpt2
-rw-r--r--ext/standard/tests/serialize/bug31402.phpt2
-rw-r--r--ext/standard/tests/serialize/bug68545.phpt2
-rw-r--r--ext/standard/tests/serialize/bug68976.phpt2
-rw-r--r--ext/standard/tests/serialize/bug69152.phpt8
-rw-r--r--ext/standard/tests/serialize/bug69793.phpt6
-rw-r--r--ext/standard/tests/serialize/bug74300.phpt2
-rw-r--r--ext/standard/tests/serialize/serialization_objects_002.phptbin7231 -> 7233 bytes
-rw-r--r--ext/standard/tests/serialize/serialization_objects_005.phpt2
-rw-r--r--ext/standard/tests/serialize/typed_property_refs.phpt8
-rw-r--r--ext/standard/tests/streams/bug40459.phpt2
-rw-r--r--ext/standard/tests/streams/bug46426.phpt2
-rw-r--r--ext/standard/tests/streams/bug49936.phpt2
-rw-r--r--ext/standard/tests/streams/bug53903.phpt2
-rw-r--r--ext/standard/tests/streams/bug54623.phpt9
-rw-r--r--ext/standard/tests/streams/bug54946.phpt2
-rw-r--r--ext/standard/tests/streams/bug60602.phpt4
-rw-r--r--ext/standard/tests/streams/bug61019.phpt2
-rw-r--r--ext/standard/tests/streams/bug64770.phpt2
-rw-r--r--ext/standard/tests/streams/bug70198.phpt2
-rw-r--r--ext/standard/tests/streams/bug72771.phpt2
-rw-r--r--ext/standard/tests/streams/bug72857.phpt2
-rw-r--r--ext/standard/tests/streams/bug73457.phpt2
-rw-r--r--ext/standard/tests/streams/bug74090.phpt2
-rw-r--r--ext/standard/tests/streams/bug77680.phpt2
-rw-r--r--ext/standard/tests/streams/bug77765.phpt2
-rw-r--r--ext/standard/tests/streams/opendir-001.phpt2
-rw-r--r--ext/standard/tests/streams/opendir-002.phpt2
-rw-r--r--ext/standard/tests/streams/opendir-003.phpt2
-rw-r--r--ext/standard/tests/streams/opendir-004.phpt2
-rw-r--r--ext/standard/tests/streams/proc_open_bug51800.phpt2
-rw-r--r--ext/standard/tests/streams/proc_open_bug51800_right.phpt2
-rw-r--r--ext/standard/tests/streams/proc_open_bug51800_right2.phpt2
-rw-r--r--ext/standard/tests/streams/proc_open_bug64438.phpt2
-rw-r--r--ext/standard/tests/streams/proc_open_bug69900.phpt2
-rw-r--r--ext/standard/tests/streams/set_file_buffer.phpt1
-rw-r--r--ext/standard/tests/streams/stream_get_contents_001.phpt2
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_error.phpt42
-rw-r--r--ext/standard/tests/streams/stream_resolve_include_path.phpt13
-rw-r--r--ext/standard/tests/streams/stream_set_chunk_size.phpt20
-rw-r--r--ext/standard/tests/streams/stream_set_timeout_error.phpt40
-rw-r--r--ext/standard/tests/strings/006.phpt2
-rw-r--r--ext/standard/tests/strings/007-win32.phpt2
-rw-r--r--ext/standard/tests/strings/007.phpt2
-rw-r--r--ext/standard/tests/strings/addcslashes_001.phptbin1585 -> 1627 bytes
-rw-r--r--ext/standard/tests/strings/bin2hex_basic.phpt2
-rw-r--r--ext/standard/tests/strings/bug24208.phpt13
-rw-r--r--ext/standard/tests/strings/bug33605.phpt10
-rw-r--r--ext/standard/tests/strings/bug37262.phpt8
-rw-r--r--ext/standard/tests/strings/bug40754.phpt4
-rw-r--r--ext/standard/tests/strings/bug45166.phpt2
-rw-r--r--ext/standard/tests/strings/bug54238.phpt7
-rw-r--r--ext/standard/tests/strings/bug54322.phpt14
-rw-r--r--ext/standard/tests/strings/bug61116.phpt16
-rw-r--r--ext/standard/tests/strings/bug62462.phpt2
-rw-r--r--ext/standard/tests/strings/bug63943.phpt8
-rw-r--r--ext/standard/tests/strings/bug69522.phpt2
-rw-r--r--ext/standard/tests/strings/bug72823.phpt2
-rw-r--r--ext/standard/tests/strings/bug77439.phpt9
-rw-r--r--ext/standard/tests/strings/bug78003.phpt2
-rw-r--r--ext/standard/tests/strings/chr_basic.phpt2
-rw-r--r--ext/standard/tests/strings/chr_error.phptbin823 -> 859 bytes
-rw-r--r--ext/standard/tests/strings/chr_variation1.phpt2
-rw-r--r--ext/standard/tests/strings/chunk_split.phpt13
-rw-r--r--ext/standard/tests/strings/chunk_split_variation1_32bit.phpt26
-rw-r--r--ext/standard/tests/strings/chunk_split_variation2_32bit.phpt25
-rw-r--r--ext/standard/tests/strings/chunk_split_variation3.phpt30
-rw-r--r--ext/standard/tests/strings/chunk_split_variation5.phptbin2279 -> 2219 bytes
-rw-r--r--ext/standard/tests/strings/chunk_split_variation8.phpt24
-rw-r--r--ext/standard/tests/strings/convert_cyr_string.phpt6
-rw-r--r--ext/standard/tests/strings/convert_cyr_string_basic.phpt2
-rw-r--r--ext/standard/tests/strings/convert_cyr_string_error.phpt2
-rw-r--r--ext/standard/tests/strings/convert_uudecode_basic.phpt2
-rw-r--r--ext/standard/tests/strings/convert_uuencode_basic.phpt2
-rw-r--r--ext/standard/tests/strings/count_chars_basic.phpt8
-rw-r--r--ext/standard/tests/strings/crc32_variation3.phpt4
-rw-r--r--ext/standard/tests/strings/crypt.phpt8
-rw-r--r--ext/standard/tests/strings/dirname_error.phpt21
-rw-r--r--ext/standard/tests/strings/dirname_multi.phpt9
-rw-r--r--ext/standard/tests/strings/dirname_multi_win.phpt13
-rw-r--r--ext/standard/tests/strings/explode.phpt56
-rw-r--r--ext/standard/tests/strings/explode1.phpt90
-rw-r--r--ext/standard/tests/strings/explode_variation4.phpt2
-rw-r--r--ext/standard/tests/strings/explode_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/explode_variation6.phpt2
-rw-r--r--ext/standard/tests/strings/fprintf_error.phpt30
-rw-r--r--ext/standard/tests/strings/hebrev_basic.phpt2
-rw-r--r--ext/standard/tests/strings/hebrevc_basic.phpt2
-rw-r--r--ext/standard/tests/strings/highlight_file.phpt4
-rw-r--r--ext/standard/tests/strings/htmlentities09.phpt2
-rw-r--r--ext/standard/tests/strings/htmlentities16.phpt2
-rw-r--r--ext/standard/tests/strings/htmlentities24.phpt12
-rw-r--r--ext/standard/tests/strings/htmlspecialchars.phpt13
-rw-r--r--ext/standard/tests/strings/htmlspecialchars_basic.phpt2
-rw-r--r--ext/standard/tests/strings/implode.phpt2
-rw-r--r--ext/standard/tests/strings/implode1.phptbin6079 -> 6042 bytes
-rw-r--r--ext/standard/tests/strings/join_error.phpt34
-rw-r--r--ext/standard/tests/strings/join_variation1.phpt10
-rw-r--r--ext/standard/tests/strings/join_variation2.phpt106
-rw-r--r--ext/standard/tests/strings/join_variation3.phpt4
-rw-r--r--ext/standard/tests/strings/join_variation4.phptbin2318 -> 2319 bytes
-rw-r--r--ext/standard/tests/strings/join_variation5.phpt10
-rw-r--r--ext/standard/tests/strings/lcfirst.phptbin6304 -> 5424 bytes
-rw-r--r--ext/standard/tests/strings/levenshtein.phpt8
-rw-r--r--ext/standard/tests/strings/ltrim.phpt16
-rw-r--r--ext/standard/tests/strings/ltrim_basic.phpt2
-rw-r--r--ext/standard/tests/strings/ltrim_error.phpt20
-rw-r--r--ext/standard/tests/strings/md5_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/md5_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/md5_file.phptbin2876 -> 2553 bytes
-rw-r--r--ext/standard/tests/strings/metaphone.phpt3
-rw-r--r--ext/standard/tests/strings/money_format_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/money_format_error.phpt32
-rw-r--r--ext/standard/tests/strings/nl_langinfo_basic.phpt2
-rw-r--r--ext/standard/tests/strings/number_format_basic.phpt2
-rw-r--r--ext/standard/tests/strings/ord_basic.phpt2
-rw-r--r--ext/standard/tests/strings/parse_str_basic1.phpt16
-rw-r--r--ext/standard/tests/strings/parse_str_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/parse_str_basic3.phptbin5634 -> 4325 bytes
-rw-r--r--ext/standard/tests/strings/parse_str_basic4.phpt2
-rw-r--r--ext/standard/tests/strings/pathinfo.phpt3
-rw-r--r--ext/standard/tests/strings/php_strip_whitespace.phpt4
-rw-r--r--ext/standard/tests/strings/print_basic.phpt2
-rw-r--r--ext/standard/tests/strings/print_variation1.phpt8
-rw-r--r--ext/standard/tests/strings/printf.phpt19
-rw-r--r--ext/standard/tests/strings/printf_64bit.phpt19
-rw-r--r--ext/standard/tests/strings/printf_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic3.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic4.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic5.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic6.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic7.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/printf_basic9.phpt2
-rw-r--r--ext/standard/tests/strings/printf_error.phpt72
-rw-r--r--ext/standard/tests/strings/printf_variation1.phpt32
-rw-r--r--ext/standard/tests/strings/printf_variation2.phpt24
-rw-r--r--ext/standard/tests/strings/quoted_printable_decode_basic.phpt2
-rw-r--r--ext/standard/tests/strings/quoted_printable_encode_001.phpt14
-rw-r--r--ext/standard/tests/strings/quotemeta_basic.phpt2
-rw-r--r--ext/standard/tests/strings/quotemeta_basic_1.phpt4
-rw-r--r--ext/standard/tests/strings/rtrim.phptbin2446 -> 2107 bytes
-rw-r--r--ext/standard/tests/strings/rtrim_basic.phpt2
-rw-r--r--ext/standard/tests/strings/rtrim_error.phpt20
-rw-r--r--ext/standard/tests/strings/setlocale-win32.phpt2
-rw-r--r--ext/standard/tests/strings/setlocale_error.phpt16
-rw-r--r--ext/standard/tests/strings/sha1_basic.phpt2
-rw-r--r--ext/standard/tests/strings/sha1_file.phpt18
-rw-r--r--ext/standard/tests/strings/similar_text_basic.phpt2
-rw-r--r--ext/standard/tests/strings/soundex.phpt4
-rw-r--r--ext/standard/tests/strings/soundex_basic.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_error.phpt70
-rw-r--r--ext/standard/tests/strings/sprintf_variation1.phpt30
-rw-r--r--ext/standard/tests/strings/sprintf_variation18.phpt196
-rw-r--r--ext/standard/tests/strings/sprintf_variation2.phpt22
-rw-r--r--ext/standard/tests/strings/sprintf_variation23.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation36.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation48.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic3.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic4.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic5.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic6.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic7.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/sscanf_error.phpt18
-rw-r--r--ext/standard/tests/strings/str_getcsv_002.phpt2
-rw-r--r--ext/standard/tests/strings/str_ireplace.phpt11
-rw-r--r--ext/standard/tests/strings/str_pad.phptbin9812 -> 8557 bytes
-rw-r--r--ext/standard/tests/strings/str_pad_variation1.phpt42
-rw-r--r--ext/standard/tests/strings/str_pad_variation2.phpt70
-rw-r--r--ext/standard/tests/strings/str_pad_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/str_repeat.phptbin16698 -> 3060 bytes
-rw-r--r--ext/standard/tests/strings/str_repeat_variation1.phpt22
-rw-r--r--ext/standard/tests/strings/str_replace.phpt29
-rw-r--r--ext/standard/tests/strings/str_replace_basic.phpt2
-rw-r--r--ext/standard/tests/strings/str_replace_variation1.phpt2
-rw-r--r--ext/standard/tests/strings/str_replace_variation2.phptbin12675 -> 12653 bytes
-rw-r--r--ext/standard/tests/strings/str_replace_variation3.phpt6
-rw-r--r--ext/standard/tests/strings/str_rot13_basic.phpt2
-rw-r--r--ext/standard/tests/strings/str_shuffle_basic.phpt2
-rw-r--r--ext/standard/tests/strings/str_split_variation6.phpt32
-rw-r--r--ext/standard/tests/strings/str_split_variation6_64bit.phpt22
-rw-r--r--ext/standard/tests/strings/str_split_variation7.phpt32
-rw-r--r--ext/standard/tests/strings/str_split_variation7_64bit.phpt26
-rw-r--r--ext/standard/tests/strings/str_word_count.phpt86
-rw-r--r--ext/standard/tests/strings/str_word_count1.phpt34
-rw-r--r--ext/standard/tests/strings/strcasecmp.phptbin21284 -> 20646 bytes
-rw-r--r--ext/standard/tests/strings/strcmp.phptbin19060 -> 18461 bytes
-rw-r--r--ext/standard/tests/strings/strcmp_unterminated.phpt2
-rw-r--r--ext/standard/tests/strings/stripcslashes_basic.phpt2
-rw-r--r--ext/standard/tests/strings/stripos.phpt35
-rw-r--r--ext/standard/tests/strings/stripos_error.phpt20
-rw-r--r--ext/standard/tests/strings/stripos_variation1.phpt38
-rw-r--r--ext/standard/tests/strings/stripos_variation10.phpt102
-rw-r--r--ext/standard/tests/strings/stripos_variation11.phpt152
-rw-r--r--ext/standard/tests/strings/stripos_variation2.phpt44
-rw-r--r--ext/standard/tests/strings/stripos_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/stripos_variation7.phpt6
-rw-r--r--ext/standard/tests/strings/stristr.phpt27
-rw-r--r--ext/standard/tests/strings/stristr2.phpt10
-rw-r--r--ext/standard/tests/strings/stristr_basic.phpt2
-rw-r--r--ext/standard/tests/strings/stristr_error.phpt60
-rw-r--r--ext/standard/tests/strings/stristr_variation2.phpt72
-rw-r--r--ext/standard/tests/strings/strlen.phptbin6420 -> 5901 bytes
-rw-r--r--ext/standard/tests/strings/strlen_basic.phpt2
-rw-r--r--ext/standard/tests/strings/strnatcasecmp_basic.phpt2
-rw-r--r--ext/standard/tests/strings/strnatcasecmp_variation1.phpt2
-rw-r--r--ext/standard/tests/strings/strnatcmp_basic.phpt2
-rw-r--r--ext/standard/tests/strings/strncasecmp_error.phpt27
-rw-r--r--ext/standard/tests/strings/strncmp_error.phpt19
-rw-r--r--ext/standard/tests/strings/strpbrk_basic.phpt2
-rw-r--r--ext/standard/tests/strings/strpbrk_error.phpt50
-rw-r--r--ext/standard/tests/strings/strpos.phptbin12013 -> 7940 bytes
-rw-r--r--ext/standard/tests/strings/strpos_number.phpt7
-rw-r--r--ext/standard/tests/strings/strpos_variation1.phpt23
-rw-r--r--ext/standard/tests/strings/strrchr_variation1.phptbin4854 -> 4371 bytes
-rw-r--r--ext/standard/tests/strings/strrchr_variation10.phpt86
-rw-r--r--ext/standard/tests/strings/strrchr_variation11.phpt94
-rw-r--r--ext/standard/tests/strings/strrchr_variation12.phptbin1765 -> 1127 bytes
-rw-r--r--ext/standard/tests/strings/strrchr_variation2.phpt12
-rw-r--r--ext/standard/tests/strings/strrchr_variation8.phpt6
-rw-r--r--ext/standard/tests/strings/strripos.phpt18
-rw-r--r--ext/standard/tests/strings/strripos_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/strripos_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/strripos_offset.phpt38
-rw-r--r--ext/standard/tests/strings/strripos_variation1.phpt76
-rw-r--r--ext/standard/tests/strings/strripos_variation2.phpt92
-rw-r--r--ext/standard/tests/strings/strripos_variation3.phpt4
-rw-r--r--ext/standard/tests/strings/strripos_variation4.phpt2
-rw-r--r--ext/standard/tests/strings/strripos_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/strripos_variation6.phpt23
-rw-r--r--ext/standard/tests/strings/strrpos.phpt14
-rw-r--r--ext/standard/tests/strings/strrpos_offset.phpt34
-rw-r--r--ext/standard/tests/strings/strrpos_variation1.phpt38
-rw-r--r--ext/standard/tests/strings/strrpos_variation10.phpt102
-rw-r--r--ext/standard/tests/strings/strrpos_variation11.phpt180
-rw-r--r--ext/standard/tests/strings/strrpos_variation14.phpt23
-rw-r--r--ext/standard/tests/strings/strrpos_variation15.phpt205
-rw-r--r--ext/standard/tests/strings/strrpos_variation2.phpt44
-rw-r--r--ext/standard/tests/strings/strrpos_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/strrpos_variation7.phpt10
-rw-r--r--ext/standard/tests/strings/strstr.phptbin11493 -> 9540 bytes
-rw-r--r--ext/standard/tests/strings/strstr_variation1.phpt23
-rw-r--r--ext/standard/tests/strings/strtolower-win32.phptbin4875 -> 4406 bytes
-rw-r--r--ext/standard/tests/strings/strtolower.phptbin3886 -> 3417 bytes
-rw-r--r--ext/standard/tests/strings/strtoupper1-win32.phptbin4884 -> 4415 bytes
-rw-r--r--ext/standard/tests/strings/strtoupper1.phptbin3895 -> 3426 bytes
-rw-r--r--ext/standard/tests/strings/strtr_empty_search_string.phpt15
-rw-r--r--ext/standard/tests/strings/strtr_variation6.phpt8
-rw-r--r--ext/standard/tests/strings/strtr_variation8.phpt77
-rw-r--r--ext/standard/tests/strings/strval.phpt2
-rw-r--r--ext/standard/tests/strings/strval_basic.phpt2
-rw-r--r--ext/standard/tests/strings/strval_error.phpt23
-rw-r--r--ext/standard/tests/strings/strval_variation1.phpt8
-rw-r--r--ext/standard/tests/strings/strval_variation2.phpt2
-rw-r--r--ext/standard/tests/strings/substr.phptbin4781 -> 4223 bytes
-rw-r--r--ext/standard/tests/strings/substr_compare.phpt21
-rw-r--r--ext/standard/tests/strings/substr_count_basic.phpt30
-rw-r--r--ext/standard/tests/strings/substr_count_error.phpt18
-rw-r--r--ext/standard/tests/strings/substr_count_variation_001.phpt12
-rw-r--r--ext/standard/tests/strings/substr_replace_error.phpt22
-rw-r--r--ext/standard/tests/strings/trim1.phptbin2045 -> 1538 bytes
-rw-r--r--ext/standard/tests/strings/trim_basic.phpt2
-rw-r--r--ext/standard/tests/strings/trim_error.phpt20
-rw-r--r--ext/standard/tests/strings/ucfirst.phptbin5536 -> 4656 bytes
-rw-r--r--ext/standard/tests/strings/unpack_bug68225.phpt2
-rw-r--r--ext/standard/tests/strings/unpack_error.phpt19
-rw-r--r--ext/standard/tests/strings/uuencode.phpt8
-rw-r--r--ext/standard/tests/strings/vfprintf_basic.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic3.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic4.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic5.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic6.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic7.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic7_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_basic9.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_error1.phpt22
-rw-r--r--ext/standard/tests/strings/vfprintf_error3.phpt4
-rw-r--r--ext/standard/tests/strings/vfprintf_error4.phpt23
-rw-r--r--ext/standard/tests/strings/vfprintf_variation1.phpt8
-rw-r--r--ext/standard/tests/strings/vfprintf_variation10.phptbin2964 -> 2942 bytes
-rw-r--r--ext/standard/tests/strings/vfprintf_variation11.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation11_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation12.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation12_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation13.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation13_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation14.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation14_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation15.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation15_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation16.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation16_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation17.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation18.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation19.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation19_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation20.phpt12
-rw-r--r--ext/standard/tests/strings/vfprintf_variation21.phpt23
-rw-r--r--ext/standard/tests/strings/vfprintf_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation4.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation4_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation6.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_variation7.phptbin2396 -> 2374 bytes
-rw-r--r--ext/standard/tests/strings/vfprintf_variation8.phpt42
-rw-r--r--ext/standard/tests/strings/vfprintf_variation9.phptbin1858 -> 1836 bytes
-rw-r--r--ext/standard/tests/strings/vprintf_basic1.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic2.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic3.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic4.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic5.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic6.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic7.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic7_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic8.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_basic9.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation1.phpt12
-rw-r--r--ext/standard/tests/strings/vprintf_variation10.phptbin2776 -> 2754 bytes
-rw-r--r--ext/standard/tests/strings/vprintf_variation11.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation11_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation12.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation12_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation13.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation13_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation14.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation14_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation15.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation15_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation16.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation16_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation17.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation18.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation19.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation19_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation2.phpt37
-rw-r--r--ext/standard/tests/strings/vprintf_variation3.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation4.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation4_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation6.phpt2
-rw-r--r--ext/standard/tests/strings/vprintf_variation7.phptbin2226 -> 2204 bytes
-rw-r--r--ext/standard/tests/strings/vprintf_variation8.phpt42
-rw-r--r--ext/standard/tests/strings/vprintf_variation9.phptbin1690 -> 1668 bytes
-rw-r--r--ext/standard/tests/strings/vsprintf_variation1.phpt10
-rw-r--r--ext/standard/tests/strings/vsprintf_variation15.phpt2
-rw-r--r--ext/standard/tests/strings/vsprintf_variation2.phpt26
-rw-r--r--ext/standard/tests/strings/vsprintf_variation8.phpt42
-rw-r--r--ext/standard/tests/strings/wordwrap.phpt11
-rw-r--r--ext/standard/tests/strings/wordwrap_error.phpt30
-rw-r--r--ext/standard/tests/time/bug38524.phpt2
-rw-r--r--ext/standard/tests/time/bug60222.phpt22
-rw-r--r--ext/standard/tests/time/strptime_basic.phpt2
-rw-r--r--ext/standard/tests/time/strptime_error.phpt31
-rw-r--r--ext/standard/tests/time/strptime_parts.phpt2
-rw-r--r--ext/standard/tests/url/base64_encode_basic_002.phpt2
1355 files changed, 6190 insertions, 23441 deletions
diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt
index f6aa37b9fb..8d088f9129 100644
--- a/ext/standard/tests/array/002.phpt
+++ b/ext/standard/tests/array/002.phpt
@@ -130,17 +130,17 @@ array(8) {
}
Using SORT_STRING
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
array(8) {
[1000]=>
string(4) "test"
@@ -240,15 +240,15 @@ array(8) {
}
Using SORT_STRING
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
array(8) {
[16777216]=>
float(-0.33333333333333)
@@ -544,17 +544,17 @@ array(8) {
}
Using SORT_STRING
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
array(8) {
[0]=>
string(4) "test"
@@ -654,15 +654,15 @@ array(8) {
}
Using SORT_STRING
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s002.php on line 16
+Warning: Array to string conversion in %s on line %d
array(8) {
[0]=>
float(-0.33333333333333)
diff --git a/ext/standard/tests/array/005.phpt b/ext/standard/tests/array/005.phpt
index c82f5f7fd0..c51e98a67b 100644
--- a/ext/standard/tests/array/005.phpt
+++ b/ext/standard/tests/array/005.phpt
@@ -33,18 +33,6 @@ $mixed_array = array(
/* Testing Error Conditions */
echo "\n*** Testing Error Conditions ***\n";
-/* Zero argument */
-var_dump( array_shift() );
-
-/* Scalar argument */
-var_dump( array_shift($number) );
-
-/* String argument */
-var_dump( array_shift($str) );
-
-/* Invalid Number of arguments */
-var_dump( array_shift($mixed_array[1],$mixed_array[2]) );
-
/* Empty Array as argument */
var_dump( array_shift($empty_array) );
@@ -83,18 +71,6 @@ echo"Done";
?>
--EXPECTF--
*** Testing Error Conditions ***
-
-Warning: array_shift() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
NULL
*** Testing with various array inputs ***
diff --git a/ext/standard/tests/array/009.phpt b/ext/standard/tests/array/009.phpt
index 017456917e..c62be0d27c 100644
--- a/ext/standard/tests/array/009.phpt
+++ b/ext/standard/tests/array/009.phpt
@@ -69,51 +69,6 @@ foreach ($varient_arrays as $sub_array ) {
echo "\n";
}
-/*test these functions on array which is already unset */
-echo "\n-- Testing variation: when array is unset --\n";
-$unset_array = array (1);
-unset($unset_array);
-
-var_dump( current($unset_array) );
-var_dump( key($unset_array) );
-var_dump( next($unset_array) );
-var_dump( reset($unset_array) );
-
-
-echo "\n*** Testing error conditions ***\n";
-//Zero argument, expected 1 argument
-var_dump( key() );
-var_dump( current() );
-var_dump( reset() );
-var_dump( next() );
-
-// args more than expected, expected 1 argument
-$temp_array = array(1);
-var_dump( key($temp_array, $temp_array) );
-var_dump( current($temp_array, $temp_array) );
-var_dump( reset($temp_array, $temp_array) );
-var_dump( next($temp_array, $temp_array) );
-
-// invalid args type, valid argument: array
-$int_var = 1;
-$float_var = 1.5;
-$string = "string";
-var_dump( key($int_var) );
-var_dump( key($float_var) );
-var_dump( key($string) );
-
-var_dump( current($int_var) );
-var_dump( current($float_var) );
-var_dump( current($string) );
-
-var_dump( next($int_var) );
-var_dump( next($float_var) );
-var_dump( next($string) );
-
-var_dump( reset($int_var) );
-var_dump( reset($float_var) );
-var_dump( reset($string) );
-
echo "Done\n";
?>
--EXPECTF--
@@ -456,84 +411,4 @@ array(5) {
string(4) "zero"
}
-
--- Testing variation: when array is unset --
-
-Notice: Undefined variable: unset_array in %s on line %d
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Notice: Undefined variable: unset_array in %s on line %d
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-*** Testing error conditions ***
-
-Warning: key() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: reset() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: next() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: key() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: next() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: key() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: key() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: current() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: current() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, float given in %s on line %d
-NULL
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/array/array_change_key_case_variation.phpt b/ext/standard/tests/array/array_change_key_case_variation.phpt
index 3f8d502ffe..f2b185523f 100644
--- a/ext/standard/tests/array/array_change_key_case_variation.phpt
+++ b/ext/standard/tests/array/array_change_key_case_variation.phpt
@@ -6,13 +6,16 @@ Test array_change_key_case() function - 2
$item = array ("one" => 1, "two" => 2, "THREE" => 3, "FOUR" => "four");
/* use 'case' argument other than CASE_LOWER & CASE_UPPER */
-var_dump(array_change_key_case($item, "CASE_UPPER"));
+try {
+ var_dump(array_change_key_case($item, "CASE_UPPER"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(array_change_key_case($item, 5));
/* when keys are different in terms of only case */
/* should return one value key pair with key being in lowercase */
var_dump( array_change_key_case( array("ONE" => 1, "one" => 3, "One" => 4) ) );
-var_dump( array_change_key_case( array("ONE" => 1, "one" => 6, "One" => 5), "CASE_UPPER" ) );
/* should return one value key pair with key being in uppercase */
var_dump( array_change_key_case( array("ONE" => 1, "one" => 2, "One" => 3), CASE_UPPER ) );
@@ -21,8 +24,7 @@ var_dump( array_change_key_case( array("ONE" => 1, "one" => 1, "One" => 2), 5 )
echo "end\n";
?>
--EXPECTF--
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
+array_change_key_case() expects parameter 2 to be int, string given
array(4) {
["ONE"]=>
int(1)
@@ -37,9 +39,6 @@ array(1) {
["one"]=>
int(4)
}
-
-Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d
-NULL
array(1) {
["ONE"]=>
int(3)
diff --git a/ext/standard/tests/array/array_chunk.phpt b/ext/standard/tests/array/array_chunk.phpt
deleted file mode 100644
index 2ee77e129c..0000000000
--- a/ext/standard/tests/array/array_chunk.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-array_chunk()
---FILE--
-<?php
-$array = array ();
-var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
- echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
- echo "\n";
-}
-?>
---EXPECT--
-array(0) {
-}
-[0]
-NULL
-NULL
-NULL
diff --git a/ext/standard/tests/array/array_chunk2.phpt b/ext/standard/tests/array/array_chunk2.phpt
index 6d8b74545e..c02194aa5b 100644
--- a/ext/standard/tests/array/array_chunk2.phpt
+++ b/ext/standard/tests/array/array_chunk2.phpt
@@ -3,8 +3,19 @@ basic array_chunk test
--FILE--
<?php
$input_array = array('a', 'b', 'c', 'd', 'e');
-var_dump(array_chunk($input_array, 0));
-var_dump(array_chunk($input_array, 0, true));
+
+try {
+ var_dump(array_chunk($input_array, 0));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(array_chunk($input_array, 0, true));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
var_dump(array_chunk($input_array, 1));
var_dump(array_chunk($input_array, 1, true));
var_dump(array_chunk($input_array, 2));
@@ -12,12 +23,9 @@ var_dump(array_chunk($input_array, 2, true));
var_dump(array_chunk($input_array, 10));
var_dump(array_chunk($input_array, 10, true));
?>
---EXPECTF--
-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
+--EXPECT--
+Size parameter expected to be greater than 0
+Size parameter expected to be greater than 0
array(5) {
[0]=>
array(1) {
diff --git a/ext/standard/tests/array/array_chunk_variation10.phpt b/ext/standard/tests/array/array_chunk_variation10.phpt
index 7b4bee172b..be5fcdc7f3 100644
--- a/ext/standard/tests/array/array_chunk_variation10.phpt
+++ b/ext/standard/tests/array/array_chunk_variation10.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 10
<?php
$array = array (1 => 1, 2 => 2, 3 => 3);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -21,11 +21,6 @@ array(3) {
[3]=>
int(3)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(3) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation11.phpt b/ext/standard/tests/array/array_chunk_variation11.phpt
index dca366652d..09ec255744 100644
--- a/ext/standard/tests/array/array_chunk_variation11.phpt
+++ b/ext/standard/tests/array/array_chunk_variation11.phpt
@@ -5,11 +5,11 @@ array_chunk() - variation 11
$array = array (0 => 0, 3 => 2);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -20,11 +20,6 @@ array(2) {
[3]=>
int(2)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation12.phpt b/ext/standard/tests/array/array_chunk_variation12.phpt
index 3b87dbab95..f85f2a8c0d 100644
--- a/ext/standard/tests/array/array_chunk_variation12.phpt
+++ b/ext/standard/tests/array/array_chunk_variation12.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 12
<?php
$array = array (1 => 1, 5 => 2, 8 => 3);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -21,11 +21,6 @@ array(3) {
[8]=>
int(3)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(3) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation13.phpt b/ext/standard/tests/array/array_chunk_variation13.phpt
index f6369df1c8..5cd6f0ea34 100644
--- a/ext/standard/tests/array/array_chunk_variation13.phpt
+++ b/ext/standard/tests/array/array_chunk_variation13.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 13
<?php
$array = array (1, 2);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -19,11 +19,6 @@ array(2) {
[1]=>
int(2)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation14.phpt b/ext/standard/tests/array/array_chunk_variation14.phpt
index f8d1b11790..97fce1e722 100644
--- a/ext/standard/tests/array/array_chunk_variation14.phpt
+++ b/ext/standard/tests/array/array_chunk_variation14.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 14
<?php
$array = array (0, 1, 2);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -21,11 +21,6 @@ array(3) {
[2]=>
int(2)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(3) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation15.phpt b/ext/standard/tests/array/array_chunk_variation15.phpt
index abec754a3d..c48af63f6c 100644
--- a/ext/standard/tests/array/array_chunk_variation15.phpt
+++ b/ext/standard/tests/array/array_chunk_variation15.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 15
<?php
$array = array (1, 2, 3);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -21,11 +21,6 @@ array(3) {
[2]=>
int(3)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(3) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation16.phpt b/ext/standard/tests/array/array_chunk_variation16.phpt
index 18179c8b07..3426f9278b 100644
--- a/ext/standard/tests/array/array_chunk_variation16.phpt
+++ b/ext/standard/tests/array/array_chunk_variation16.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 16
<?php
$array = array (0, 1, 2, 3);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -23,11 +23,6 @@ array(4) {
[3]=>
int(3)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(4) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation17.phpt b/ext/standard/tests/array/array_chunk_variation17.phpt
index 27507ea8cd..1a8bb5d340 100644
--- a/ext/standard/tests/array/array_chunk_variation17.phpt
+++ b/ext/standard/tests/array/array_chunk_variation17.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 17
<?php
$array = array (1, 2, 3, 4);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -23,11 +23,6 @@ array(4) {
[3]=>
int(4)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(4) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation18.phpt b/ext/standard/tests/array/array_chunk_variation18.phpt
index 7f0946f497..593c702ce9 100644
--- a/ext/standard/tests/array/array_chunk_variation18.phpt
+++ b/ext/standard/tests/array/array_chunk_variation18.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 18
<?php
$array = array (0, 1, 2, 3, 4);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -25,11 +25,6 @@ array(5) {
[4]=>
int(4)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(5) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation19.phpt b/ext/standard/tests/array/array_chunk_variation19.phpt
index d51389c9f3..f160cba263 100644
--- a/ext/standard/tests/array/array_chunk_variation19.phpt
+++ b/ext/standard/tests/array/array_chunk_variation19.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 19
<?php
$array = array (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -35,11 +35,6 @@ array(10) {
[9]=>
int(10)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(10) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation20.phpt b/ext/standard/tests/array/array_chunk_variation20.phpt
index cd5314ff04..d47279915c 100644
--- a/ext/standard/tests/array/array_chunk_variation20.phpt
+++ b/ext/standard/tests/array/array_chunk_variation20.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 20
<?php
$array = array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -37,11 +37,6 @@ array(11) {
[10]=>
int(10)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(11) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation21.phpt b/ext/standard/tests/array/array_chunk_variation21.phpt
index 678bf16751..e8c7784325 100644
--- a/ext/standard/tests/array/array_chunk_variation21.phpt
+++ b/ext/standard/tests/array/array_chunk_variation21.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 21
<?php
$array = array ("a" => 1);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
["a"]=>
int(1)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation22.phpt b/ext/standard/tests/array/array_chunk_variation22.phpt
index 45c458ebf9..b0eeade3ab 100644
--- a/ext/standard/tests/array/array_chunk_variation22.phpt
+++ b/ext/standard/tests/array/array_chunk_variation22.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 22
<?php
$array = array ("b" => 1, "c" => 2);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -19,11 +19,6 @@ array(2) {
["c"]=>
int(2)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation23.phpt b/ext/standard/tests/array/array_chunk_variation23.phpt
index 80b92985b1..87ced15132 100644
--- a/ext/standard/tests/array/array_chunk_variation23.phpt
+++ b/ext/standard/tests/array/array_chunk_variation23.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 23
<?php
$array = array ("p" => 1, "q" => 2, "r" => 3, "s" => 4, "u" => 5, "v" => 6);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -27,11 +27,6 @@ array(6) {
["v"]=>
int(6)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(6) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation24.phpt b/ext/standard/tests/array/array_chunk_variation24.phpt
index e25f53f6b6..69dce7be17 100644
--- a/ext/standard/tests/array/array_chunk_variation24.phpt
+++ b/ext/standard/tests/array/array_chunk_variation24.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 24
<?php
$array = array ("a" => "A");
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
["a"]=>
string(1) "A"
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation25.phpt b/ext/standard/tests/array/array_chunk_variation25.phpt
index eae89e952b..09303c30ba 100644
--- a/ext/standard/tests/array/array_chunk_variation25.phpt
+++ b/ext/standard/tests/array/array_chunk_variation25.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 25
<?php
$array = array ("p" => "A", "q" => "B", "r" => "C", "s" => "D", "u" => "E", "v" => "F");
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -27,11 +27,6 @@ array(6) {
["v"]=>
string(1) "F"
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(6) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation26.phpt b/ext/standard/tests/array/array_chunk_variation26.phpt
index 487f6b4f67..ca6975a64e 100644
--- a/ext/standard/tests/array/array_chunk_variation26.phpt
+++ b/ext/standard/tests/array/array_chunk_variation26.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 26
<?php
$array =array (0);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
[0]=>
int(0)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation27.phpt b/ext/standard/tests/array/array_chunk_variation27.phpt
index a83a16b7fb..aa91036a52 100644
--- a/ext/standard/tests/array/array_chunk_variation27.phpt
+++ b/ext/standard/tests/array/array_chunk_variation27.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 27
<?php
$array = array (1);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
[0]=>
int(1)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation28.phpt b/ext/standard/tests/array/array_chunk_variation28.phpt
index bdbaf45cbd..5389049ce4 100644
--- a/ext/standard/tests/array/array_chunk_variation28.phpt
+++ b/ext/standard/tests/array/array_chunk_variation28.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 28
<?php
$array = array (-1);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
[0]=>
int(-1)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation29.phpt b/ext/standard/tests/array/array_chunk_variation29.phpt
index 12f50c1190..f18de5ea85 100644
--- a/ext/standard/tests/array/array_chunk_variation29.phpt
+++ b/ext/standard/tests/array/array_chunk_variation29.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 29
<?php
$array = array (0, 2);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -19,11 +19,6 @@ array(2) {
[1]=>
int(2)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation30.phpt b/ext/standard/tests/array/array_chunk_variation30.phpt
index 281537a876..0dbd9b6368 100644
--- a/ext/standard/tests/array/array_chunk_variation30.phpt
+++ b/ext/standard/tests/array/array_chunk_variation30.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 30
<?php
$array = array (1, 2, 3);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -21,11 +21,6 @@ array(3) {
[2]=>
int(3)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(3) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation31.phpt b/ext/standard/tests/array/array_chunk_variation31.phpt
index 1592679839..fd7f358ca0 100644
--- a/ext/standard/tests/array/array_chunk_variation31.phpt
+++ b/ext/standard/tests/array/array_chunk_variation31.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 31
<?php
$array = array (1 => 0);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
[1]=>
int(0)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation32.phpt b/ext/standard/tests/array/array_chunk_variation32.phpt
index cf65993c0b..09471a59aa 100644
--- a/ext/standard/tests/array/array_chunk_variation32.phpt
+++ b/ext/standard/tests/array/array_chunk_variation32.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 32
<?php
$array = array (2 => 1);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
[2]=>
int(1)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation5.phpt b/ext/standard/tests/array/array_chunk_variation5.phpt
index 50050892e7..21f1a3dce2 100644
--- a/ext/standard/tests/array/array_chunk_variation5.phpt
+++ b/ext/standard/tests/array/array_chunk_variation5.phpt
@@ -26,26 +26,33 @@ $sizes = array(-1, count($input_array) + 1, 0, 1.5);
// loop through the array for size argument
foreach ($sizes as $size){
- echo "\n-- Testing array_chunk() when size = $size --\n";
- var_dump( array_chunk($input_array, $size) );
- var_dump( array_chunk($input_array, $size, true) );
- var_dump( array_chunk($input_array, $size, false) );
+ echo "\n-- Testing array_chunk() when size = $size --\n";
+ try {
+ var_dump( array_chunk($input_array, $size) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ var_dump( array_chunk($input_array, $size, true) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ var_dump( array_chunk($input_array, $size, false) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
-echo "Done";
?>
---EXPECTF--
+
+DONE
+--EXPECT--
*** Testing array_chunk() : usage variations ***
-- Testing array_chunk() when size = -1 --
-
-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
+Size parameter expected to be greater than 0
+Size parameter expected to be greater than 0
+Size parameter expected to be greater than 0
-- Testing array_chunk() when size = 4 --
array(1) {
@@ -83,15 +90,9 @@ array(1) {
}
-- Testing array_chunk() when size = 0 --
-
-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
+Size parameter expected to be greater than 0
+Size parameter expected to be greater than 0
+Size parameter expected to be greater than 0
-- Testing array_chunk() when size = 1.5 --
array(3) {
@@ -145,4 +146,5 @@ array(3) {
int(3)
}
}
-Done
+
+DONE
diff --git a/ext/standard/tests/array/array_chunk_variation8.phpt b/ext/standard/tests/array/array_chunk_variation8.phpt
index 6a6e752ecb..64b9bb2036 100644
--- a/ext/standard/tests/array/array_chunk_variation8.phpt
+++ b/ext/standard/tests/array/array_chunk_variation8.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 8
<?php
$array = array (3 => -1);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -17,11 +17,6 @@ array(1) {
[3]=>
int(-1)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_chunk_variation9.phpt b/ext/standard/tests/array/array_chunk_variation9.phpt
index ec57da4f88..a68240e6f6 100644
--- a/ext/standard/tests/array/array_chunk_variation9.phpt
+++ b/ext/standard/tests/array/array_chunk_variation9.phpt
@@ -4,11 +4,11 @@ array_chunk() - variation 9
<?php
$array = array (1 => 0, 2 => 2);
var_dump ($array);
-for ($i = 0; $i < (sizeof($array) + 1); $i++) {
+for ($i = 1; $i < (sizeof($array) + 1); $i++) {
echo "[$i]\n";
- var_dump (@array_chunk ($array, $i));
- var_dump (@array_chunk ($array, $i, TRUE));
- var_dump (@array_chunk ($array, $i, FALSE));
+ var_dump (array_chunk ($array, $i));
+ var_dump (array_chunk ($array, $i, TRUE));
+ var_dump (array_chunk ($array, $i, FALSE));
echo "\n";
}
?>
@@ -19,11 +19,6 @@ array(2) {
[2]=>
int(2)
}
-[0]
-NULL
-NULL
-NULL
-
[1]
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_column_error.phpt b/ext/standard/tests/array/array_column_error.phpt
index 26a09aff24..6fb5169d45 100644
--- a/ext/standard/tests/array/array_column_error.phpt
+++ b/ext/standard/tests/array/array_column_error.phpt
@@ -10,73 +10,51 @@ Test array_column() function: error conditions
*/
echo "*** Testing array_column() : error conditions ***\n";
-
-echo "\n-- Testing array_column() function with Zero arguments --\n";
-var_dump(array_column());
-
-echo "\n-- Testing array_column() function with One argument --\n";
-var_dump(array_column(array()));
-
-echo "\n-- Testing array_column() function with string as first parameter --\n";
-var_dump(array_column('foo', 0));
-
-echo "\n-- Testing array_column() function with int as first parameter --\n";
-var_dump(array_column(1, 'foo'));
-
echo "\n-- Testing array_column() column key parameter should be a string or an integer (testing bool) --\n";
-var_dump(array_column(array(), true));
+try {
+ var_dump(array_column(array(), true));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
+
echo "\n-- Testing array_column() column key parameter should be a string or integer (testing array) --\n";
-var_dump(array_column(array(), array()));
+try {
+ var_dump(array_column(array(), array()));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
echo "\n-- Testing array_column() index key parameter should be a string or an integer (testing bool) --\n";
-var_dump(array_column(array(), 'foo', true));
+try {
+ var_dump(array_column(array(), 'foo', true));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
echo "\n-- Testing array_column() index key parameter should be a string or integer (testing array) --\n";
-var_dump(array_column(array(), 'foo', array()));
+try {
+ var_dump(array_column(array(), 'foo', array()));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
-echo "Done\n";
?>
---EXPECTF--
-*** Testing array_column() : error conditions ***
-
--- Testing array_column() function with Zero arguments --
-
-Warning: array_column() expects at least 2 parameters, 0 given in %s on line %d
-NULL
--- Testing array_column() function with One argument --
-
-Warning: array_column() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing array_column() function with string as first parameter --
-
-Warning: array_column() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Testing array_column() function with int as first parameter --
-
-Warning: array_column() expects parameter 1 to be array, int given in %s on line %d
-NULL
+DONE
+--EXPECT--
+*** Testing array_column() : error conditions ***
-- Testing array_column() column key parameter should be a string or an integer (testing bool) --
-
-Warning: array_column(): The column key should be either a string or an integer in %s on line %d
-bool(false)
+The column key should be either a string or an integer
-- Testing array_column() column key parameter should be a string or integer (testing array) --
-
-Warning: array_column(): The column key should be either a string or an integer in %s on line %d
-bool(false)
+The column key should be either a string or an integer
-- Testing array_column() index key parameter should be a string or an integer (testing bool) --
-
-Warning: array_column(): The index key should be either a string or an integer in %s on line %d
-bool(false)
+The index key should be either a string or an integer
-- Testing array_column() index key parameter should be a string or integer (testing array) --
+The index key should be either a string or an integer
-Warning: array_column(): The index key should be either a string or an integer in %s on line %d
-bool(false)
-Done
+DONE
diff --git a/ext/standard/tests/array/array_combine_error2.phpt b/ext/standard/tests/array/array_combine_error2.phpt
index 2d820a0d21..463dc6dfe8 100644
--- a/ext/standard/tests/array/array_combine_error2.phpt
+++ b/ext/standard/tests/array/array_combine_error2.phpt
@@ -16,19 +16,32 @@ var_dump( array_combine(array(), array()) );
// Testing array_combine by passing empty array to $keys
echo "\n-- Testing array_combine() function with empty array for \$keys argument --\n";
-var_dump( array_combine(array(), array(1, 2)) );
+try {
+ var_dump( array_combine(array(), array(1, 2)) );
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
// Testing array_combine by passing empty array to $values
echo "\n-- Testing array_combine() function with empty array for \$values argument --\n";
-var_dump( array_combine(array(1, 2), array()) );
+try {
+ var_dump( array_combine(array(1, 2), array()) );
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
// Testing array_combine with arrays having unequal number of elements
echo "\n-- Testing array_combine() function by passing array with unequal number of elements --\n";
-var_dump( array_combine(array(1, 2), array(1, 2, 3)) );
+try {
+ var_dump( array_combine(array(1, 2), array(1, 2, 3)) );
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
-echo "Done";
?>
---EXPECTF--
+
+DONE
+--EXPECT--
*** Testing array_combine() : error conditions specific to array_combine() ***
-- Testing array_combine() function with empty arrays --
@@ -36,17 +49,9 @@ array(0) {
}
-- Testing array_combine() function with empty array for $keys argument --
-
-Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
-bool(false)
-
+Both parameters should have an equal number of elements
-- Testing array_combine() function with empty array for $values argument --
-
-Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
-bool(false)
-
+Both parameters should have an equal number of elements
-- Testing array_combine() function by passing array with unequal number of elements --
-
-Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
-bool(false)
-Done
+Both parameters should have an equal number of elements
+DONE
diff --git a/ext/standard/tests/array/array_combine_variation4.phpt b/ext/standard/tests/array/array_combine_variation4.phpt
index a7ea0a9dc4..5726eb73e6 100644
--- a/ext/standard/tests/array/array_combine_variation4.phpt
+++ b/ext/standard/tests/array/array_combine_variation4.phpt
@@ -60,10 +60,10 @@ $arrays = array (
array("hello", $heredoc => "string"), // heredoc
// array with object, unset variable and resource variable
-/*10*/ array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'),
+/*10*/ array(@$unset_var => "hello", $fp => 'resource'),
// array with mixed keys
-/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2,
+/*11*/ array('hello' => 1, "fruit" => 2.2,
$fp => 'resource', 133 => "int", 444.432 => "float",
@$unset_var => "unset", $heredoc => "heredoc")
);
@@ -71,7 +71,7 @@ $arrays = array (
// array to be passsed to $arr2 argument
$arr2 = array(0 => 0, 2 => "float", 4 => "f3", 33333333 => "f4",
"\tHello" => 111, 2.2, 'color', "Hello world" => "string",
- "pen\n" => 33, new classA() => 11, 133 => "int");
+ "pen\n" => 33, 133 => "int");
// loop through each sub-array within $arrays to check the behavior of array_combine()
// same arrays are passed to both $keys and $values
@@ -90,15 +90,9 @@ echo "Done";
--EXPECTF--
*** Testing array_combine() : assoc array with diff keys to both $keys and $values argument ***
-Warning: Illegal offset type in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-- Iteration 1 --
array(0) {
}
diff --git a/ext/standard/tests/array/array_count_values2.phpt b/ext/standard/tests/array/array_count_values2.phpt
index 8aaf445f93..cb0c330965 100644
--- a/ext/standard/tests/array/array_count_values2.phpt
+++ b/ext/standard/tests/array/array_count_values2.phpt
@@ -18,11 +18,11 @@ $array1 = array(1,
var_dump(array_count_values($array1));
?>
--EXPECTF--
-Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
+Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
-Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
+Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
-Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
+Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
array(8) {
[1]=>
int(2)
diff --git a/ext/standard/tests/array/array_diff_1.phpt b/ext/standard/tests/array/array_diff_1.phpt
index a7ee015346..2e2b135128 100644
--- a/ext/standard/tests/array/array_diff_1.phpt
+++ b/ext/standard/tests/array/array_diff_1.phpt
@@ -6,10 +6,14 @@ Test array_diff when non-array is passed
$a = array();
$b = 3;
$c = array(5);
-array_diff($a, $b, $c);
+try {
+ array_diff($a, $b, $c);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//-=-=-=-=-=-
echo "OK!";
?>
--EXPECTF--
-Warning: array_diff(): Expected parameter 2 to be an array, int given in %s
+Expected parameter 2 to be an array, int given
OK!
diff --git a/ext/standard/tests/array/array_diff_assoc_error.phpt b/ext/standard/tests/array/array_diff_assoc_error.phpt
index fc8c70c67c..6aa7864ee9 100644
--- a/ext/standard/tests/array/array_diff_assoc_error.phpt
+++ b/ext/standard/tests/array/array_diff_assoc_error.phpt
@@ -16,13 +16,20 @@ echo "*** Testing array_diff_assoc() : error conditions ***\n";
// Zero arguments
echo "\n-- Testing array_diff_assoc() function with zero arguments --\n";
-var_dump( array_diff_assoc() );
+try {
+ var_dump( array_diff_assoc() );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_diff_assoc with one less than the expected number of arguments
echo "\n-- Testing array_diff_assoc() function with less than expected no. of arguments --\n";
$arr1 = array(1, 2);
-var_dump( array_diff_assoc($arr1) );
-
+try {
+ var_dump( array_diff_assoc($arr1) );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
@@ -30,12 +37,8 @@ echo "Done";
*** Testing array_diff_assoc() : error conditions ***
-- Testing array_diff_assoc() function with zero arguments --
-
-Warning: array_diff_assoc(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
+At least 2 parameters are required, 0 given
-- Testing array_diff_assoc() function with less than expected no. of arguments --
-
-Warning: array_diff_assoc(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
+At least 2 parameters are required, 1 given
Done
diff --git a/ext/standard/tests/array/array_diff_assoc_variation1.phpt b/ext/standard/tests/array/array_diff_assoc_variation1.phpt
index 2172e695d3..270660a8cf 100644
--- a/ext/standard/tests/array/array_diff_assoc_variation1.phpt
+++ b/ext/standard/tests/array/array_diff_assoc_variation1.phpt
@@ -91,143 +91,95 @@ $inputs = array(
// loop through each element of $inputs to check the behavior of array_diff_assoc
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_diff_assoc($input, $array));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(array_diff_assoc($input, $array));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
-- Iteration 1 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
-- Iteration 2 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
-- Iteration 3 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
-- Iteration 4 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
-- Iteration 5 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
-- Iteration 6 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
-- Iteration 7 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
-- Iteration 8 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
-- Iteration 9 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
-- Iteration 10 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
-- Iteration 11 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
-- Iteration 12 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
-- Iteration 13 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
-- Iteration 14 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
-- Iteration 15 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
-- Iteration 16 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 17 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 18 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 19 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 20 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 21 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 22 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
-- Iteration 23 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
-- Iteration 24 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
-- Iteration 25 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
-- Iteration 26 --
-
-Warning: array_diff_assoc(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+Expected parameter 1 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_diff_assoc_variation2.phpt b/ext/standard/tests/array/array_diff_assoc_variation2.phpt
index a57f10fce0..9185b53439 100644
--- a/ext/standard/tests/array/array_diff_assoc_variation2.phpt
+++ b/ext/standard/tests/array/array_diff_assoc_variation2.phpt
@@ -91,143 +91,95 @@ $inputs = array(
// loop through each element of $inputs to check the behavior of array_diff_assoc
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_diff_assoc($array, $input));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(array_diff_assoc($array, $input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
-- Iteration 1 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 2 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 3 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 4 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 5 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 6 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 7 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 8 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 9 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 10 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 11 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 12 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 13 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 14 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 15 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 16 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 17 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 18 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 19 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 20 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 21 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 22 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 23 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
-- Iteration 24 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 25 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 26 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+Expected parameter 2 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_diff_error.phpt b/ext/standard/tests/array/array_diff_error.phpt
index 25be6e1c55..d269f010b8 100644
--- a/ext/standard/tests/array/array_diff_error.phpt
+++ b/ext/standard/tests/array/array_diff_error.phpt
@@ -15,13 +15,21 @@ Test array_diff() function : error conditions - too few arguments passed to func
echo "*** Testing array_diff() : error conditions ***\n";
// Zero arguments
echo "\n-- Testing array_diff() function with zero arguments --\n";
-var_dump( array_diff() );
+try {
+ var_dump( array_diff() );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_diff with one less than the expected number of arguments
echo "\n-- Testing array_diff() function with less than expected no. of arguments --\n";
$arr1 = array(1, 2);
-var_dump( array_diff($arr1) );
+try {
+ var_dump( array_diff($arr1) );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
@@ -29,12 +37,8 @@ echo "Done";
*** Testing array_diff() : error conditions ***
-- Testing array_diff() function with zero arguments --
-
-Warning: array_diff(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
+At least 2 parameters are required, 0 given
-- Testing array_diff() function with less than expected no. of arguments --
-
-Warning: array_diff(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
+At least 2 parameters are required, 1 given
Done
diff --git a/ext/standard/tests/array/array_diff_key_error.phpt b/ext/standard/tests/array/array_diff_key_error.phpt
index 05d5cf3c27..e957abce1c 100644
--- a/ext/standard/tests/array/array_diff_key_error.phpt
+++ b/ext/standard/tests/array/array_diff_key_error.phpt
@@ -14,23 +14,25 @@ $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
// Testing array_diff_key with one less than the expected number of arguments
echo "\n-- Testing array_diff_key() function with less than expected no. of arguments --\n";
-var_dump( array_diff_key($array1) );
+try {
+ var_dump( array_diff_key($array1) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_diff_key with no arguments
echo "\n-- Testing array_diff_key() function with no arguments --\n";
-var_dump( array_diff_key() );
+try {
+ var_dump( array_diff_key() );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
--EXPECTF--
*** Testing array_diff_key() : error conditions ***
-- Testing array_diff_key() function with less than expected no. of arguments --
-
-Warning: array_diff_key(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
+At least 2 parameters are required, 1 given
-- Testing array_diff_key() function with no arguments --
-
-Warning: array_diff_key(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
-===DONE===
+At least 2 parameters are required, 0 given
diff --git a/ext/standard/tests/array/array_diff_key_variation1.phpt b/ext/standard/tests/array/array_diff_key_variation1.phpt
index 3e689a0e8f..7cc280c966 100644
--- a/ext/standard/tests/array/array_diff_key_variation1.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation1.phpt
@@ -89,222 +89,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_key($value, $array2) );
- var_dump( array_diff_key($value, $array2, $array3) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_diff_key($value, $array2) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_diff_key($value, $array2, $array3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_key() : usage variation ***
--int 0--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--resource--
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
diff --git a/ext/standard/tests/array/array_diff_key_variation2.phpt b/ext/standard/tests/array/array_diff_key_variation2.phpt
index fb0bcd6796..e38c10a3c9 100644
--- a/ext/standard/tests/array/array_diff_key_variation2.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation2.phpt
@@ -90,222 +90,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_key($array1, $value) );
- var_dump( array_diff_key($array1, $value, $array3) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_diff_key($array1, $value) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_diff_key($array1, $value, $array3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_key() : usage variation ***
--int 0--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--resource--
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_diff_key(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
diff --git a/ext/standard/tests/array/array_diff_key_variation3.phpt b/ext/standard/tests/array/array_diff_key_variation3.phpt
deleted file mode 100644
index 36741dba33..0000000000
--- a/ext/standard/tests/array/array_diff_key_variation3.phpt
+++ /dev/null
@@ -1,232 +0,0 @@
---TEST--
-Test array_diff_key() function : usage variation - Passing unexpected values to third optional argument
---FILE--
-<?php
-/* Prototype : array array_diff_key(array arr1, array arr2 [, array ...])
- * Description: Returns the entries of arr1 that have keys which are not present in any of the others arguments.
- * Source code: ext/standard/array.c
- */
-
-echo "*** Testing array_diff_key() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
-$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__, "r");
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-//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,
-
- // 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 data
- 'resource' => $fp,
-);
-
-// loop through each element of the array for arr1
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_key($array1, $array2, $value) );
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing array_diff_key() : usage variation ***
-
---int 0--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 1--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 12345--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int -12345--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---float 10.5--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -10.5--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float .5--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase null--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase true--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---lowercase false--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---undefined var--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---unset var--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---resource--
-
-Warning: array_diff_key(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_key_variation4.phpt b/ext/standard/tests/array/array_diff_key_variation4.phpt
index c7171dc440..c4206eaa5c 100644
--- a/ext/standard/tests/array/array_diff_key_variation4.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation4.phpt
@@ -25,7 +25,6 @@ foreach($input_arrays as $key =>$value) {
var_dump( array_diff_key($value, $input_array) );
}
?>
-===DONE===
--EXPECT--
*** Testing array_diff_key() : usage variation ***
@@ -58,4 +57,3 @@ array(1) {
[18]=>
string(4) "0x12"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_key_variation5.phpt b/ext/standard/tests/array/array_diff_key_variation5.phpt
index f5017ba63b..cadb34d6d3 100644
--- a/ext/standard/tests/array/array_diff_key_variation5.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation5.phpt
@@ -18,7 +18,6 @@ echo "\n-- Testing array_diff_key() function with float indexed array --\n";
var_dump( array_diff_key($input_array, $float_indx_array) );
var_dump( array_diff_key($float_indx_array, $input_array) );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_key() : usage variation ***
@@ -31,4 +30,3 @@ array(2) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_key_variation6.phpt b/ext/standard/tests/array/array_diff_key_variation6.phpt
index 7f00c4b3ab..bc7f7a15c9 100644
--- a/ext/standard/tests/array/array_diff_key_variation6.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation6.phpt
@@ -18,7 +18,6 @@ echo "\n-- Testing array_diff_key() function with boolean indexed array --\n";
var_dump( array_diff_key($input_array, $boolean_indx_array) );
var_dump( array_diff_key($boolean_indx_array, $input_array) );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_key() : usage variation ***
@@ -33,4 +32,3 @@ array(3) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_key_variation7.phpt b/ext/standard/tests/array/array_diff_key_variation7.phpt
index 02cf2c9e67..1f9e04b36d 100644
--- a/ext/standard/tests/array/array_diff_key_variation7.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation7.phpt
@@ -29,7 +29,6 @@ foreach($input_arrays as $key =>$value) {
var_dump( array_diff_key($value, $input_array) );
}
?>
-===DONE===
--EXPECT--
*** Testing array_diff_key() : usage variation ***
@@ -56,4 +55,3 @@ array(1) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_key_variation8.phpt b/ext/standard/tests/array/array_diff_key_variation8.phpt
index 349ebbbc6e..f96a1db578 100644
--- a/ext/standard/tests/array/array_diff_key_variation8.phpt
+++ b/ext/standard/tests/array/array_diff_key_variation8.phpt
@@ -32,7 +32,6 @@ echo "\n-- Testing array_diff_key() function with multi dimensional array --\n";
var_dump( array_diff_key($array1, $array2) );
var_dump( array_diff_key($array2, $array1) );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_key() : usage variation ***
@@ -51,4 +50,3 @@ array(1) {
string(3) "two"
}
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_error.phpt b/ext/standard/tests/array/array_diff_uassoc_error.phpt
index d90c80f20b..33fa0e7bea 100644
--- a/ext/standard/tests/array/array_diff_uassoc_error.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_error.phpt
@@ -27,36 +27,32 @@ function key_compare_func($a, $b)
//Test array_diff_uassoc with one more than the expected number of arguments
echo "\n-- Testing array_diff_uassoc() function with more than expected no. of arguments --\n";
-var_dump( array_diff_uassoc($array1, $array2, "key_compare_func", $extra_arg) );
-var_dump( array_diff_uassoc($array1, $array2, $array3, $array4, "key_compare_func", $extra_arg) );
+try {
+ var_dump( array_diff_uassoc($array1, $array2, "key_compare_func", $extra_arg) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( array_diff_uassoc($array1, $array2, $array3, $array4, "key_compare_func", $extra_arg) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_diff_uassoc with one less than the expected number of arguments
echo "\n-- Testing array_diff_uassoc() function with less than expected no. of arguments --\n";
-var_dump( array_diff_uassoc($array1, $array2) );
+try {
+ var_dump( array_diff_uassoc($array1, $array2) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
-// Testing array_diff_uassoc with no arguments
-echo "\n-- Testing array_diff_uassoc() function with no arguments --\n";
-var_dump( array_diff_uassoc() );
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_uassoc() : error conditions ***
-- Testing array_diff_uassoc() function with more than expected no. of arguments --
-
-Warning: array_diff_uassoc() expects parameter 4 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_diff_uassoc() expects parameter 6 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
+array_diff_uassoc() expects parameter 4 to be a valid callback, array must have exactly two members
+array_diff_uassoc() expects parameter 6 to be a valid callback, array must have exactly two members
-- Testing array_diff_uassoc() function with less than expected no. of arguments --
-
-Warning: array_diff_uassoc(): at least 3 parameters are required, 2 given in %s on line %d
-NULL
-
--- Testing array_diff_uassoc() function with no arguments --
-
-Warning: array_diff_uassoc(): at least 3 parameters are required, 0 given in %s on line %d
-NULL
-===DONE===
+At least 3 parameters are required, 2 given
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt
index aad42705db..b0cf97e0a4 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt
@@ -102,143 +102,93 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_uassoc($value, $array2, "key_compare_func") );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_diff_uassoc($value, $array2, "key_compare_func") );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
--int 0--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
--resource--
-
-Warning: array_diff_uassoc(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, resource given
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation10.phpt b/ext/standard/tests/array/array_diff_uassoc_variation10.phpt
index a32d566062..2b103f2c69 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation10.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation10.phpt
@@ -19,7 +19,6 @@ var_dump( array_diff_uassoc($input_array, $float_indx_array, "strcasecmp") );
var_dump( array_diff_uassoc($float_indx_array, $input_array, "strcasecmp") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -44,4 +43,3 @@ array(3) {
[-10]=>
string(5) "-10.5"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation11.phpt b/ext/standard/tests/array/array_diff_uassoc_variation11.phpt
index d317bfcde0..6101d6e300 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation11.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation11.phpt
@@ -19,7 +19,6 @@ var_dump( array_diff_uassoc($input_array, $boolean_indx_array, "strcasecmp") );
var_dump( array_diff_uassoc($boolean_indx_array, $input_array, "strcasecmp") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -42,4 +41,3 @@ array(2) {
[0]=>
string(5) "boolF"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation12.phpt b/ext/standard/tests/array/array_diff_uassoc_variation12.phpt
index c0f88f5051..c5de67a5cb 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation12.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation12.phpt
@@ -30,7 +30,6 @@ foreach($input_arrays as $key =>$value) {
}
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -57,4 +56,3 @@ array(1) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation13.phpt b/ext/standard/tests/array/array_diff_uassoc_variation13.phpt
index 53a45ee278..2f70787487 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation13.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation13.phpt
@@ -32,7 +32,6 @@ var_dump( array_diff_uassoc($array1, $array2, "strcasecmp") );
var_dump( array_diff_uassoc($array2, $array1, "strcasecmp") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -65,4 +64,3 @@ array(0) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt
index ae664f9812..a05cc8332f 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt
@@ -102,143 +102,93 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_uassoc($array1, $value, "key_compare_func") );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_diff_uassoc($array1, $value, "key_compare_func") );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
--int 0--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
--resource--
-
-Warning: array_diff_uassoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, resource given
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation4.phpt b/ext/standard/tests/array/array_diff_uassoc_variation4.phpt
deleted file mode 100644
index 8ea51a4103..0000000000
--- a/ext/standard/tests/array/array_diff_uassoc_variation4.phpt
+++ /dev/null
@@ -1,246 +0,0 @@
---TEST--
-Test array_diff_uassoc() function : usage variation -Passing unexpected values as third optional argument
---FILE--
-<?php
-/* Prototype : array array_diff_uassoc(array arr1, array arr2 [, array ...], callback key_comp_func)
- * Description: Computes the difference of arrays with additional index check which is performed by a
- * user supplied callback function
- * Source code: ext/standard/array.c
- */
-
-echo "*** Testing array_diff_uassoc() : usage variation ***\n";
-
-//Initialize variables
-$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
-$array2 = array("a" => "green", "yellow", "red");
-
-
-function key_compare_func($a, $b)
-{
- if ($a === $b) {
- return 0;
- }
- return ($a > $b)? 1:-1;
-}
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__, "r");
-
-// 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,
-
- // 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 data
- 'resource' => $fp,
-);
-
-// loop through each element of the array for arr2
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_uassoc($array1, $array2, $value, "key_compare_func") );
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing array_diff_uassoc() : usage variation ***
-
---int 0--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 1--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 12345--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int -12345--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---float 10.5--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -10.5--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float .5--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase null--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase true--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---lowercase false--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---undefined var--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---unset var--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---resource--
-
-Warning: array_diff_uassoc(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation5.phpt b/ext/standard/tests/array/array_diff_uassoc_variation5.phpt
index 9cd44cf1d8..81f173c72b 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation5.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation5.phpt
@@ -28,7 +28,6 @@ var_dump( array_diff_uassoc($arr_default_int, $arr_float, "key_compare_func") );
var_dump( array_diff_uassoc($arr_float, $arr_default_int, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -37,4 +36,3 @@ array(0) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation6.phpt b/ext/standard/tests/array/array_diff_uassoc_variation6.phpt
index 463ca80d5c..e96c893b46 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation6.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation6.phpt
@@ -32,7 +32,6 @@ var_dump( array_diff_uassoc($arr_float, $arr_string_float, "key_compare_func") )
var_dump( array_diff_uassoc($arr_string_float, $arr_float, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -55,4 +54,3 @@ array(2) {
["1.00"]=>
string(4) "2.00"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation7.phpt b/ext/standard/tests/array/array_diff_uassoc_variation7.phpt
index 4312688c59..2efaa1f830 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation7.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation7.phpt
@@ -27,7 +27,6 @@ var_dump( array_diff_uassoc($arr_string_int, $arr_string_float, "key_compare_fun
var_dump( array_diff_uassoc($arr_string_float, $arr_string_int, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -44,4 +43,3 @@ array(2) {
["1.00"]=>
string(4) "2.00"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation8.phpt b/ext/standard/tests/array/array_diff_uassoc_variation8.phpt
index 7bbe12212b..bdb2407296 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation8.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation8.phpt
@@ -32,7 +32,6 @@ var_dump( array_diff_uassoc($arr_default_int, $arr_string_float, "key_compare_fu
var_dump( array_diff_uassoc($arr_string_float, $arr_default_int, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -59,4 +58,3 @@ array(2) {
["1.00"]=>
string(4) "2.00"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_uassoc_variation9.phpt b/ext/standard/tests/array/array_diff_uassoc_variation9.phpt
index fa36ea3ac2..7f9d8178ee 100644
--- a/ext/standard/tests/array/array_diff_uassoc_variation9.phpt
+++ b/ext/standard/tests/array/array_diff_uassoc_variation9.phpt
@@ -26,7 +26,6 @@ foreach($input_arrays as $key =>$value) {
}
?>
-===DONE===
--EXPECT--
*** Testing array_diff_uassoc() : usage variation ***
@@ -59,4 +58,3 @@ array(1) {
[-7]=>
int(-7)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation1.phpt b/ext/standard/tests/array/array_diff_ukey_variation1.phpt
index bbf349c4fd..12df148790 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation1.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation1.phpt
@@ -97,222 +97,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_ukey($value, $array2, 'key_compare_func') );
- var_dump( array_diff_ukey($value, $array2, $array3, 'key_compare_func') );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_diff_ukey($value, $array2, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_diff_ukey($value, $array2, $array3, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
--int 0--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--resource--
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt
index 09b4a70237..b2304bb446 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation10.phpt
@@ -14,27 +14,21 @@ $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "green", "yellow", "red");
//function name within double quotes
-var_dump( array_diff_ukey($array1, $array1, "unknown_function") );
+try {
+ var_dump( array_diff_ukey($array1, $array1, "unknown_function") );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//function name within single quotes
-var_dump( array_diff_ukey($array1, $array1, 'unknown_function') );
-
-//function name without quotes
-var_dump( array_diff_ukey($array1, $array1, unknown_function) );
+try {
+ var_dump( array_diff_ukey($array1, $array1, 'unknown_function') );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
-
-Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-
-Warning: Use of undefined constant unknown_function - assumed 'unknown_function' (this will throw an Error in a future version of PHP) in %s on line %d
-
-Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-===DONE===
+array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
+array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
diff --git a/ext/standard/tests/array/array_diff_ukey_variation2.phpt b/ext/standard/tests/array/array_diff_ukey_variation2.phpt
index 38141a430c..ee0251f177 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation2.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation2.phpt
@@ -101,222 +101,124 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_ukey($array1, $value, 'key_compare_func') );
- var_dump( array_diff_ukey($array1, $value, $array3, 'key_compare_func') );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_diff_ukey($array1, $value, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_diff_ukey($array1, $value, $array3, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
--int 0--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--resource--
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_diff_ukey(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
diff --git a/ext/standard/tests/array/array_diff_ukey_variation3.phpt b/ext/standard/tests/array/array_diff_ukey_variation3.phpt
deleted file mode 100644
index 572061d697..0000000000
--- a/ext/standard/tests/array/array_diff_ukey_variation3.phpt
+++ /dev/null
@@ -1,240 +0,0 @@
---TEST--
-Test array_diff_ukey() function : usage variation - Passing unexpected values to third optional argument
---FILE--
-<?php
-/* Prototype : array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)
- * Description: Returns the entries of arr1 that have keys which are not present in any of the others arguments.
- * Source code: ext/standard/array.c
- */
-
-echo "*** Testing array_diff_ukey() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$array1 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
-$array2 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
-
-function key_compare_func($key1, $key2)
-{
- if ($key1 == $key2) {
- return 0;
- }
- return ($key1 > $key2)? 1:-1;
-}
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// resource variable
-$fp = fopen(__FILE__, "r");
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-//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,
-
- // resource data
- 'resource' => $fp,
-);
-
-// loop through each element of the array for key_comp_func
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_diff_ukey($array1, $array2, $value, 'key_compare_func') );
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing array_diff_ukey() : usage variation ***
-
---int 0--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 1--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 12345--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int -12345--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---float 10.5--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -10.5--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float .5--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase null--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase true--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---lowercase false--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---undefined var--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---unset var--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---resource--
-
-Warning: array_diff_ukey(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation5.phpt b/ext/standard/tests/array/array_diff_ukey_variation5.phpt
index 7606212023..10946aa0ba 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation5.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation5.phpt
@@ -32,7 +32,6 @@ echo "\n-- Testing array_diff_ukey() function with multi dimensional array --\n"
var_dump( array_diff_ukey($array1, $array2, 'strcasecmp') );
var_dump( array_diff_ukey($array2, $array1, 'strcasecmp') );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
@@ -51,4 +50,3 @@ array(1) {
string(3) "two"
}
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation6.phpt b/ext/standard/tests/array/array_diff_ukey_variation6.phpt
index 1131922fc8..e4ac13899b 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation6.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation6.phpt
@@ -29,7 +29,6 @@ foreach($input_arrays as $key =>$value) {
var_dump( array_diff_ukey($input_array, $value, 'key_compare_func') );
}
?>
-===DONE===
--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
@@ -62,4 +61,3 @@ array(1) {
[10]=>
string(3) "0xA"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation7.phpt b/ext/standard/tests/array/array_diff_ukey_variation7.phpt
index 16ba89e9f1..3a2935bef7 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation7.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation7.phpt
@@ -24,7 +24,6 @@ var_dump( array_diff_ukey($float_indx_array, $input_array, 'key_compare_func') )
var_dump( array_diff_ukey($input_array, $float_indx_array, 'key_compare_func') );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
@@ -39,4 +38,3 @@ array(2) {
[20]=>
string(2) "20"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation8.phpt b/ext/standard/tests/array/array_diff_ukey_variation8.phpt
index 0048bbb3fa..fc15526273 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation8.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation8.phpt
@@ -24,7 +24,6 @@ var_dump( array_diff_ukey($boolean_indx_array, $input_array, 'key_compare_func')
var_dump( array_diff_ukey($input_array, $boolean_indx_array, 'key_compare_func') );
?>
-===DONE===
--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
@@ -39,4 +38,3 @@ array(3) {
["false"]=>
int(0)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_ukey_variation9.phpt b/ext/standard/tests/array/array_diff_ukey_variation9.phpt
index 5fdb0d4e24..ac825cffa7 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation9.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation9.phpt
@@ -29,7 +29,6 @@ foreach($input_arrays as $key =>$value) {
}
?>
-===DONE===
--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
@@ -56,4 +55,3 @@ array(1) {
[10]=>
string(2) "10"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_diff_variation1.phpt b/ext/standard/tests/array/array_diff_variation1.phpt
index e162c523d6..5b92231642 100644
--- a/ext/standard/tests/array/array_diff_variation1.phpt
+++ b/ext/standard/tests/array/array_diff_variation1.phpt
@@ -91,118 +91,70 @@ $inputs = array(
// loop through each element of $inputs to check the behavior of array_diff
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --";
- var_dump( array_diff($input, $array));
- $iterator++;
+ echo "\n-- Iteration $iterator --";
+ try {
+ var_dump( array_diff($input, $array));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
--- Iteration 1 --
-Warning: array_diff(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- Iteration 1 --Expected parameter 1 to be an array, int given
--- Iteration 2 --
-Warning: array_diff(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- Iteration 2 --Expected parameter 1 to be an array, int given
--- Iteration 3 --
-Warning: array_diff(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- Iteration 3 --Expected parameter 1 to be an array, int given
--- Iteration 4 --
-Warning: array_diff(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- Iteration 4 --Expected parameter 1 to be an array, int given
--- Iteration 5 --
-Warning: array_diff(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- Iteration 5 --Expected parameter 1 to be an array, float given
--- Iteration 6 --
-Warning: array_diff(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- Iteration 6 --Expected parameter 1 to be an array, float given
--- Iteration 7 --
-Warning: array_diff(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- Iteration 7 --Expected parameter 1 to be an array, float given
--- Iteration 8 --
-Warning: array_diff(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- Iteration 8 --Expected parameter 1 to be an array, float given
--- Iteration 9 --
-Warning: array_diff(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- Iteration 9 --Expected parameter 1 to be an array, float given
--- Iteration 10 --
-Warning: array_diff(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 10 --Expected parameter 1 to be an array, null given
--- Iteration 11 --
-Warning: array_diff(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 11 --Expected parameter 1 to be an array, null given
--- Iteration 12 --
-Warning: array_diff(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 12 --Expected parameter 1 to be an array, bool given
--- Iteration 13 --
-Warning: array_diff(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 13 --Expected parameter 1 to be an array, bool given
--- Iteration 14 --
-Warning: array_diff(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 14 --Expected parameter 1 to be an array, bool given
--- Iteration 15 --
-Warning: array_diff(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 15 --Expected parameter 1 to be an array, bool given
--- Iteration 16 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 16 --Expected parameter 1 to be an array, string given
--- Iteration 17 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 17 --Expected parameter 1 to be an array, string given
--- Iteration 18 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 18 --Expected parameter 1 to be an array, string given
--- Iteration 19 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 19 --Expected parameter 1 to be an array, string given
--- Iteration 20 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 20 --Expected parameter 1 to be an array, string given
--- Iteration 21 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 21 --Expected parameter 1 to be an array, string given
--- Iteration 22 --
-Warning: array_diff(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 22 --Expected parameter 1 to be an array, string given
--- Iteration 23 --
-Warning: array_diff(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+-- Iteration 23 --Expected parameter 1 to be an array, object given
--- Iteration 24 --
-Warning: array_diff(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 24 --Expected parameter 1 to be an array, null given
--- Iteration 25 --
-Warning: array_diff(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 25 --Expected parameter 1 to be an array, null given
--- Iteration 26 --
-Warning: array_diff(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 26 --Expected parameter 1 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_diff_variation2.phpt b/ext/standard/tests/array/array_diff_variation2.phpt
index 5f8183b88d..a9ddb22b82 100644
--- a/ext/standard/tests/array/array_diff_variation2.phpt
+++ b/ext/standard/tests/array/array_diff_variation2.phpt
@@ -91,117 +91,69 @@ $inputs = array(
// loop through each element of $inputs to check the behavior of array_diff
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --";
- var_dump( array_diff($array, $input));
- $iterator++;
+ echo "\n-- Iteration $iterator --";
+ try {
+ var_dump( array_diff($array, $input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
--- Iteration 1 --
-Warning: array_diff(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 1 --Expected parameter 2 to be an array, int given
--- Iteration 2 --
-Warning: array_diff(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 2 --Expected parameter 2 to be an array, int given
--- Iteration 3 --
-Warning: array_diff(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 3 --Expected parameter 2 to be an array, int given
--- Iteration 4 --
-Warning: array_diff(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 4 --Expected parameter 2 to be an array, int given
--- Iteration 5 --
-Warning: array_diff(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 5 --Expected parameter 2 to be an array, float given
--- Iteration 6 --
-Warning: array_diff(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 6 --Expected parameter 2 to be an array, float given
--- Iteration 7 --
-Warning: array_diff(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 7 --Expected parameter 2 to be an array, float given
--- Iteration 8 --
-Warning: array_diff(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 8 --Expected parameter 2 to be an array, float given
--- Iteration 9 --
-Warning: array_diff(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 9 --Expected parameter 2 to be an array, float given
--- Iteration 10 --
-Warning: array_diff(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 10 --Expected parameter 2 to be an array, null given
--- Iteration 11 --
-Warning: array_diff(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 11 --Expected parameter 2 to be an array, null given
--- Iteration 12 --
-Warning: array_diff(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 12 --Expected parameter 2 to be an array, bool given
--- Iteration 13 --
-Warning: array_diff(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 13 --Expected parameter 2 to be an array, bool given
--- Iteration 14 --
-Warning: array_diff(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 14 --Expected parameter 2 to be an array, bool given
--- Iteration 15 --
-Warning: array_diff(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 15 --Expected parameter 2 to be an array, bool given
--- Iteration 16 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 16 --Expected parameter 2 to be an array, string given
--- Iteration 17 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 17 --Expected parameter 2 to be an array, string given
--- Iteration 18 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 18 --Expected parameter 2 to be an array, string given
--- Iteration 19 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 19 --Expected parameter 2 to be an array, string given
--- Iteration 20 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 20 --Expected parameter 2 to be an array, string given
--- Iteration 21 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 21 --Expected parameter 2 to be an array, string given
--- Iteration 22 --
-Warning: array_diff(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 22 --Expected parameter 2 to be an array, string given
--- Iteration 23 --
-Warning: array_diff(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+-- Iteration 23 --Expected parameter 2 to be an array, object given
--- Iteration 24 --
-Warning: array_diff(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 24 --Expected parameter 2 to be an array, null given
--- Iteration 25 --
-Warning: array_diff(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 25 --Expected parameter 2 to be an array, null given
--- Iteration 26 --
-Warning: array_diff(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 26 --Expected parameter 2 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_diff_variation9.phpt b/ext/standard/tests/array/array_diff_variation9.phpt
index 05b6a1eb02..3d85bc1832 100644
--- a/ext/standard/tests/array/array_diff_variation9.phpt
+++ b/ext/standard/tests/array/array_diff_variation9.phpt
@@ -1,7 +1,5 @@
--TEST--
Test array_diff() function : usage variations - multidimensional arrays
---INI--
-error_reporting=E_ALL & ~E_NOTICE
--FILE--
<?php
/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
@@ -38,11 +36,27 @@ var_dump(array_diff($array1, $array2['sub_arraya']));
echo "Done";
?>
---EXPECT--
+--EXPECTF--
*** Testing array_diff() : usage variations ***
-- Compare two 2-D arrays --
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
array(0) {
}
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
array(0) {
}
@@ -71,6 +85,10 @@ array(3) {
}
-- Compare a subarray from one 2-D array and one 2-D array --
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
array(3) {
[0]=>
int(1)
@@ -79,6 +97,10 @@ array(3) {
[2]=>
int(3)
}
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
array(2) {
["sub_array1"]=>
array(3) {
diff --git a/ext/standard/tests/array/array_fill.phpt b/ext/standard/tests/array/array_fill.phpt
index 230fe61652..2c90402fe8 100644
--- a/ext/standard/tests/array/array_fill.phpt
+++ b/ext/standard/tests/array/array_fill.phpt
@@ -17,9 +17,7 @@ foreach($array1 as $start)
}
}
}
-echo '== Done ==';
?>
-===============Done====================
--EXPECT--
===========================
start: 0 num: 0 value: 1
@@ -345,4 +343,3 @@ array(2) {
[3]=>
string(1) "f"
}
-== Done =================Done====================
diff --git a/ext/standard/tests/array/array_fill_error.phpt b/ext/standard/tests/array/array_fill_error.phpt
index 2fbdb850c3..63af88bf28 100644
--- a/ext/standard/tests/array/array_fill_error.phpt
+++ b/ext/standard/tests/array/array_fill_error.phpt
@@ -10,45 +10,22 @@ Test array_fill() function : error conditions
echo "*** Testing array_fill() : error conditions ***\n";
-// Zero arguments
-echo "-- Testing array_fill() function with Zero arguments --\n";
-var_dump( array_fill() );
-
-// More than expected number of arguments
-echo "-- Testing array_fill() function with more than expected no. of arguments --\n";
+// calling array_fill with negative values for 'num' parameter
$start_key = 0;
-$num = 2;
+$num = -1;
$val = 1;
-$extra_arg = 10;
-var_dump( array_fill($start_key,$num,$val, $extra_arg) );
-// Less than the expected number of arguments
-echo "-- Testing array_fill() function with less than expected no. of arguments --\n";
-$start_key = 0;
-$num = 2;
-var_dump( array_fill($start_key,$num) );
-
-//calling array_fill with negative values for 'num' parameter
-$num = -1;
-var_dump( array_fill($start_key,$num,$val) );
+try {
+ var_dump( array_fill($start_key,$num,$val) );
+} catch (Error $e) {
+ echo $e->getMessage() . "\n";
+}
-echo "Done";
?>
+
+DONE
--EXPECTF--
*** Testing array_fill() : error conditions ***
--- Testing array_fill() function with Zero arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
--- Testing array_fill() function with more than expected no. of arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
--- Testing array_fill() function with less than expected no. of arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
+Number of elements can't be negative
-Warning: array_fill(): Number of elements can't be negative in %s on line %d
-bool(false)
-Done
+DONE
diff --git a/ext/standard/tests/array/array_fill_keys.phpt b/ext/standard/tests/array/array_fill_keys.phpt
index 12adde72e7..fb222a414b 100644
--- a/ext/standard/tests/array/array_fill_keys.phpt
+++ b/ext/standard/tests/array/array_fill_keys.phpt
@@ -4,15 +4,12 @@ basic array_fill_keys test
precision=14
--FILE--
<?php
- var_dump(array_fill_keys('test', 1));
var_dump(array_fill_keys(array(), 1));
var_dump(array_fill_keys(array('foo', 'bar'), NULL));
var_dump(array_fill_keys(array('5', 'foo', 10, 1.23), 123));
var_dump(array_fill_keys(array('test', TRUE, 10, 100), ''));
?>
---EXPECTF--
-Warning: array_fill_keys() expects parameter 1 to be array, string given in %s on line %d
-NULL
+--EXPECT--
array(0) {
}
array(2) {
diff --git a/ext/standard/tests/array/array_fill_keys_variation1.phpt b/ext/standard/tests/array/array_fill_keys_variation1.phpt
index 0af38c7bde..1f394eec86 100644
--- a/ext/standard/tests/array/array_fill_keys_variation1.phpt
+++ b/ext/standard/tests/array/array_fill_keys_variation1.phpt
@@ -59,7 +59,7 @@ array(4) {
-- Testing array_fill_keys() function with mixed array --
-Notice: Array to string conversion in %sarray_fill_keys_variation1.php on line %d
+Warning: Array to string conversion in %s on line %d
array(7) {
["Resource id #%d"]=>
string(6) "simple"
diff --git a/ext/standard/tests/array/array_fill_keys_variation3.phpt b/ext/standard/tests/array/array_fill_keys_variation3.phpt
index 84cc928cbc..b1abbcfe1b 100644
--- a/ext/standard/tests/array/array_fill_keys_variation3.phpt
+++ b/ext/standard/tests/array/array_fill_keys_variation3.phpt
@@ -12,33 +12,18 @@ Test array_fill_keys() function : variation of parameter
echo "*** Testing array_fill_keys() : parameter variations ***\n";
-$simpleStr = "simple";
$fp = fopen(__FILE__, "r");
-$bool = false;
-$float = 2.4;
$array = array("one", "two");
-$nullVal = null;
-
-echo "\n-- Testing array_fill_keys() function with both wrong arguments --\n";
-var_dump( array_fill_keys($bool, $float) );
echo "\n-- Testing array_fill_keys() function with unusual second arguments --\n";
var_dump( array_fill_keys($array, $fp) );
-echo "\n-- Testing array_fill_keys() function with mixed array --\n";
-var_dump( array_fill_keys($nullVal, $simpleStr) );
-
fclose($fp);
echo "Done";
?>
--EXPECTF--
*** Testing array_fill_keys() : parameter variations ***
--- Testing array_fill_keys() function with both wrong arguments --
-
-Warning: array_fill_keys() expects parameter 1 to be array, bool given in %sarray_fill_keys_variation3.php on line %d
-NULL
-
-- Testing array_fill_keys() function with unusual second arguments --
array(2) {
["one"]=>
@@ -46,9 +31,4 @@ array(2) {
["two"]=>
resource(%d) of type (stream)
}
-
--- Testing array_fill_keys() function with mixed array --
-
-Warning: array_fill_keys() expects parameter 1 to be array, null given in %sarray_fill_keys_variation3.php on line %d
-NULL
Done
diff --git a/ext/standard/tests/array/array_fill_keys_variation4.phpt b/ext/standard/tests/array/array_fill_keys_variation4.phpt
index bd89416d9d..9edc4e4a9c 100644
--- a/ext/standard/tests/array/array_fill_keys_variation4.phpt
+++ b/ext/standard/tests/array/array_fill_keys_variation4.phpt
@@ -83,7 +83,7 @@ array(1) {
-- Testing array_fill_keys() function with unset var --
-Notice: Undefined variable: unset_var in %sarray_fill_keys_variation4.php on line %d
+Warning: Undefined variable: unset_var in %s on line %d
array(1) {
["one"]=>
NULL
diff --git a/ext/standard/tests/array/array_filter.phpt b/ext/standard/tests/array/array_filter.phpt
index ba27a59c96..a1b18bd234 100644
--- a/ext/standard/tests/array/array_filter.phpt
+++ b/ext/standard/tests/array/array_filter.phpt
@@ -26,11 +26,7 @@ var_dump(array_filter($array2, "even"));
var_dump(array_filter($array3, "even"));
var_dump(array_filter(array()));
-var_dump(array_filter(array(), array()));
-var_dump(array_filter("", null));
-var_dump(array_filter($array1, 1));
-echo '== DONE ==';
?>
--EXPECTF--
Odd :
@@ -81,13 +77,3 @@ array(2) {
}
array(0) {
}
-
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-== DONE ==
diff --git a/ext/standard/tests/array/array_filter_variation10.phpt b/ext/standard/tests/array/array_filter_variation10.phpt
index 4749fe8e45..a32fdadc05 100644
--- a/ext/standard/tests/array/array_filter_variation10.phpt
+++ b/ext/standard/tests/array/array_filter_variation10.phpt
@@ -48,7 +48,11 @@ var_dump(array_filter($mixed, 'is_numeric', ARRAY_FILTER_USE_KEY));
var_dump(array_filter($mixed, 'is_numeric', 0));
-var_dump(array_filter($mixed, 'is_numeric', ARRAY_FILTER_USE_BOTH));
+try {
+ var_dump(array_filter($mixed, 'is_numeric', ARRAY_FILTER_USE_BOTH));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done"
?>
@@ -88,14 +92,5 @@ array(2) {
["b"]=>
int(2)
}
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line 48
-array(0) {
-}
+is_numeric() expects exactly 1 parameter, 2 given
Done
diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt
index a6f5789eae..240f5c10fa 100644
--- a/ext/standard/tests/array/array_filter_variation9.phpt
+++ b/ext/standard/tests/array/array_filter_variation9.phpt
@@ -13,7 +13,7 @@ Test array_filter() function : usage variations - built-in functions as 'callbac
echo "*** Testing array_filter() : usage variations - built-in functions as 'callback' argument ***\n";
-$input = array(0, 1, -1, 10, 100, 1000, 'Hello', null);
+$input = array(0, 1, -1, 10, 100, 1000, null);
// using built-in function 'is_int' as 'callback'
var_dump( array_filter($input, 'is_int') );
@@ -22,10 +22,18 @@ var_dump( array_filter($input, 'is_int') );
var_dump( array_filter($input, 'chr') );
// using language construct 'echo' as 'callback'
-var_dump( array_filter($input, 'echo') );
+try {
+ var_dump( array_filter($input, 'echo') );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// using language construct 'exit' as 'callback'
-var_dump( array_filter($input, 'exit') );
+try {
+ var_dump( array_filter($input, 'exit') );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done"
?>
@@ -45,9 +53,7 @@ array(6) {
[5]=>
int(1000)
}
-
-Warning: chr() expects parameter 1 to be int, string given in %s on line %d
-array(8) {
+array(7) {
[0]=>
int(0)
[1]=>
@@ -61,14 +67,8 @@ array(8) {
[5]=>
int(1000)
[6]=>
- string(5) "Hello"
- [7]=>
NULL
}
-
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
+array_filter() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name
+array_filter() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_flip.phpt b/ext/standard/tests/array/array_flip.phpt
index ab8cf271b1..b03c65f034 100644
--- a/ext/standard/tests/array/array_flip.phpt
+++ b/ext/standard/tests/array/array_flip.phpt
@@ -16,11 +16,11 @@ $trans = array_flip($trans);
var_dump($trans);
?>
--EXPECTF--
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
array(6) {
[1]=>
string(1) "b"
diff --git a/ext/standard/tests/array/array_flip_variation4.phpt b/ext/standard/tests/array/array_flip_variation4.phpt
index b8badb0caa..0ad2367701 100644
--- a/ext/standard/tests/array/array_flip_variation4.phpt
+++ b/ext/standard/tests/array/array_flip_variation4.phpt
@@ -62,29 +62,29 @@ echo "Done"
--EXPECTF--
*** Testing array_flip() : different invalid values in 'input' array argument ***
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
+Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
array(0) {
}
Done
diff --git a/ext/standard/tests/array/array_intersect_assoc_error.phpt b/ext/standard/tests/array/array_intersect_assoc_error.phpt
index a06dbddefe..fa815118ce 100644
--- a/ext/standard/tests/array/array_intersect_assoc_error.phpt
+++ b/ext/standard/tests/array/array_intersect_assoc_error.phpt
@@ -12,25 +12,29 @@ echo "*** Testing array_intersect_assoc() : error conditions ***\n";
// Zero arguments
echo "\n-- Testing array_intersect_assoc() function with Zero arguments --\n";
-var_dump( array_intersect_assoc() );
+try {
+ var_dump( array_intersect_assoc() );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_intersect_assoc with one less than the expected number of arguments
echo "\n-- Testing array_intersect_assoc() function with less than expected no. of arguments --\n";
$arr1 = array(1, 2);
-var_dump( array_intersect_assoc($arr1) );
+try {
+ var_dump( array_intersect_assoc($arr1) );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_assoc() : error conditions ***
-- Testing array_intersect_assoc() function with Zero arguments --
-
-Warning: array_intersect_assoc(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
+At least 2 parameters are required, 0 given
-- Testing array_intersect_assoc() function with less than expected no. of arguments --
-
-Warning: array_intersect_assoc(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
+At least 2 parameters are required, 1 given
Done
diff --git a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt
index ca11b7cc9b..3490c4f25c 100644
--- a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt
+++ b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt
@@ -93,14 +93,22 @@ $arrays = array(
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $unexpected_value) {
- echo "\n-- Iteration $iterator --";
-
- // Calling array_intersect_assoc() with default arguments
- var_dump( array_intersect_assoc($unexpected_value, $arr2) );
-
- // Calling array_intersect_assoc() with more arguments
- var_dump( array_intersect_assoc($unexpected_value, $arr2, $arr3) );
- $iterator++;
+ echo "\n-- Iteration $iterator --";
+
+ // Calling array_intersect_assoc() with default arguments
+ try {
+ var_dump( array_intersect_assoc($unexpected_value, $arr2) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ // Calling array_intersect_assoc() with more arguments
+ try {
+ var_dump( array_intersect_assoc($unexpected_value, $arr2, $arr3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
}
// close the file resource used
@@ -108,174 +116,78 @@ fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_assoc() : Passing non-array values to $arr1 argument ***
--- Iteration 1 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 1 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 2 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--- Iteration 14 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 3 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 4 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--- Iteration 15 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 5 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 6 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--- Iteration 16 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 7 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 8 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--- Iteration 17 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 9 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 10 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--- Iteration 18 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 11 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 12 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--- Iteration 19 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 13 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 14 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--- Iteration 20 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 15 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iteration 16 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--- Iteration 21 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+-- Iteration 17 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+-- Iteration 18 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--- Iteration 22 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 19 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 20 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--- Iteration 23 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 21 --Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iteration 22 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--- Iteration 24 --
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 23 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
-Warning: array_intersect_assoc(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 24 --Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt
index 274da6f7b2..12cf4d7307 100644
--- a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt
+++ b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt
@@ -93,15 +93,23 @@ $arrays = array(
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $unexpected_value) {
- echo "\n-- Iteration $iterator --";
-
- // Calling array_intersect_assoc() with default arguments
- var_dump( array_intersect_assoc($arr1,$unexpected_value) );
-
- // Calling array_intersect_assoc() with more arguments
- var_dump( array_intersect_assoc($arr1, $unexpected_value, $arr3) );
-
- $iterator++;
+ echo "\n-- Iteration $iterator --";
+
+ // Calling array_intersect_assoc() with default arguments
+ try {
+ var_dump( array_intersect_assoc($arr1,$unexpected_value) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ // Calling array_intersect_assoc() with more arguments
+ try {
+ var_dump( array_intersect_assoc($arr1, $unexpected_value, $arr3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ $iterator++;
}
// close the file resource used
@@ -109,174 +117,78 @@ fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_assoc() : Passing non-array values to $arr2 argument ***
--- Iteration 1 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 1 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 2 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--- Iteration 14 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 3 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 4 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--- Iteration 15 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 5 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 6 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--- Iteration 16 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 7 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 8 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--- Iteration 17 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 9 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 10 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--- Iteration 18 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 11 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 12 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--- Iteration 19 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 13 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 14 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--- Iteration 20 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 15 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 16 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--- Iteration 21 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+-- Iteration 17 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+-- Iteration 18 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--- Iteration 22 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 19 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 20 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--- Iteration 23 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 21 --Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 22 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--- Iteration 24 --
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 23 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
-Warning: array_intersect_assoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 24 --Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_intersect_assoc_variation9.phpt b/ext/standard/tests/array/array_intersect_assoc_variation9.phpt
index 26a491ad64..38b7605924 100644
--- a/ext/standard/tests/array/array_intersect_assoc_variation9.phpt
+++ b/ext/standard/tests/array/array_intersect_assoc_variation9.phpt
@@ -62,13 +62,13 @@ echo "Done";
-- Passing the entire 2-D array to $arr1 and $arr2 --
- With default arguments -
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
array(2) {
[0]=>
array(4) {
@@ -95,21 +95,21 @@ array(2) {
}
- With more arguments -
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_assoc_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
array(2) {
[0]=>
array(4) {
diff --git a/ext/standard/tests/array/array_intersect_error.phpt b/ext/standard/tests/array/array_intersect_error.phpt
index 373a0ddbe0..81be2634db 100644
--- a/ext/standard/tests/array/array_intersect_error.phpt
+++ b/ext/standard/tests/array/array_intersect_error.phpt
@@ -11,25 +11,29 @@ echo "*** Testing array_intersect() : error conditions ***\n";
// Testing array_intersect() with zero arguments
echo "\n-- Testing array_intersect() function with Zero arguments --\n";
-var_dump( array_intersect() );
+try {
+ var_dump( array_intersect() );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_intersect() with one less than the expected number of arguments
echo "\n-- Testing array_intersect() function with less than expected no. of arguments --\n";
$arr1 = array(1, 2);
-var_dump( array_intersect($arr1) );
+try {
+ var_dump( array_intersect($arr1) );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_intersect() : error conditions ***
-- Testing array_intersect() function with Zero arguments --
-
-Warning: array_intersect(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
+At least 2 parameters are required, 0 given
-- Testing array_intersect() function with less than expected no. of arguments --
-
-Warning: array_intersect(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
+At least 2 parameters are required, 1 given
Done
diff --git a/ext/standard/tests/array/array_intersect_key_error.phpt b/ext/standard/tests/array/array_intersect_key_error.phpt
index 10ad8ad342..70cb53412d 100644
--- a/ext/standard/tests/array/array_intersect_key_error.phpt
+++ b/ext/standard/tests/array/array_intersect_key_error.phpt
@@ -14,23 +14,25 @@ $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
// Testing array_intersect_key with one less than the expected number of arguments
echo "\n-- Testing array_intersect_key() function with less than expected no. of arguments --\n";
-var_dump( array_intersect_key($array1) );
+try {
+ var_dump( array_intersect_key($array1) );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// Testing array_intersect_key with one less than the expected number of arguments
echo "\n-- Testing array_intersect_key() function with no arguments --\n";
-var_dump( array_intersect_key() );
+try {
+ var_dump( array_intersect_key() );
+} catch (ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_key() : error conditions ***
-- Testing array_intersect_key() function with less than expected no. of arguments --
-
-Warning: array_intersect_key(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
+At least 2 parameters are required, 1 given
-- Testing array_intersect_key() function with no arguments --
-
-Warning: array_intersect_key(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
-===DONE===
+At least 2 parameters are required, 0 given
diff --git a/ext/standard/tests/array/array_intersect_key_variation1.phpt b/ext/standard/tests/array/array_intersect_key_variation1.phpt
index fb9dd2c7aa..198cb1dfc6 100644
--- a/ext/standard/tests/array/array_intersect_key_variation1.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation1.phpt
@@ -93,222 +93,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_key($value, $array2) );
- var_dump( array_intersect_key($value, $array2, $array3) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_intersect_key($value, $array2) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_intersect_key($value, $array2, $array3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_key() : usage variation ***
--int 0--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--resource var--
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
diff --git a/ext/standard/tests/array/array_intersect_key_variation2.phpt b/ext/standard/tests/array/array_intersect_key_variation2.phpt
index 5d2147b99f..c178480fca 100644
--- a/ext/standard/tests/array/array_intersect_key_variation2.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation2.phpt
@@ -94,222 +94,124 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_key($array1, $value) );
- var_dump( array_intersect_key($array1, $value, $array3) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_intersect_key($array1, $value) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_intersect_key($array1, $value, $array3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_key() : usage variation ***
--int 0--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--resource var--
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_key(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
diff --git a/ext/standard/tests/array/array_intersect_key_variation3.phpt b/ext/standard/tests/array/array_intersect_key_variation3.phpt
deleted file mode 100644
index dca52bafc2..0000000000
--- a/ext/standard/tests/array/array_intersect_key_variation3.phpt
+++ /dev/null
@@ -1,235 +0,0 @@
---TEST--
-Test array_intersect_key() function : usage variation - Passing unexpected values to optional argument
---FILE--
-<?php
-/* Prototype : array array_intersect_key(array arr1, array arr2 [, array ...])
- * Description: Returns the entries of arr1 that have keys which are present in all the other arguments.
- * Source code: ext/standard/array.c
- */
-
-echo "*** Testing array_intersect_key() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
-$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__, "r");
-
-// 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,
-
- // 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 data
- 'resource var' => $fp,
-);
-
-// loop through each element of the array for arr2
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_key($array1, $array2, $value) );
-}
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing array_intersect_key() : usage variation ***
-
---int 0--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 1--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 12345--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int -12345--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---float 10.5--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -10.5--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float .5--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase null--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase true--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---lowercase false--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---undefined var--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---unset var--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---resource var--
-
-Warning: array_intersect_key(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_key_variation4.phpt b/ext/standard/tests/array/array_intersect_key_variation4.phpt
index 8b49ba8db1..bbf992fae0 100644
--- a/ext/standard/tests/array/array_intersect_key_variation4.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation4.phpt
@@ -24,7 +24,6 @@ foreach($input_arrays as $key =>$value) {
var_dump( array_intersect_key($value,$input_array ) );
}
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_key() : usage variation ***
@@ -57,4 +56,3 @@ array(1) {
[-7]=>
string(4) "-0x7"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_key_variation5.phpt b/ext/standard/tests/array/array_intersect_key_variation5.phpt
index fb01bb9207..d2b2541fc4 100644
--- a/ext/standard/tests/array/array_intersect_key_variation5.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation5.phpt
@@ -17,7 +17,6 @@ echo "\n-- Testing array_intersect_key() function with float indexed array --\n"
var_dump( array_intersect_key($input_array, $float_indx_array) );
var_dump( array_intersect_key($float_indx_array,$input_array ) );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_key() : usage variation ***
@@ -38,4 +37,3 @@ array(3) {
[-10]=>
string(5) "-10.5"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_key_variation6.phpt b/ext/standard/tests/array/array_intersect_key_variation6.phpt
index da0115e368..6f84bac765 100644
--- a/ext/standard/tests/array/array_intersect_key_variation6.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation6.phpt
@@ -17,7 +17,6 @@ echo "\n-- Testing array_intersect_key() function with boolean indexed array --\
var_dump( array_intersect_key($input_array, $boolean_indx_array) );
var_dump( array_intersect_key($boolean_indx_array,$input_array ) );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_key() : usage variation ***
@@ -34,4 +33,3 @@ array(2) {
[0]=>
string(5) "boolF"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_key_variation7.phpt b/ext/standard/tests/array/array_intersect_key_variation7.phpt
index 589893db5a..6332e8adb2 100644
--- a/ext/standard/tests/array/array_intersect_key_variation7.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation7.phpt
@@ -27,7 +27,6 @@ foreach($input_arrays as $key =>$value) {
var_dump( array_intersect_key($value,$input_array ) );
}
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_key() : usage variation ***
@@ -60,4 +59,3 @@ array(1) {
[""]=>
string(5) "unset"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_key_variation8.phpt b/ext/standard/tests/array/array_intersect_key_variation8.phpt
index 9a84b2aead..892863991a 100644
--- a/ext/standard/tests/array/array_intersect_key_variation8.phpt
+++ b/ext/standard/tests/array/array_intersect_key_variation8.phpt
@@ -30,7 +30,6 @@ $array2 = array (
var_dump( array_intersect_key($array1, $array2) );
var_dump( array_intersect_key($array2,$array1 ) );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_key() : usage variation ***
array(2) {
@@ -61,4 +60,3 @@ array(2) {
int(8)
}
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
index 887ad12d9a..a26a5d99ec 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
@@ -101,222 +101,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_uassoc($value, $array2, 'key_compare_func') );
- var_dump( array_intersect_uassoc($value, $array2, $array3, 'key_compare_func') );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_intersect_uassoc($value, $array2, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_intersect_uassoc($value, $array2, $array3, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
--int 0--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--resource--
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt
index 8f0bfd4753..d8accf2886 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt
@@ -33,7 +33,6 @@ echo "\n-- Testing array_intersect_uassoc() function using class with regular me
$obj = new MyClass();
var_dump( array_intersect_uassoc($array1, $array2, array($obj,'class_compare_func')) );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
@@ -52,4 +51,3 @@ array(1) {
["a"]=>
string(5) "green"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt
index d482e9ffcc..61877a0653 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt
@@ -101,222 +101,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_uassoc($array1, $value, 'key_compare_func') );
- var_dump( array_intersect_uassoc($array1, $value, $array3, 'key_compare_func') );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_intersect_uassoc($array1, $value, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_intersect_uassoc($array1, $value, $array3, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
--int 0--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--resource--
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_uassoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation3.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation3.phpt
deleted file mode 100644
index 42e53101dc..0000000000
--- a/ext/standard/tests/array/array_intersect_uassoc_variation3.phpt
+++ /dev/null
@@ -1,243 +0,0 @@
---TEST--
-Test array_intersect_uassoc() function : usage variation - Passing unexpected values to optional third argument
---FILE--
-<?php
-/* Prototype : array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)
- * Description: Computes the intersection of arrays with additional index check, compares indexes by a callback function
- * Source code: ext/standard/array.c
- */
-
-echo "*** Testing array_intersect_uassoc() : usage variation ***\n";
-
-// Initialise function arguments
-$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
-$array2 = array("a" => "green", "yellow", "red");
-
-//Callback function
-function key_compare_func($a, $b) {
- if ($a === $b) {
- return 0;
- }
- return ($a > $b) ? 1 : -1;
-}
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__, "r");
-
-// 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,
-
- // 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 data
- 'resource' => $fp,
-);
-
-// loop through each element of the array for arr1
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_uassoc($array1, $array2, $value, 'key_compare_func') );
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing array_intersect_uassoc() : usage variation ***
-
---int 0--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 1--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 12345--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int -12345--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---float 10.5--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -10.5--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float .5--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase null--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase true--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---lowercase false--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---undefined var--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---unset var--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---resource--
-
-Warning: array_intersect_uassoc(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation5.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation5.phpt
index 10835a1871..67463fb96d 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation5.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation5.phpt
@@ -32,7 +32,6 @@ var_dump( array_intersect_uassoc($arr_default_int, $arr_string, "key_compare_fun
echo "\n-- Result of integers and strings containing floating points intersection --\n";
var_dump( array_intersect_uassoc($arr_default_int, $arr_string_float, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
@@ -55,4 +54,3 @@ array(2) {
-- Result of integers and strings containing floating points intersection --
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation6.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation6.phpt
index b29a9684d5..0605af20f5 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation6.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation6.phpt
@@ -28,7 +28,6 @@ var_dump( array_intersect_uassoc($arr_float, $arr_string, "key_compare_func") );
echo "\n-- Result of floating points and strings containing floating point intersection --\n";
var_dump( array_intersect_uassoc($arr_float, $arr_string_float, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
@@ -43,4 +42,3 @@ array(2) {
-- Result of floating points and strings containing floating point intersection --
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation7.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation7.phpt
index 4be5ebf5d7..eec2dc1f93 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation7.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation7.phpt
@@ -32,7 +32,6 @@ var_dump( array_intersect_uassoc($arr1_string_float, $arr2_string_float, "key_co
echo "\n-- Result of strings containing integers and strings containing floating points intersection --\n";
var_dump( array_intersect_uassoc($arr1_string_int, $arr2_string_float, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
@@ -51,4 +50,3 @@ array(1) {
-- Result of strings containing integers and strings containing floating points intersection --
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation8.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation8.phpt
index 256b883d28..4b6498470a 100644
--- a/ext/standard/tests/array/array_intersect_uassoc_variation8.phpt
+++ b/ext/standard/tests/array/array_intersect_uassoc_variation8.phpt
@@ -27,7 +27,6 @@ $array2 = &$array1;
echo "\n-- Testing array_intersect_uassoc() function when \$array2 is referencd to \$array1 --\n";
var_dump( array_intersect_uassoc($array1, $array2, "strcasecmp") );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_uassoc() : usage variation ***
@@ -48,4 +47,3 @@ array(2) {
[1]=>
string(1) "a"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt
index 86850094b8..417087feca 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt
@@ -99,222 +99,124 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_ukey($value, $array2, 'key_compare_func') );
- var_dump( array_intersect_ukey($value, $array2, $array3, 'key_compare_func') );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_intersect_ukey($value, $array2, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_intersect_ukey($value, $array2, $array3, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
--int 0--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--resource var--
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt
index 82b43628e3..f9f479915f 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt
@@ -99,222 +99,124 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_ukey($array1, $value, 'key_compare_func') );
- var_dump( array_intersect_ukey($array1, $value, $array3, 'key_compare_func') );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_intersect_ukey($array1, $value, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( array_intersect_ukey($array1, $value, $array3, 'key_compare_func') );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
--int 0--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--resource var--
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation4.phpt b/ext/standard/tests/array/array_intersect_ukey_variation4.phpt
deleted file mode 100644
index 35c0d4a2e6..0000000000
--- a/ext/standard/tests/array/array_intersect_ukey_variation4.phpt
+++ /dev/null
@@ -1,321 +0,0 @@
---TEST--
-Test array_intersect_ukey() function : usage variation - Passing unexpected values to optional third argument
---FILE--
-<?php
-/* Prototype : array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)
- * Description: Computes the intersection of arrays using a callback function on the keys for comparison.
- * Source code: ext/standard/array.c
- */
-
-echo "*** Testing array_intersect_ukey() : usage variation ***\n";
-
-//Initialise arguments
-$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
-$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
-$array4 = array('green' => 5, 'cyan' => 8);
-
-//Call back function
-function key_compare_func($key1, $key2)
-{
- if ($key1 == $key2)
- return 0;
- else
- return ($key1 > $key2)? 1:-1;
-}
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__, "r");
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-//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,
-
- // 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 data
- 'resource var' => $fp,
-);
-
-// loop through each element of the array for arr2
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_intersect_ukey($array1, $array2, $value, 'key_compare_func') );
- var_dump( array_intersect_ukey($array1, $array2, $value, $array4, 'key_compare_func') );
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing array_intersect_ukey() : usage variation ***
-
---int 0--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 1--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int 12345--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---int -12345--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
---float 10.5--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -10.5--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---float .5--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, float given in %s on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase null--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---lowercase true--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---lowercase false--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, bool given in %s on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string DQ--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---string SQ--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---mixed case string--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---heredoc--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, string given in %s on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, object given in %s on line %d
-NULL
-
---undefined var--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---unset var--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
---resource var--
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-
-Warning: array_intersect_ukey(): Expected parameter 3 to be an array, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation5.phpt b/ext/standard/tests/array/array_intersect_ukey_variation5.phpt
index e56d6195d0..9f260b70ef 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation5.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation5.phpt
@@ -33,7 +33,6 @@ var_dump( array_intersect_ukey($arr_default_int, $arr_string, "key_compare_func"
echo "\n-- Result of integers and strings containing floating points intersection --\n";
var_dump( array_intersect_ukey($arr_default_int, $arr_string_float, "key_compare_func") );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
@@ -60,4 +59,3 @@ array(2) {
[1]=>
int(2)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation6.phpt b/ext/standard/tests/array/array_intersect_ukey_variation6.phpt
index 9384c48a46..da8246ef8b 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation6.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation6.phpt
@@ -29,7 +29,6 @@ var_dump( array_intersect_ukey($arr_float, $arr_string, 'key_compare_func') );
echo "\n-- Result of floating points and strings containing floating point intersection --\n";
var_dump( array_intersect_ukey($arr_float, $arr_string_float, 'key_compare_func') );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
@@ -48,4 +47,3 @@ array(2) {
[1]=>
float(2)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation7.phpt b/ext/standard/tests/array/array_intersect_ukey_variation7.phpt
index 4f069c0ae8..dade6fd051 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation7.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation7.phpt
@@ -33,7 +33,6 @@ var_dump( array_intersect_ukey($arr1_string_float, $arr2_string_float, 'key_comp
echo "\n-- Result of strings containing integers and strings containing floating points intersection --\n";
var_dump( array_intersect_ukey($arr1_string_int, $arr2_string_float, 'key_compare_func') );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
@@ -60,4 +59,3 @@ array(2) {
[1]=>
string(1) "2"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
index 122d1e4767..b83c3302b2 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
@@ -14,26 +14,21 @@ $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
//function name within double quotes
-var_dump( array_intersect_ukey($array1, $array2, "unknown_function") );
+try {
+ var_dump( array_intersect_ukey($array1, $array2, "unknown_function") );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//function name within single quotes
-var_dump( array_intersect_ukey($array1, $array2, 'unknown_function') );
+try {
+ var_dump( array_intersect_ukey($array1, $array2, 'unknown_function') );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
-//function name without quotes
-var_dump( array_intersect_ukey($array1, $array2, unknown_function) );
?>
-===DONE===
--EXPECTF--
*** Testing array_intersect_ukey() : usage variation ***
-
-Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-
-Warning: Use of undefined constant unknown_function - assumed 'unknown_function' (this will throw an Error in a future version of PHP) in %s on line %d
-
-Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
-NULL
-===DONE===
+array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
+array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation9.phpt b/ext/standard/tests/array/array_intersect_ukey_variation9.phpt
index f6dddb9e83..09ff302a47 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation9.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation9.phpt
@@ -33,7 +33,6 @@ echo "\n-- Testing array_intersect_uassoc() function using class with regular me
$obj = new MyClass();
var_dump( array_intersect_ukey($array1, $array2, array($obj,'class_compare_func')) );
?>
-===DONE===
--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
@@ -58,4 +57,3 @@ array(2) {
["green"]=>
int(3)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_intersect_variation1.phpt b/ext/standard/tests/array/array_intersect_variation1.phpt
index 9536dd8c2a..d38a284496 100644
--- a/ext/standard/tests/array/array_intersect_variation1.phpt
+++ b/ext/standard/tests/array/array_intersect_variation1.phpt
@@ -92,14 +92,22 @@ $arrays = array(
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $unexpected_value) {
- echo "\n-- Iterator $iterator --";
-
- // Calling array_intersect() with default arguments
- var_dump( array_intersect($unexpected_value,$arr2) );
-
- // Calling array_intersect() with more arguments
- var_dump( array_intersect($unexpected_value, $arr2, $arr3) );
- $iterator++;
+ echo "\n-- Iterator $iterator --";
+
+ // Calling array_intersect() with default arguments
+ try {
+ var_dump( array_intersect($unexpected_value,$arr2) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ // Calling array_intersect() with more arguments
+ try {
+ var_dump( array_intersect($unexpected_value, $arr2, $arr3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
}
// close the file resource used
@@ -107,174 +115,78 @@ fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_intersect() : Passing non-array values to $arr1 argument ***
--- Iterator 1 --
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 2 --
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 3 --
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 4 --
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 5 --
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 6 --
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 7 --
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 8 --
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 9 --
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 10 --
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iterator 11 --
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iterator 12 --
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
--- Iterator 13 --
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 1 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 2 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--- Iterator 14 --
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 3 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 4 --Expected parameter 1 to be an array, int given
+Expected parameter 1 to be an array, int given
--- Iterator 15 --
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 5 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
-Warning: array_intersect(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 6 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--- Iterator 16 --
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 7 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 8 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
--- Iterator 17 --
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 9 --Expected parameter 1 to be an array, float given
+Expected parameter 1 to be an array, float given
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 10 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--- Iterator 18 --
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 11 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 12 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--- Iterator 19 --
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 13 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 14 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
--- Iterator 20 --
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 15 --Expected parameter 1 to be an array, bool given
+Expected parameter 1 to be an array, bool given
-Warning: array_intersect(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- Iterator 16 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--- Iterator 21 --
-Warning: array_intersect(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+-- Iterator 17 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
-Warning: array_intersect(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+-- Iterator 18 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--- Iterator 22 --
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iterator 19 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iterator 20 --Expected parameter 1 to be an array, string given
+Expected parameter 1 to be an array, string given
--- Iterator 23 --
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iterator 21 --Expected parameter 1 to be an array, object given
+Expected parameter 1 to be an array, object given
-Warning: array_intersect(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- Iterator 22 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
--- Iterator 24 --
-Warning: array_intersect(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+-- Iterator 23 --Expected parameter 1 to be an array, null given
+Expected parameter 1 to be an array, null given
-Warning: array_intersect(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+-- Iterator 24 --Expected parameter 1 to be an array, resource given
+Expected parameter 1 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_intersect_variation2.phpt b/ext/standard/tests/array/array_intersect_variation2.phpt
index 1db37b8467..08f6c9bb48 100644
--- a/ext/standard/tests/array/array_intersect_variation2.phpt
+++ b/ext/standard/tests/array/array_intersect_variation2.phpt
@@ -92,15 +92,23 @@ $arrays = array(
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $unexpected_value) {
- echo "\n-- Iterator $iterator --";
-
- // Calling array_intersect() with default arguments
- var_dump( array_intersect($arr1,$unexpected_value) );
-
- // Calling array_intersect() with more arguments
- var_dump( array_intersect($arr1, $unexpected_value, $arr3) );
-
- $iterator++;
+ echo "\n-- Iterator $iterator --";
+
+ // Calling array_intersect() with default arguments
+ try {
+ var_dump( array_intersect($arr1,$unexpected_value) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ // Calling array_intersect() with more arguments
+ try {
+ var_dump( array_intersect($arr1, $unexpected_value, $arr3) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ $iterator++;
}
// close the file resource used
@@ -108,174 +116,78 @@ fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_intersect() : Passing non-array values to $arr2 argument ***
--- Iterator 1 --
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 2 --
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 3 --
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 4 --
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
-
--- Iterator 5 --
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 6 --
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 7 --
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 8 --
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 9 --
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
-
--- Iterator 10 --
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
--- Iterator 11 --
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
-
--- Iterator 12 --
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
-
--- Iterator 13 --
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 1 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 2 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--- Iterator 14 --
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 3 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 4 --Expected parameter 2 to be an array, int given
+Expected parameter 2 to be an array, int given
--- Iterator 15 --
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 5 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
-Warning: array_intersect(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iterator 6 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--- Iterator 16 --
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 7 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 8 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
--- Iterator 17 --
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 9 --Expected parameter 2 to be an array, float given
+Expected parameter 2 to be an array, float given
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 10 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--- Iterator 18 --
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 11 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 12 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--- Iterator 19 --
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 13 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 14 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
--- Iterator 20 --
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 15 --Expected parameter 2 to be an array, bool given
+Expected parameter 2 to be an array, bool given
-Warning: array_intersect(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iterator 16 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--- Iterator 21 --
-Warning: array_intersect(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+-- Iterator 17 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
-Warning: array_intersect(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+-- Iterator 18 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--- Iterator 22 --
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iterator 19 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iterator 20 --Expected parameter 2 to be an array, string given
+Expected parameter 2 to be an array, string given
--- Iterator 23 --
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iterator 21 --Expected parameter 2 to be an array, object given
+Expected parameter 2 to be an array, object given
-Warning: array_intersect(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iterator 22 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
--- Iterator 24 --
-Warning: array_intersect(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+-- Iterator 23 --Expected parameter 2 to be an array, null given
+Expected parameter 2 to be an array, null given
-Warning: array_intersect(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+-- Iterator 24 --Expected parameter 2 to be an array, resource given
+Expected parameter 2 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_intersect_variation9.phpt b/ext/standard/tests/array/array_intersect_variation9.phpt
index 6c7c956ea7..d66d9c682b 100644
--- a/ext/standard/tests/array/array_intersect_variation9.phpt
+++ b/ext/standard/tests/array/array_intersect_variation9.phpt
@@ -61,37 +61,37 @@ echo "Done";
-- Passing the entire 2-D array to $arr1 and $arr2 --
- With default arguments -
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
array(4) {
[0]=>
array(4) {
@@ -136,53 +136,53 @@ array(4) {
}
- With more arguments -
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_intersect_variation9.php on line %d
+Warning: Array to string conversion in %s on line %d
array(4) {
[0]=>
array(4) {
diff --git a/ext/standard/tests/array/array_key_exists.phpt b/ext/standard/tests/array/array_key_exists.phpt
index 78a144f829..a436e7363e 100644
--- a/ext/standard/tests/array/array_key_exists.phpt
+++ b/ext/standard/tests/array/array_key_exists.phpt
@@ -69,53 +69,26 @@ foreach ($search_arrays_v as $search_array) {
}
echo "\n*** Testing error conditions ***\n";
-//Zeor args
-var_dump( array_key_exists() );
// first args as array
-var_dump( array_key_exists(array(), array()) );
-// second args as string
-var_dump( array_key_exists("", "") );
-// second args a integer
-var_dump( array_key_exists(1, 1) );
-// second args as NULL
-var_dump( array_key_exists(1, NULL) );
-// second args as boolean
-var_dump( array_key_exists(1, true) );
-// first args as boolean
-var_dump( array_key_exists(false, true) );
-// second args as float
-var_dump( array_key_exists(false, 17.5) );
-// args more than expected
-var_dump( array_key_exists(1, array(), array()) );
-// first argument as floating point value
-var_dump( array_key_exists(17.5, array(1,23) ) ) ;
+try {
+ array_key_exists(array(), array());
+} catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+}
echo "\n*** Testing operation on objects ***\n";
class key_check
{
- private $private_var = "Priviate var";
- protected $protected_var = "Protected var";
- public $public_var = "Public var";
- public $arr = array("var" => "value", "1" => "one", ""=>"value");
- public function print_member()
- {
- echo $this->$private_var."\n";
- echo $this->$protected_var."\n";
- echo $this->$public_var."\n";
- }
+ public $public_var = "Public var";
}
$key_check_obj = new key_check; //new object
-/* array_key_exists() on an object, it should work on only public member variables */
-var_dump(array_key_exists("private_var", $key_check_obj)); // not found, private member
-var_dump(array_key_exists("protected_var", $key_check_obj)); // not found, private member
-var_dump(array_key_exists("public_var", $key_check_obj)); // found, public member
-var_dump(array_key_exists("print_member", $key_check_obj)); // not found, its a function
-var_dump(array_key_exists("arr", $key_check_obj)); //found, public member
-var_dump(array_key_exists("var", $key_check_obj->arr)); //found, key is in member array
+try {
+ var_dump(array_key_exists("public_var", $key_check_obj));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
-/* error condition, first argument as object */
-var_dump( array_key_exists($key_check_obj, $key_check_obj) );
echo "Done\n";
?>
--EXPECTF--
@@ -248,57 +221,8 @@ bool(false)
bool(true)
*** Testing error conditions ***
-
-Warning: array_key_exists() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
-Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d
-NULL
-
-Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+Illegal offset type
*** Testing operation on objects ***
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(false)
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(false)
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(true)
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(false)
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(true)
-bool(true)
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+array_key_exists() expects parameter 2 to be array, object given
Done
diff --git a/ext/standard/tests/array/array_key_exists_object1.phpt b/ext/standard/tests/array/array_key_exists_object1.phpt
deleted file mode 100644
index 5386bd624c..0000000000
--- a/ext/standard/tests/array/array_key_exists_object1.phpt
+++ /dev/null
@@ -1,85 +0,0 @@
---TEST--
-Test array_key_exists() function : object functionality
---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
- */
-
-/*
- * Test basic functionality of array_key_exists() with objects
- */
-
-echo "*** Testing array_key_exists() : object functionality ***\n";
-
-class myClass {
- var $var1;
- var $var2;
- var $var3;
-
- function __construct($a, $b, $c = null) {
- $this->var1 = $a;
- $this->var2 = $b;
- if (!is_null($c)) {
- $this->var3 = $c;
- }
- }
-}
-
-echo "\n-- Do not assign a value to \$class1->var3 --\n";
-$class1 = new myClass ('a', 'b');
-echo "\$key = var1:\n";
-var_dump(array_key_exists('var1', $class1));
-echo "\$key = var3:\n";
-var_dump(array_key_exists('var3', $class1));
-echo "\$class1:\n";
-var_dump($class1);
-
-echo "\n-- Assign a value to \$class2->var3 --\n";
-$class2 = new myClass('x', 'y', 'z');
-echo "\$key = var3:\n";
-var_dump(array_key_exists('var3', $class2));
-echo "\$class2:\n";
-var_dump($class2);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_key_exists() : object functionality ***
-
--- Do not assign a value to $class1->var3 --
-$key = var1:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(true)
-$key = var3:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(true)
-$class1:
-object(myClass)#1 (3) {
- ["var1"]=>
- string(1) "a"
- ["var2"]=>
- string(1) "b"
- ["var3"]=>
- NULL
-}
-
--- Assign a value to $class2->var3 --
-$key = var3:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(true)
-$class2:
-object(myClass)#2 (3) {
- ["var1"]=>
- string(1) "x"
- ["var2"]=>
- string(1) "y"
- ["var3"]=>
- string(1) "z"
-}
-Done
diff --git a/ext/standard/tests/array/array_key_exists_object2.phpt b/ext/standard/tests/array/array_key_exists_object2.phpt
deleted file mode 100644
index b550f71a79..0000000000
--- a/ext/standard/tests/array/array_key_exists_object2.phpt
+++ /dev/null
@@ -1,91 +0,0 @@
---TEST--
-Test array_key_exists() function : object functionality - different visibilities
---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 array_key_exists() an object with private and protected properties
- */
-
-echo "*** Testing array_key_exists() : object functionality ***\n";
-
-class myClass {
- public $var1;
- protected $var2;
- private $var3;
-
- function __construct($a, $b, $c = null) {
- $this->var1 = $a;
- $this->var2 = $b;
- if (!is_null($c)) {
- $this->var3 = $c;
- }
- }
-}
-
-echo "\n-- Do not assign a value to \$class1->var3 --\n";
-$class1 = new myClass ('a', 'b');
-echo "\$key = var1:\n";
-var_dump(array_key_exists('var1', $class1));
-echo "\$key = var2:\n";
-var_dump(array_key_exists('var2', $class1));
-echo "\$key = var3:\n";
-var_dump(array_key_exists('var3', $class1));
-echo "\$class1:\n";
-var_dump($class1);
-
-echo "\n-- Assign a value to \$class2->var3 --\n";
-$class2 = new myClass('x', 'y', 'z');
-echo "\$key = var3:\n";
-var_dump(array_key_exists('var3', $class2));
-echo "\$class2:\n";
-var_dump($class2);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_key_exists() : object functionality ***
-
--- Do not assign a value to $class1->var3 --
-$key = var1:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(true)
-$key = var2:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(false)
-$key = var3:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(false)
-$class1:
-object(myClass)#1 (3) {
- ["var1"]=>
- string(1) "a"
- ["var2":protected]=>
- string(1) "b"
- ["var3":"myClass":private]=>
- NULL
-}
-
--- Assign a value to $class2->var3 --
-$key = var3:
-
-Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in %s on line %d
-bool(false)
-$class2:
-object(myClass)#2 (3) {
- ["var1"]=>
- string(1) "x"
- ["var2":protected]=>
- string(1) "y"
- ["var3":"myClass":private]=>
- string(1) "z"
-}
-Done
diff --git a/ext/standard/tests/array/array_key_exists_variation1.phpt b/ext/standard/tests/array/array_key_exists_variation1.phpt
index c6e8ba7806..2f25dbadee 100644
--- a/ext/standard/tests/array/array_key_exists_variation1.phpt
+++ b/ext/standard/tests/array/array_key_exists_variation1.phpt
@@ -15,7 +15,7 @@ Test array_key_exists() function : usage variations - Pass different data types
echo "*** Testing array_key_exists() : usage variations ***\n";
// Initialise function arguments not being substituted
-$search = array ('zero', 'key' => 'val', 'two');
+$search = array ('zero', 'key' => 'val', 'two', 10 => 'value');
//get an unset variable
$unset_var = 10;
@@ -90,7 +90,11 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump( array_key_exists($input, $search) );
+ try {
+ var_dump( array_key_exists($input, $search) );
+ } catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+ }
$iterator++;
};
@@ -114,29 +118,19 @@ bool(false)
bool(false)
-- Iteration 5 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 6 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
bool(false)
-- Iteration 7 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
bool(false)
-- Iteration 8 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 9 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 10 --
bool(false)
@@ -145,24 +139,16 @@ bool(false)
bool(false)
-- Iteration 12 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 13 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 14 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 15 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
-- Iteration 16 --
bool(false)
@@ -171,9 +157,7 @@ bool(false)
bool(false)
-- Iteration 18 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+Illegal offset type
-- Iteration 19 --
bool(true)
@@ -185,9 +169,7 @@ bool(true)
bool(true)
-- Iteration 22 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+Illegal offset type
-- Iteration 23 --
bool(false)
@@ -197,6 +179,6 @@ bool(false)
-- Iteration 25 --
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/array/array_key_exists_variation3.phpt b/ext/standard/tests/array/array_key_exists_variation3.phpt
index 867b4d9848..11f0125be2 100644
--- a/ext/standard/tests/array/array_key_exists_variation3.phpt
+++ b/ext/standard/tests/array/array_key_exists_variation3.phpt
@@ -23,7 +23,11 @@ $iterator = 1;
foreach($keys as $key) {
echo "\n-- Iteration $iterator --\n";
echo "Pass float as \$key:\n";
- var_dump(array_key_exists($key, $search));
+ try {
+ var_dump(array_key_exists($key, $search));
+ } catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+ }
echo "Cast float to int:\n";
var_dump(array_key_exists((int)$key, $search));
}
@@ -35,25 +39,19 @@ echo "Done";
-- Iteration 1 --
Pass float as $key:
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
Cast float to int:
bool(true)
-- Iteration 1 --
Pass float as $key:
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
Cast float to int:
bool(true)
-- Iteration 1 --
Pass float as $key:
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
+bool(true)
Cast float to int:
bool(true)
Done
diff --git a/ext/standard/tests/array/array_keys_error.phpt b/ext/standard/tests/array/array_keys_error.phpt
deleted file mode 100644
index 46a989b839..0000000000
--- a/ext/standard/tests/array/array_keys_error.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-Test array_keys() function (error conditions)
---FILE--
-<?php
-
-echo "\n*** Testing error conditions ***";
-var_dump(array_keys(100));
-var_dump(array_keys("string"));
-var_dump(array_keys(new stdclass)); // object
-var_dump(array_keys()); // Zero arguments
-var_dump(array_keys(array(), "", TRUE, 100)); // args > expected
-var_dump(array_keys(array(1,2,3, new stdClass => array()))); // (W)illegal offset
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing error conditions ***
-Warning: array_keys() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_keys() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_keys() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_keys() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_keys() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: Illegal offset type in %s on line %d
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-Done
diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt
index 56dd033521..d15f28425e 100644
--- a/ext/standard/tests/array/array_map_error.phpt
+++ b/ext/standard/tests/array/array_map_error.phpt
@@ -9,10 +9,6 @@ Test array_map() function : error conditions
echo "*** Testing array_map() : error conditions ***\n";
-// Zero arguments
-echo "\n-- Testing array_map() function with Zero arguments --\n";
-var_dump( array_map() );
-
// Testing array_map with one less than the expected number of arguments
echo "\n-- Testing array_map() function with one less than expected no. of arguments --\n";
function callback1() {
@@ -45,15 +41,8 @@ echo "Done";
--EXPECTF--
*** Testing array_map() : error conditions ***
--- Testing array_map() function with Zero arguments --
-
-Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d%d
-NULL
-
-- Testing array_map() function with one less than expected no. of arguments --
-
-Warning: array_map() expects at least 2 parameters, 1 given in %s on line %d%d
-NULL
+Exception: array_map() expects at least 2 parameters, 1 given
-- Testing array_map() function with less no. of arrays than callback function arguments --
Exception: Too few arguments to function callback2(), 1 passed and exactly 2 expected
diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt
index b808381048..c95395e04d 100644
--- a/ext/standard/tests/array/array_map_object1.phpt
+++ b/ext/standard/tests/array/array_map_object1.phpt
@@ -22,13 +22,17 @@ echo "-- simple class with public variable and method --\n";
class SimpleClass
{
public $var1 = 1;
- public function square($n) {
+ public static function square($n) {
return $n * $n;
}
}
function test($cb, $args) {
echo join('::', $cb) . "\n";
- var_dump(array_map($cb, $args));
+ try {
+ var_dump(array_map($cb, $args));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
test(array('SimpleClass', 'square'), array(1, 2));
@@ -36,7 +40,7 @@ echo "\n-- simple class with private variable and method --\n";
class SimpleClassPri
{
private $var1 = 10;
- private function add($n) {
+ private static function add($n) {
return $var + $n;
}
}
@@ -46,7 +50,7 @@ echo "\n-- simple class with protected variable and method --\n";
class SimpleClassPro
{
protected $var1 = 5;
- protected function mul($n) {
+ protected static function mul($n) {
return $var1 * $n;
}
}
@@ -62,14 +66,14 @@ echo "\n-- abstract class --\n";
abstract class AbstractClass
{
protected $var2 = 5;
- abstract function emptyFunction();
+ abstract static function emptyFunction();
}
// class deriving the above abstract class
class ChildClass extends AbstractClass
{
private $var3;
- public function emptyFunction() {
+ public static function emptyFunction() {
echo "defined in child\n";
}
}
@@ -79,7 +83,7 @@ echo "\n-- class with final method --\n";
class FinalClass
{
private $var4;
- final function finalMethod() {
+ final static function finalMethod() {
echo "This function can't be overloaded\n";
}
}
@@ -120,14 +124,10 @@ class InterClass implements myInterface
test(array('InterClass', 'square'), array(1, 2));
?>
-===DONE===
-<?php exit(0); ?>
--EXPECTF--
*** Testing array_map() : object functionality ***
-- simple class with public variable and method --
SimpleClass::square
-
-Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method SimpleClass::square() should not be called statically in %sarray_map_object1.php on line %d
array(2) {
[0]=>
int(1)
@@ -137,26 +137,18 @@ array(2) {
-- simple class with private variable and method --
SimpleClassPri::add
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access private method SimpleClassPri::add() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access private method SimpleClassPri::add()
-- simple class with protected variable and method --
SimpleClassPro::mul
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access protected method SimpleClassPro::mul() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access protected method SimpleClassPro::mul()
-- class without members --
EmptyClass
-
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, array must have exactly two members
-- abstract class --
ChildClass::emptyFunction
-
-Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method ChildClass::emptyFunction() should not be called statically in %sarray_map_object1.php on line %d
defined in child
defined in child
array(2) {
@@ -168,8 +160,6 @@ array(2) {
-- class with final method --
FinalClass::finalMethod
-
-Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method FinalClass::finalMethod() should not be called statically in %sarray_map_object1.php on line %d
This function can't be overloaded
This function can't be overloaded
array(2) {
@@ -188,13 +178,9 @@ array(2) {
int(4)
}
StaticClass::cube
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access private method StaticClass::cube() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access private method StaticClass::cube()
StaticClass::retVal
-
-Warning: array_map() expects parameter 1 to be a valid callback, cannot access protected method StaticClass::retVal() in %sarray_map_object1.php on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, cannot access protected method StaticClass::retVal()
-- class implementing an interface --
InterClass::square
array(2) {
@@ -203,4 +189,3 @@ array(2) {
[1]=>
int(4)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt
index 7cfb528bf2..e5218ccbe4 100644
--- a/ext/standard/tests/array/array_map_object2.phpt
+++ b/ext/standard/tests/array/array_map_object2.phpt
@@ -26,21 +26,25 @@ class SimpleClass
}
echo "-- with non-existent class --\n";
-var_dump( array_map(array('non-existent', 'square'), array(1, 2)) );
+try {
+ var_dump( array_map(array('non-existent', 'square'), array(1, 2)) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "-- with existent class and non-existent method --\n";
-var_dump( array_map(array('SimpleClass', 'non-existent'), array(1, 2)) );
+try {
+ var_dump( array_map(array('SimpleClass', 'non-existent'), array(1, 2)) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
--EXPECTF--
*** Testing array_map() : with non-existent class and method ***
-- with non-existent class --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found
-- with existent class and non-existent method --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent'
Done
diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt
index 114d1d3134..2f1536df5c 100644
--- a/ext/standard/tests/array/array_map_object3.phpt
+++ b/ext/standard/tests/array/array_map_object3.phpt
@@ -51,13 +51,21 @@ echo "-- accessing parent method from child class --\n";
var_dump( array_map(array('ChildClass', 'staticParent1'), $arr1) );
echo "-- accessing child method from parent class --\n";
-var_dump( array_map(array('ParentClass', 'staticChild'), $arr1) );
+try {
+ var_dump( array_map(array('ParentClass', 'staticChild'), $arr1) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "-- accessing parent method using child class object --\n";
var_dump( array_map(array($childobj, 'staticParent1'), $arr1) );
echo "-- accessing child method using parent class object --\n";
-var_dump( array_map(array($parentobj, 'staticChild'), $arr1) );
+try {
+ var_dump( array_map(array($parentobj, 'staticChild'), $arr1) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
@@ -73,9 +81,7 @@ array(3) {
int(7)
}
-- accessing child method from parent class --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild' in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild'
-- accessing parent method using child class object --
array(3) {
[0]=>
@@ -86,7 +92,5 @@ array(3) {
int(7)
}
-- accessing child method using parent class object --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild' in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild'
Done
diff --git a/ext/standard/tests/array/array_map_variation10.phpt b/ext/standard/tests/array/array_map_variation10.phpt
index 5b80126966..df071a414b 100644
--- a/ext/standard/tests/array/array_map_variation10.phpt
+++ b/ext/standard/tests/array/array_map_variation10.phpt
@@ -33,11 +33,15 @@ echo "-- anonymous function with NULL body --\n";
var_dump( array_map( function($a) { }, $array1));
echo "-- passing NULL as 'arr1' --\n";
-var_dump( array_map( function($a) { return array($a); }, NULL));
+try {
+ var_dump( array_map( function($a) { return array($a); }, NULL));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_map() : anonymous callback function ***
-- anonymous function with all parameters and body --
array(3) {
@@ -84,7 +88,5 @@ array(3) {
NULL
}
-- passing NULL as 'arr1' --
-
-Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
Done
diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt
index b258c2d31b..67abde0108 100644
--- a/ext/standard/tests/array/array_map_variation12.phpt
+++ b/ext/standard/tests/array/array_map_variation12.phpt
@@ -20,10 +20,18 @@ echo "-- with built-in function 'pow' and two parameters --\n";
var_dump( array_map('pow', $array1, $array2));
echo "-- with built-in function 'pow' and one parameter --\n";
-var_dump( array_map('pow', $array1));
+try {
+ var_dump( array_map('pow', $array1));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "-- with language construct --\n";
-var_dump( array_map('echo', $array1));
+try {
+ var_dump( array_map('echo', $array1));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
@@ -39,22 +47,7 @@ array(3) {
int(243)
}
-- with built-in function 'pow' and one parameter --
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
+pow() expects exactly 2 parameters, 1 given
-- with language construct --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt
index 771d3f949e..2764cb7374 100644
--- a/ext/standard/tests/array/array_map_variation14.phpt
+++ b/ext/standard/tests/array/array_map_variation14.phpt
@@ -36,10 +36,18 @@ echo "-- with undefined variable --\n";
var_dump( array_map(@$undefined_var, $arr1) );
echo "-- with empty string --\n";
-var_dump( array_map("", $arr1, $arr2) );
+try {
+ var_dump( array_map("", $arr1, $arr2) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "-- with empty array --\n";
-var_dump( array_map(array(), $arr1, $arr2) );
+try {
+ var_dump( array_map(array(), $arr1, $arr2) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
@@ -115,11 +123,7 @@ array(2) {
int(2)
}
-- with empty string --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name
-- with empty array --
-
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, array must have exactly two members
Done
diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt
index b29af47713..f36d55bd5f 100644
--- a/ext/standard/tests/array/array_map_variation15.phpt
+++ b/ext/standard/tests/array/array_map_variation15.phpt
@@ -18,13 +18,15 @@ $arr1 = array(1, 2);
$arr2 = array("one", "two");
$arr3 = array(1.1, 2.2);
-var_dump( array_map('non_existent', $arr1, $arr2, $arr3) );
+try {
+ var_dump( array_map('non_existent', $arr1, $arr2, $arr3) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_map() : non existent 'callback' function ***
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt
index c4987cb385..0c80337c76 100644
--- a/ext/standard/tests/array/array_map_variation16.phpt
+++ b/ext/standard/tests/array/array_map_variation16.phpt
@@ -30,8 +30,12 @@ $callback_names = array(
);
for($count = 0; $count < count($callback_names); $count++)
{
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( array_map($callback_names[$count], $arr1) );
+ echo "-- Iteration ".($count + 1)." --\n";
+ try {
+ var_dump( array_map($callback_names[$count], $arr1) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
echo "Done";
@@ -39,35 +43,19 @@ echo "Done";
--EXPECTF--
*** Testing array_map() : non-permmited built-in functions ***
-- Iteration 1 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name
-- Iteration 2 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid function name
-- Iteration 3 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid function name
-- Iteration 4 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid function name
-- Iteration 5 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid function name
-- Iteration 6 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid function name
-- Iteration 7 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid function name
-- Iteration 8 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt
index 1cfbdd7beb..4558dc999f 100644
--- a/ext/standard/tests/array/array_map_variation17.phpt
+++ b/ext/standard/tests/array/array_map_variation17.phpt
@@ -66,93 +66,77 @@ $unexpected_callbacks = array(
// loop through each element of $inputs to check the behavior of array_map
for($count = 0; $count < count($unexpected_callbacks); $count++) {
- echo "\n-- Iteration ".($count + 1)." --";
- var_dump( array_map($unexpected_callbacks[$count], $arr1));
+ echo "\n-- Iteration ".($count + 1)." --\n";
+ try {
+ var_dump( array_map($unexpected_callbacks[$count], $arr1));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_map() : unexpected values for 'callback' argument ***
-- Iteration 1 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 2 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 3 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 4 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 5 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 6 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 7 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 8 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 9 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 10 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 11 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 12 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 13 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 14 --
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name
-- Iteration 15 --
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name
-- Iteration 16 --
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, array must have exactly two members
-- Iteration 17 --
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
-- Iteration 18 --
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
-- Iteration 19 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
-- Iteration 20 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
+array_map() expects parameter 1 to be a valid callback, no array or string given
Done
diff --git a/ext/standard/tests/array/array_map_variation4.phpt b/ext/standard/tests/array/array_map_variation4.phpt
index e5b4c062c1..8e75b91ff4 100644
--- a/ext/standard/tests/array/array_map_variation4.phpt
+++ b/ext/standard/tests/array/array_map_variation4.phpt
@@ -58,10 +58,10 @@ $arrays = array (
array("hello", $heredoc => "string"), // heredoc
// array with object, unset variable and resource variable
- array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'),
+ array(@$unset_var => "hello", $fp => 'resource'),
// array with mixed values
-/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2,
+/*11*/ array('hello' => 1, "fruit" => 2.2,
$fp => 'resource', 133 => "int", 444.432 => "float",
@$unset_var => "unset", $heredoc => "heredoc")
);
@@ -79,13 +79,9 @@ echo "Done";
--EXPECTF--
*** Testing array_map() : associative array with diff. keys for 'arr1' argument ***
-Warning: Illegal offset type in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-- Iteration 1 --
array(0) {
}
diff --git a/ext/standard/tests/array/array_merge.phpt b/ext/standard/tests/array/array_merge.phpt
index 0afc2084af..08ecbf7147 100644
--- a/ext/standard/tests/array/array_merge.phpt
+++ b/ext/standard/tests/array/array_merge.phpt
@@ -78,12 +78,6 @@ var_dump(array_merge($begin_array[6]));
echo "\n*** Testing array_merge() with typecasting non-array to array ***\n";
var_dump(array_merge($begin_array[4], (array)"type1", (array)10, (array)12.34));
-echo "\n*** Testing error conditions ***";
-/* Invalid arguments */
-var_dump(array_merge(100, 200));
-var_dump(array_merge($begin_array[0], $begin_array[1], 100));
-var_dump(array_merge($begin_array[0], $begin_array[1], $arr4));
-
echo "\n*** Testing array_merge without any arguments ***\n";
var_dump(array_merge());
@@ -747,18 +741,6 @@ array(7) {
float(12.34)
}
-*** Testing error conditions ***
-Warning: array_merge(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
-Warning: array_merge(): Expected parameter 3 to be an array, int given in %s on line %d
-NULL
-
-Notice: Undefined variable: arr4 in %s on line %d
-
-Warning: array_merge(): Expected parameter 3 to be an array, null given in %s on line %d
-NULL
-
*** Testing array_merge without any arguments ***
array(0) {
}
diff --git a/ext/standard/tests/array/array_merge_recursive_variation1.phpt b/ext/standard/tests/array/array_merge_recursive_variation1.phpt
index 071e9eadb5..3d15d56b81 100644
--- a/ext/standard/tests/array/array_merge_recursive_variation1.phpt
+++ b/ext/standard/tests/array/array_merge_recursive_variation1.phpt
@@ -88,17 +88,25 @@ $arr2 = array(1, array("hello", 'world'));
// loop through each element of $arrays and check the behavior of array_merge_recursive()
$iterator = 1;
foreach($arrays as $arr1) {
- echo "\n-- Iteration $iterator --";
-
- // with default argument
- echo "\n-- With default argument --";
- var_dump( array_merge_recursive($arr1) );
-
- // with more arguments
- echo "-- With more arguments --";
- var_dump( array_merge_recursive($arr1, $arr2) );
-
- $iterator++;
+ echo "\n-- Iteration $iterator --";
+
+ // with default argument
+ echo "\n-- With default argument --";
+ try {
+ var_dump( array_merge_recursive($arr1) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ // with more arguments
+ echo "-- With more arguments --";
+ try {
+ var_dump( array_merge_recursive($arr1, $arr2) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ $iterator++;
}
// close the file resource used
@@ -106,198 +114,102 @@ fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_merge_recursive() : Passing non array values to $arr1 argument ***
-- Iteration 1 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, int given
+-- With more arguments --Expected parameter 1 to be an array, int given
-- Iteration 2 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, int given
+-- With more arguments --Expected parameter 1 to be an array, int given
-- Iteration 3 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, int given
+-- With more arguments --Expected parameter 1 to be an array, int given
-- Iteration 4 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, int given
+-- With more arguments --Expected parameter 1 to be an array, int given
-- Iteration 5 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, float given
+-- With more arguments --Expected parameter 1 to be an array, float given
-- Iteration 6 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, float given
+-- With more arguments --Expected parameter 1 to be an array, float given
-- Iteration 7 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, float given
+-- With more arguments --Expected parameter 1 to be an array, float given
-- Iteration 8 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, float given
+-- With more arguments --Expected parameter 1 to be an array, float given
-- Iteration 9 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, float given
+-- With more arguments --Expected parameter 1 to be an array, float given
-- Iteration 10 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, null given
+-- With more arguments --Expected parameter 1 to be an array, null given
-- Iteration 11 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, null given
+-- With more arguments --Expected parameter 1 to be an array, null given
-- Iteration 12 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, bool given
+-- With more arguments --Expected parameter 1 to be an array, bool given
-- Iteration 13 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, bool given
+-- With more arguments --Expected parameter 1 to be an array, bool given
-- Iteration 14 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, bool given
+-- With more arguments --Expected parameter 1 to be an array, bool given
-- Iteration 15 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, bool given
+-- With more arguments --Expected parameter 1 to be an array, bool given
-- Iteration 16 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, string given
+-- With more arguments --Expected parameter 1 to be an array, string given
-- Iteration 17 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, string given
+-- With more arguments --Expected parameter 1 to be an array, string given
-- Iteration 18 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, string given
+-- With more arguments --Expected parameter 1 to be an array, string given
-- Iteration 19 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, string given
+-- With more arguments --Expected parameter 1 to be an array, string given
-- Iteration 20 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, string given
+-- With more arguments --Expected parameter 1 to be an array, string given
-- Iteration 21 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, null given
+-- With more arguments --Expected parameter 1 to be an array, null given
-- Iteration 22 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, null given
+-- With more arguments --Expected parameter 1 to be an array, null given
-- Iteration 23 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, resource given
+-- With more arguments --Expected parameter 1 to be an array, resource given
-- Iteration 24 --
--- With default argument --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
+-- With default argument --Expected parameter 1 to be an array, object given
+-- With more arguments --Expected parameter 1 to be an array, object given
Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation2.phpt b/ext/standard/tests/array/array_merge_recursive_variation2.phpt
index f14d5d9bb3..eec9634630 100644
--- a/ext/standard/tests/array/array_merge_recursive_variation2.phpt
+++ b/ext/standard/tests/array/array_merge_recursive_variation2.phpt
@@ -88,9 +88,13 @@ $arrays = array (
// loop through each element of $arrays and check the behavior of array_merge_recursive()
$iterator = 1;
foreach($arrays as $arr2) {
- echo "\n-- Iteration $iterator --";
- var_dump( array_merge_recursive($arr1, $arr2) );
- $iterator++;
+ echo "\n-- Iteration $iterator --";
+ try {
+ var_dump( array_merge_recursive($arr1, $arr2) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
}
// close the file resource used
@@ -98,102 +102,54 @@ fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_merge_recursive() : Passing non array values to $arr2 argument ***
--- Iteration 1 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 1 --Expected parameter 2 to be an array, int given
--- Iteration 2 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 2 --Expected parameter 2 to be an array, int given
--- Iteration 3 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 3 --Expected parameter 2 to be an array, int given
--- Iteration 4 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+-- Iteration 4 --Expected parameter 2 to be an array, int given
--- Iteration 5 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 5 --Expected parameter 2 to be an array, float given
--- Iteration 6 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 6 --Expected parameter 2 to be an array, float given
--- Iteration 7 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 7 --Expected parameter 2 to be an array, float given
--- Iteration 8 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 8 --Expected parameter 2 to be an array, float given
--- Iteration 9 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+-- Iteration 9 --Expected parameter 2 to be an array, float given
--- Iteration 10 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 10 --Expected parameter 2 to be an array, null given
--- Iteration 11 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 11 --Expected parameter 2 to be an array, null given
--- Iteration 12 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 12 --Expected parameter 2 to be an array, bool given
--- Iteration 13 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 13 --Expected parameter 2 to be an array, bool given
--- Iteration 14 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 14 --Expected parameter 2 to be an array, bool given
--- Iteration 15 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+-- Iteration 15 --Expected parameter 2 to be an array, bool given
--- Iteration 16 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 16 --Expected parameter 2 to be an array, string given
--- Iteration 17 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 17 --Expected parameter 2 to be an array, string given
--- Iteration 18 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 18 --Expected parameter 2 to be an array, string given
--- Iteration 19 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 19 --Expected parameter 2 to be an array, string given
--- Iteration 20 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+-- Iteration 20 --Expected parameter 2 to be an array, string given
--- Iteration 21 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 21 --Expected parameter 2 to be an array, null given
--- Iteration 22 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+-- Iteration 22 --Expected parameter 2 to be an array, null given
--- Iteration 23 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+-- Iteration 23 --Expected parameter 2 to be an array, resource given
--- Iteration 24 --
-Warning: array_merge_recursive(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+-- Iteration 24 --Expected parameter 2 to be an array, object given
Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation4.phpt b/ext/standard/tests/array/array_merge_recursive_variation4.phpt
index f2c1e82a0c..dc5651adfb 100644
--- a/ext/standard/tests/array/array_merge_recursive_variation4.phpt
+++ b/ext/standard/tests/array/array_merge_recursive_variation4.phpt
@@ -50,7 +50,7 @@ $arrays = array (
array("hello", $heredoc => array("heredoc", 'string'), "string"),
// array with object, unset variable and resource variable
-/*8*/ array(new classA() => 11, @$unset_var => array("unset"), $fp => 'resource', 11, "hello")
+/*8*/ array(@$unset_var => array("unset"), $fp => 'resource', 11, "hello")
);
// initialise the second array
@@ -80,9 +80,7 @@ echo "Done";
--EXPECTF--
*** Testing array_merge_recursive() : assoc. array with diff. keys to $arr1 argument ***
-Warning: Illegal offset type in %s on line %d
-
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-- Iteration 1 --
-- With default argument --
array(2) {
diff --git a/ext/standard/tests/array/array_merge_variation1.phpt b/ext/standard/tests/array/array_merge_variation1.phpt
index 0335fe473b..16e702e8a1 100644
--- a/ext/standard/tests/array/array_merge_variation1.phpt
+++ b/ext/standard/tests/array/array_merge_variation1.phpt
@@ -102,129 +102,8 @@ echo "Done";
-- Iteration 1 --
-Warning: array_merge(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
--- Iteration 19 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_merge(): Expected parameter 1 to be an array, resource given in %s on line %d
-NULL
-Done
+Fatal error: Uncaught TypeError: Expected parameter 1 to be an array, int given in %s:%d
+Stack trace:
+#0 %s(%d): array_merge(0, Array)
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/array/array_merge_variation2.phpt b/ext/standard/tests/array/array_merge_variation2.phpt
index fd7e9ccfc8..57715d484b 100644
--- a/ext/standard/tests/array/array_merge_variation2.phpt
+++ b/ext/standard/tests/array/array_merge_variation2.phpt
@@ -88,102 +88,72 @@ $inputs = array(
// loop through each element of $inputs to check the behavior of array_merge()
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_merge($arr1, $input) );
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump( array_merge($arr1, $input) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
-- Iteration 1 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 2 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 3 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 4 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 5 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 6 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 7 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 8 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 9 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 10 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 11 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 12 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 13 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 14 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 15 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 16 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 17 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 18 --
array(2) {
@@ -194,37 +164,23 @@ array(2) {
}
-- Iteration 19 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 20 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 21 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 22 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
-- Iteration 23 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 24 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 25 --
-
-Warning: array_merge(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+Expected parameter 2 to be an array, resource given
Done
diff --git a/ext/standard/tests/array/array_multisort_basic1.phpt b/ext/standard/tests/array/array_multisort_basic1.phpt
index 20e90be415..599838a5d5 100644
--- a/ext/standard/tests/array/array_multisort_basic1.phpt
+++ b/ext/standard/tests/array/array_multisort_basic1.phpt
@@ -24,7 +24,6 @@ var_dump($ar2);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : basic functionality ***
@@ -57,4 +56,3 @@ array(3) {
["row1"]=>
int(2)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_basic2.phpt b/ext/standard/tests/array/array_multisort_basic2.phpt
index e7af3b352f..41eb5d8a62 100644
--- a/ext/standard/tests/array/array_multisort_basic2.phpt
+++ b/ext/standard/tests/array/array_multisort_basic2.phpt
@@ -19,7 +19,6 @@ var_dump( array_multisort($ar1, SORT_ASC, SORT_REGULAR, $ar2, SORT_ASC, SORT_NUM
var_dump($ar1, $ar2);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : basic functionality - renumbering of numeric keys ***
@@ -41,4 +40,3 @@ array(3) {
[2]=>
int(2)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_case.phpt b/ext/standard/tests/array/array_multisort_case.phpt
index 390640700c..e56d297e49 100644
--- a/ext/standard/tests/array/array_multisort_case.phpt
+++ b/ext/standard/tests/array/array_multisort_case.phpt
@@ -35,7 +35,6 @@ array_multisort($b, SORT_STRING, $a);
var_dump($a, $b);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : case-sensitive
array(7) {
@@ -70,4 +69,3 @@ array(7) {
[6]=>
string(3) "3 e"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_error.phpt b/ext/standard/tests/array/array_multisort_error.phpt
index 3e78b78ac0..ddcf74eaae 100644
--- a/ext/standard/tests/array/array_multisort_error.phpt
+++ b/ext/standard/tests/array/array_multisort_error.phpt
@@ -10,35 +10,28 @@ Test array_multisort() function : error conditions
echo "*** Testing array_multisort() : error conditions ***\n";
-// Zero arguments
-echo "\n-- Testing array_multisort() function with Zero arguments --\n";
-var_dump( array_multisort() );
-
echo "\n-- Testing array_multisort() function with repeated flags --\n";
$ar1 = array(1);
-var_dump( array_multisort($ar1, SORT_ASC, SORT_ASC) );
+try {
+ var_dump( array_multisort($ar1, SORT_ASC, SORT_ASC) );
+} catch (Error $e) {
+ echo $e->getMessage() . "\n";
+}
echo "\n-- Testing array_multisort() function with repeated flags --\n";
$ar1 = array(1);
-var_dump( array_multisort($ar1, SORT_STRING, SORT_NUMERIC) );
+try {
+ var_dump( array_multisort($ar1, SORT_STRING, SORT_NUMERIC) );
+} catch (Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_multisort() : error conditions ***
--- Testing array_multisort() function with Zero arguments --
-
-Warning: array_multisort() expects at least 1 parameter, 0 given in %sarray_multisort_error.php on line %d
-NULL
-
-- Testing array_multisort() function with repeated flags --
-
-Warning: array_multisort(): Argument #3 is expected to be an array or sorting flag that has not already been specified in %sarray_multisort_error.php on line %d
-bool(false)
+Argument #3 is expected to be an array or sorting flag that has not already been specified
-- Testing array_multisort() function with repeated flags --
-
-Warning: array_multisort(): Argument #3 is expected to be an array or sorting flag that has not already been specified in %sarray_multisort_error.php on line %d
-bool(false)
-===DONE===
+Argument #3 is expected to be an array or sorting flag that has not already been specified
diff --git a/ext/standard/tests/array/array_multisort_incase.phpt b/ext/standard/tests/array/array_multisort_incase.phpt
index a20a0f1151..4799d8bcb5 100644
--- a/ext/standard/tests/array/array_multisort_incase.phpt
+++ b/ext/standard/tests/array/array_multisort_incase.phpt
@@ -35,7 +35,6 @@ array_multisort($b, SORT_STRING | SORT_FLAG_CASE, $a);
var_dump($a, $b);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : case-insensitive
array(7) {
@@ -70,4 +69,3 @@ array(7) {
[6]=>
string(3) "3 e"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_natural.phpt b/ext/standard/tests/array/array_multisort_natural.phpt
index 56fb3df582..27b22a799d 100644
--- a/ext/standard/tests/array/array_multisort_natural.phpt
+++ b/ext/standard/tests/array/array_multisort_natural.phpt
@@ -31,7 +31,6 @@ array_multisort($b, SORT_NATURAL, $a);
var_dump($a, $b);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : natural sorting
array(5) {
@@ -58,4 +57,3 @@ array(5) {
[4]=>
string(4) "20 c"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_natural_case.phpt b/ext/standard/tests/array/array_multisort_natural_case.phpt
index 79ff8e99c6..75db1565df 100644
--- a/ext/standard/tests/array/array_multisort_natural_case.phpt
+++ b/ext/standard/tests/array/array_multisort_natural_case.phpt
@@ -35,7 +35,6 @@ array_multisort($b, SORT_NATURAL, $a);
var_dump($a, $b);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : natural sorting case-sensitive
array(7) {
@@ -70,4 +69,3 @@ array(7) {
[6]=>
string(4) "20 c"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_natural_incase.phpt b/ext/standard/tests/array/array_multisort_natural_incase.phpt
index f34c501eec..b603dd57a4 100644
--- a/ext/standard/tests/array/array_multisort_natural_incase.phpt
+++ b/ext/standard/tests/array/array_multisort_natural_incase.phpt
@@ -35,7 +35,6 @@ array_multisort($b, SORT_NATURAL | SORT_FLAG_CASE, $a);
var_dump($a, $b);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : natural sorting case-insensitive
array(7) {
@@ -70,4 +69,3 @@ array(7) {
[6]=>
string(4) "20 c"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation1.phpt b/ext/standard/tests/array/array_multisort_variation1.phpt
index 9a33a270f1..4c09facb54 100644
--- a/ext/standard/tests/array/array_multisort_variation1.phpt
+++ b/ext/standard/tests/array/array_multisort_variation1.phpt
@@ -11,8 +11,8 @@ Test array_multisort() function : usage variation
echo "*** Testing array_multisort() : usage variation ***\n";
// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ if (error_reporting() & $err_no) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
@@ -97,111 +97,88 @@ $inputs = array(
foreach($inputs as $key =>$value) {
echo "\n--$key--\n";
- var_dump( array_multisort($value));
+ try {
+ var_dump( array_multisort($value));
+ } catch (Error $e) {
+ echo $e->getMessage() . "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_multisort() : usage variation ***
--int 0--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or sorting flag that has not already been specified, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or sorting flag that has not already been specified
--int 1--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or sorting flag that has not already been specified, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or sorting flag that has not already been specified
--int 12345--
-Error: 2 - array_multisort(): Argument #1 is an unknown sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is an unknown sort flag
--int -12345--
-Error: 2 - array_multisort(): Argument #1 is an unknown sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is an unknown sort flag
--float 10.5--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--float -10.5--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--float 12.3456789000e10--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--float -12.3456789000e10--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--float .5--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--uppercase NULL--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--lowercase null--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--lowercase true--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--lowercase false--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--uppercase TRUE--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--uppercase FALSE--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--empty string DQ--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--empty string SQ--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--string DQ--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--string SQ--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--mixed case string--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--heredoc--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--instance of classWithToString--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--instance of classWithoutToString--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--undefined var--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
+Argument #1 is expected to be an array or a sort flag
--unset var--
-Error: 2 - array_multisort(): Argument #1 is expected to be an array or a sort flag, %sarray_multisort_variation1.php(%d)
-bool(false)
-===DONE===
+Argument #1 is expected to be an array or a sort flag
diff --git a/ext/standard/tests/array/array_multisort_variation10.phpt b/ext/standard/tests/array/array_multisort_variation10.phpt
index 17bdeae5cd..2a08156d94 100644
--- a/ext/standard/tests/array/array_multisort_variation10.phpt
+++ b/ext/standard/tests/array/array_multisort_variation10.phpt
@@ -13,8 +13,6 @@ echo "*** Testing array_multisort() : Testing with anonymous arguments ***\n";
var_dump(array_multisort(array(1,3,2,4)));
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : Testing with anonymous arguments ***
bool(true)
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation11.phpt b/ext/standard/tests/array/array_multisort_variation11.phpt
index 49e8d0f30e..2a62b67abc 100644
--- a/ext/standard/tests/array/array_multisort_variation11.phpt
+++ b/ext/standard/tests/array/array_multisort_variation11.phpt
@@ -13,9 +13,6 @@ echo "*** Testing array_multisort() : Testing with empty array ***\n";
var_dump(array_multisort(array()));
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
*** Testing array_multisort() : Testing with empty array ***
bool(true)
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation2.phpt b/ext/standard/tests/array/array_multisort_variation2.phpt
index 8c26a8347b..160172fa3b 100644
--- a/ext/standard/tests/array/array_multisort_variation2.phpt
+++ b/ext/standard/tests/array/array_multisort_variation2.phpt
@@ -11,8 +11,8 @@ Test array_multisort() function : usage variation
echo "*** Testing array_multisort() : usage variation ***\n";
// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ if (error_reporting() & $err_no) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
@@ -104,13 +104,16 @@ $inputs = array(
// loop through each element of the array for SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]]
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_multisort($ar1, $value) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_multisort($ar1, $value) );
+ } catch (Error $e) {
+ echo $e->getMessage() . "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_multisort() : usage variation ***
--int 0--
@@ -120,109 +123,82 @@ bool(true)
bool(true)
--int 12345--
-Error: 2 - array_multisort(): Argument #2 is an unknown sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is an unknown sort flag
--int -12345--
-Error: 2 - array_multisort(): Argument #2 is an unknown sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is an unknown sort flag
--float 10.5--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--float -10.5--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--float 12.3456789000e10--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--float -12.3456789000e10--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--float .5--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--empty array--
-Error: 2 - array_multisort(): Array sizes are inconsistent, %sarray_multisort_variation2.php(%d)
-bool(false)
+Array sizes are inconsistent
--int indexed array--
-Error: 2 - array_multisort(): Array sizes are inconsistent, %sarray_multisort_variation2.php(%d)
-bool(false)
+Array sizes are inconsistent
--associative array--
bool(true)
--nested arrays--
-Error: 2 - array_multisort(): Array sizes are inconsistent, %sarray_multisort_variation2.php(%d)
-bool(false)
+Array sizes are inconsistent
--uppercase NULL--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--lowercase null--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--lowercase true--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--lowercase false--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--uppercase TRUE--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--uppercase FALSE--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--empty string DQ--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--empty string SQ--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--string DQ--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--string SQ--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--mixed case string--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--heredoc--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--instance of classWithToString--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--instance of classWithoutToString--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--undefined var--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
+Argument #2 is expected to be an array or a sort flag
--unset var--
-Error: 2 - array_multisort(): Argument #2 is expected to be an array or a sort flag, %sarray_multisort_variation2.php(%d)
-bool(false)
-===DONE===
+Argument #2 is expected to be an array or a sort flag
diff --git a/ext/standard/tests/array/array_multisort_variation3.phpt b/ext/standard/tests/array/array_multisort_variation3.phpt
index 28130e31fd..cedc6814cc 100644
--- a/ext/standard/tests/array/array_multisort_variation3.phpt
+++ b/ext/standard/tests/array/array_multisort_variation3.phpt
@@ -11,8 +11,8 @@ Test array_multisort() function : usage variation
echo "*** Testing array_multisort() : usage variation ***\n";
// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ if (error_reporting() & $err_no) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
@@ -95,114 +95,90 @@ $inputs = array(
);
// loop through each element of the array for ar2
-
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_multisort($ar1, SORT_REGULAR, $value) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_multisort($ar1, SORT_REGULAR, $value) );
+ } catch (Error $e) {
+ echo $e->getMessage() . "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_multisort() : usage variation ***
--int 0--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or sorting flag that has not already been specified, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or sorting flag that has not already been specified
--int 1--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or sorting flag that has not already been specified, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or sorting flag that has not already been specified
--int 12345--
-Error: 2 - array_multisort(): Argument #3 is an unknown sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is an unknown sort flag
--int -12345--
-Error: 2 - array_multisort(): Argument #3 is an unknown sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is an unknown sort flag
--float 10.5--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--float -10.5--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--float 12.3456789000e10--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--float -12.3456789000e10--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--float .5--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--uppercase NULL--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--lowercase null--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--lowercase true--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--lowercase false--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--uppercase TRUE--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--uppercase FALSE--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--empty string DQ--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--empty string SQ--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--string DQ--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--string SQ--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--mixed case string--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--heredoc--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--instance of classWithToString--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--instance of classWithoutToString--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--undefined var--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
+Argument #3 is expected to be an array or a sort flag
--unset var--
-Error: 2 - array_multisort(): Argument #3 is expected to be an array or a sort flag, %sarray_multisort_variation3.php(%d)
-bool(false)
-===DONE===
+Argument #3 is expected to be an array or a sort flag
diff --git a/ext/standard/tests/array/array_multisort_variation4.phpt b/ext/standard/tests/array/array_multisort_variation4.phpt
index 562be2e70e..9b5f5fe1c7 100644
--- a/ext/standard/tests/array/array_multisort_variation4.phpt
+++ b/ext/standard/tests/array/array_multisort_variation4.phpt
@@ -21,7 +21,6 @@ var_dump($arr2);
var_dump($arr3);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : Testing with multiple array arguments ***
bool(true)
@@ -55,4 +54,3 @@ array(4) {
[3]=>
int(9)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation5.phpt b/ext/standard/tests/array/array_multisort_variation5.phpt
index 2953846825..3298bb8099 100644
--- a/ext/standard/tests/array/array_multisort_variation5.phpt
+++ b/ext/standard/tests/array/array_multisort_variation5.phpt
@@ -23,7 +23,6 @@ var_dump($ar);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : Testing all array sort specifiers ***
array(3) {
@@ -50,4 +49,3 @@ array(3) {
[2]=>
int(2)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation6.phpt b/ext/standard/tests/array/array_multisort_variation6.phpt
index f5ffb8a7e4..5cf556087c 100644
--- a/ext/standard/tests/array/array_multisort_variation6.phpt
+++ b/ext/standard/tests/array/array_multisort_variation6.phpt
@@ -23,7 +23,6 @@ var_dump($ar);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : Testing all array sort specifiers ***
array(3) {
@@ -50,4 +49,3 @@ array(3) {
[2]=>
string(2) "aa"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation7.phpt b/ext/standard/tests/array/array_multisort_variation7.phpt
index 4ad68efe19..f073cd5df2 100644
--- a/ext/standard/tests/array/array_multisort_variation7.phpt
+++ b/ext/standard/tests/array/array_multisort_variation7.phpt
@@ -36,7 +36,6 @@ var_dump(array_multisort($inputs));
var_dump($inputs);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : usage variation - test sort order of all types***
bool(true)
@@ -65,4 +64,3 @@ array(10) {
object(classWithoutToString)#2 (0) {
}
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation8.phpt b/ext/standard/tests/array/array_multisort_variation8.phpt
index 00b0ccb012..f0ef3e0dd5 100644
--- a/ext/standard/tests/array/array_multisort_variation8.phpt
+++ b/ext/standard/tests/array/array_multisort_variation8.phpt
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation - test sort order of all types
echo "*** Testing array_multisort() : usage variation - test sort order of all types***\n";
// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
// We're testing sort order not errors so ignore.
}
set_error_handler('test_error_handler');
@@ -41,7 +41,6 @@ var_dump(array_multisort($inputs, SORT_STRING));
var_dump($inputs);
?>
-===DONE===
--EXPECT--
*** Testing array_multisort() : usage variation - test sort order of all types***
bool(true)
@@ -67,4 +66,3 @@ array(9) {
["string DQ"]=>
string(6) "string"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_multisort_variation9.phpt b/ext/standard/tests/array/array_multisort_variation9.phpt
index 8d422b78c0..a5d689cc87 100644
--- a/ext/standard/tests/array/array_multisort_variation9.phpt
+++ b/ext/standard/tests/array/array_multisort_variation9.phpt
@@ -36,7 +36,6 @@ var_dump(array_multisort($inputs, SORT_NUMERIC));
var_dump($inputs);
?>
-===DONE===
--EXPECTF--
*** Testing array_multisort() : usage variation - test sort order of all types***
@@ -73,4 +72,3 @@ array(10) {
object(classWithoutToString)#2 (0) {
}
}
-===DONE===
diff --git a/ext/standard/tests/array/array_pad.phpt b/ext/standard/tests/array/array_pad.phpt
index c267516730..ce6e1b2b04 100644
--- a/ext/standard/tests/array/array_pad.phpt
+++ b/ext/standard/tests/array/array_pad.phpt
@@ -3,9 +3,6 @@ array_pad() tests
--FILE--
<?php
-var_dump(array_pad());
-var_dump(array_pad(array()));
-var_dump(array_pad(array(), 1));
var_dump(array_pad(array(), 1, 0));
var_dump(array_pad(array(), 0, 0));
@@ -15,20 +12,17 @@ var_dump(array_pad(array("", -1, 2.0), 5, array()));
var_dump(array_pad(array("", -1, 2.0), 2, array()));
var_dump(array_pad(array("", -1, 2.0), -3, array()));
var_dump(array_pad(array("", -1, 2.0), -4, array()));
-var_dump(array_pad(array("", -1, 2.0), 2000000, 0));
-var_dump(array_pad("", 2000000, 0));
-echo "Done\n";
-?>
---EXPECTF--
-Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
+try {
+ var_dump(array_pad(array("", -1, 2.0), 2000000, 0));
+} catch (Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
+?>
-Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
+DONE
+--EXPECT--
array(1) {
[0]=>
int(0)
@@ -92,10 +86,6 @@ array(4) {
[3]=>
float(2)
}
+You may only pad up to 1048576 elements at a time
-Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
-bool(false)
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-Done
+DONE
diff --git a/ext/standard/tests/array/array_product_variation1.phpt b/ext/standard/tests/array/array_product_variation1.phpt
index 98c23e4d26..379d59cb21 100644
--- a/ext/standard/tests/array/array_product_variation1.phpt
+++ b/ext/standard/tests/array/array_product_variation1.phpt
@@ -28,7 +28,6 @@ foreach ($types as $desc => $type) {
fclose($fp);
?>
-===DONE===
--EXPECTF--
*** Testing array_product() : variation - using non numeric values ***
boolean (true)
@@ -55,4 +54,3 @@ int(0)
array
int(1)
-===DONE===
diff --git a/ext/standard/tests/array/array_product_variation2.phpt b/ext/standard/tests/array/array_product_variation2.phpt
index 38faf712e1..624fc37e5a 100644
--- a/ext/standard/tests/array/array_product_variation2.phpt
+++ b/ext/standard/tests/array/array_product_variation2.phpt
@@ -13,10 +13,8 @@ echo "*** Testing array_product() : variations ***\n";
echo "\n-- Testing array_product() function with a keyed array array --\n";
var_dump( array_product(array("bob" => 2, "janet" => 5)) );
?>
-===DONE===
--EXPECT--
*** Testing array_product() : variations ***
-- Testing array_product() function with a keyed array array --
int(10)
-===DONE===
diff --git a/ext/standard/tests/array/array_product_variation3.phpt b/ext/standard/tests/array/array_product_variation3.phpt
index a325879e45..588e46249e 100644
--- a/ext/standard/tests/array/array_product_variation3.phpt
+++ b/ext/standard/tests/array/array_product_variation3.phpt
@@ -27,7 +27,6 @@ var_dump( array_product(array(-99999999.9, 99999999.1)));
?>
-===DONE===
--EXPECT--
*** Testing array_product() : variations - negative numbers***
@@ -45,4 +44,3 @@ float(-1.5)
-- Testing array_product() function with negative floats --
float(-9.9999999E+15)
-===DONE===
diff --git a/ext/standard/tests/array/array_product_variation4.phpt b/ext/standard/tests/array/array_product_variation4.phpt
index c79077c78f..70f70516a7 100644
--- a/ext/standard/tests/array/array_product_variation4.phpt
+++ b/ext/standard/tests/array/array_product_variation4.phpt
@@ -20,10 +20,8 @@ for ($i = 0; $i < 999; $i++) {
var_dump( array_product($array) );
?>
-===DONE===
--EXPECT--
*** Testing array_product() : variations ***
-- Testing array_product() function with a very large array --
float(INF)
-===DONE===
diff --git a/ext/standard/tests/array/array_push.phpt b/ext/standard/tests/array/array_push.phpt
index 52e754f94d..227a520ac1 100644
--- a/ext/standard/tests/array/array_push.phpt
+++ b/ext/standard/tests/array/array_push.phpt
@@ -31,16 +31,7 @@ $mixed_array = array(
);
/* Error Conditions */
-echo "\n*** Testing Error Conditions ***\n";
-
-/* Zero argument */
-var_dump( array_push() );
-
-/* Scalar argument */
-var_dump( array_push($number, 22) );
-
-/* String argument */
-var_dump( array_push($str, 22) );
+echo "\n*** Testing Edge Conditions ***\n";
/* Invalid Number of arguments */
var_dump( array_push($mixed_array[1],1,2) );
@@ -70,16 +61,7 @@ var_dump( $mixed_array[2] );
echo"\nDone";
?>
--EXPECTF--
-*** Testing Error Conditions ***
-
-Warning: array_push() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_push() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_push() expects parameter 1 to be array, string given in %s on line %d
-NULL
+*** Testing Edge Conditions ***
int(11)
int(1)
diff --git a/ext/standard/tests/array/array_push_error2.phpt b/ext/standard/tests/array/array_push_error2.phpt
index 3ab60136be..2d19dbc246 100644
--- a/ext/standard/tests/array/array_push_error2.phpt
+++ b/ext/standard/tests/array/array_push_error2.phpt
@@ -15,17 +15,18 @@ Test array_push() function : error conditions - max int value as key
echo "*** Testing array_push() : error conditions ***\n";
$array = array(PHP_INT_MAX => 'max');
-
-var_dump(array_push($array, 'new'));
+try {
+ var_dump(array_push($array, 'new'));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
var_dump($array);
echo "Done";
?>
--EXPECTF--
*** Testing array_push() : error conditions ***
-
-Warning: array_push(): Cannot add element to the array as the next element is already occupied in %s on line %d
-bool(false)
+Cannot add element to the array as the next element is already occupied
array(1) {
[%d]=>
string(3) "max"
diff --git a/ext/standard/tests/array/array_rand.phpt b/ext/standard/tests/array/array_rand.phpt
index db432dc9b4..5895727548 100644
--- a/ext/standard/tests/array/array_rand.phpt
+++ b/ext/standard/tests/array/array_rand.phpt
@@ -3,39 +3,47 @@ array_rand() tests
--FILE--
<?php
-var_dump(array_rand());
-var_dump(array_rand(array()));
-var_dump(array_rand(array(), 0));
-var_dump(array_rand(0, 0));
-var_dump(array_rand(array(1,2,3), 0));
-var_dump(array_rand(array(1,2,3), -1));
-var_dump(array_rand(array(1,2,3), 10));
-var_dump(array_rand(array(1,2,3), 3));
-var_dump(array_rand(array(1,2,3), 2));
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d
-NULL
+try {
+ var_dump(array_rand(array()));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: array_rand(): Array is empty in %s on line %d
-NULL
+try {
+ var_dump(array_rand(array(), 0));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: array_rand(): Array is empty in %s on line %d
-NULL
+try {
+ var_dump(array_rand(array(1,2,3), 0));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d
-NULL
+try {
+ var_dump(array_rand(array(1,2,3), -1));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
+try {
+ var_dump(array_rand(array(1,2,3), 10));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
+var_dump(array_rand(array(1,2,3), 3));
+var_dump(array_rand(array(1,2,3), 2));
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
+echo "Done\n";
+?>
+--EXPECTF--
+Array is empty
+Array is empty
+Second argument has to be between 1 and the number of elements in the array
+Second argument has to be between 1 and the number of elements in the array
+Second argument has to be between 1 and the number of elements in the array
array(3) {
[0]=>
int(%d)
diff --git a/ext/standard/tests/array/array_rand_variation5.phpt b/ext/standard/tests/array/array_rand_variation5.phpt
index 30eb7d7801..03e20d6e07 100644
--- a/ext/standard/tests/array/array_rand_variation5.phpt
+++ b/ext/standard/tests/array/array_rand_variation5.phpt
@@ -32,17 +32,36 @@ var_dump( array_rand($input, 1) ); // with valid $num_req value
// with invalid num_req value
echo"\n-- With num_req = 0 --\n";
-var_dump( array_rand($input, 0) ); // with $num_req=0
+try {
+ var_dump( array_rand($input, 0) ); // with $num_req=0
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
echo"\n-- With num_req = -1 --\n";
-var_dump( array_rand($input, -1) ); // with $num_req=-1
+try {
+ var_dump( array_rand($input, -1) ); // with $num_req=-1
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
echo"\n-- With num_req = -2 --\n";
-var_dump( array_rand($input, -2) ); // with $num_req=-2
-echo"\n-- With num_req more than number of members in 'input' array --\n";
-var_dump( array_rand($input, 13) ); // with $num_req=13
+try {
+ var_dump( array_rand($input, -2) ); // with $num_req=-2
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+echo"\n-- With num_req more than number of members in 'input' array --\n";
+try {
+ var_dump( array_rand($input, 13) ); // with $num_req=13
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-echo "Done";
?>
+
+DONE
--EXPECTF--
*** Testing array_rand() : with invalid values for 'req_num' ***
@@ -53,22 +72,15 @@ int(%d)
int(%d)
-- With num_req = 0 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
+Second argument has to be between 1 and the number of elements in the array
-- With num_req = -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
+Second argument has to be between 1 and the number of elements in the array
-- With num_req = -2 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
+Second argument has to be between 1 and the number of elements in the array
-- With num_req more than number of members in 'input' array --
+Second argument has to be between 1 and the number of elements in the array
-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
+DONE
diff --git a/ext/standard/tests/array/array_reduce_variation1.phpt b/ext/standard/tests/array/array_reduce_variation1.phpt
index 618a22282a..34c2856bac 100644
--- a/ext/standard/tests/array/array_reduce_variation1.phpt
+++ b/ext/standard/tests/array/array_reduce_variation1.phpt
@@ -32,7 +32,6 @@ try {
}
?>
-===DONE===
--EXPECT--
*** Testing array_reduce() : variation ***
@@ -41,4 +40,3 @@ int(2)
--- Testing with a callback with too many parameters ---
Exception: Too few arguments to function threeArgs(), 2 passed and exactly 3 expected
-===DONE===
diff --git a/ext/standard/tests/array/array_reduce_variation3.phpt b/ext/standard/tests/array/array_reduce_variation3.phpt
index 01bd6d79d6..f43b8eb589 100644
--- a/ext/standard/tests/array/array_reduce_variation3.phpt
+++ b/ext/standard/tests/array/array_reduce_variation3.phpt
@@ -24,7 +24,6 @@ echo "\n--- Instance method callback ---\n";
var_dump(array_reduce($array, array(new A(), "adder2")));
?>
-===DONE===
--EXPECT--
*** Testing array_reduce() : variation - object callbacks ***
@@ -33,4 +32,3 @@ int(1)
--- Instance method callback ---
int(1)
-===DONE===
diff --git a/ext/standard/tests/array/array_replace.phpt b/ext/standard/tests/array/array_replace.phpt
index 6ba9e43fd7..48b616ab04 100644
--- a/ext/standard/tests/array/array_replace.phpt
+++ b/ext/standard/tests/array/array_replace.phpt
@@ -42,11 +42,15 @@ $data = array_replace_recursive($array1, $array2);
var_dump($data);
echo " -- Testing array_replace_recursive() w/ endless recusrsion --\n";
-$data = array_replace_recursive($array3, $array4);
+try {
+ $data = array_replace_recursive($array3, $array4);
+ var_dump($data);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-var_dump($data);
?>
---EXPECTF--
+--EXPECT--
-- Testing array_replace() --
array(5) {
[0]=>
@@ -107,16 +111,4 @@ array(5) {
}
}
-- Testing array_replace_recursive() w/ endless recusrsion --
-
-Warning: array_replace_recursive(): recursion detected in %s on line %d
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- array(1) {
- [0]=>
- array(0) {
- }
- }
- }
-}
+Recursion detected
diff --git a/ext/standard/tests/array/array_reverse_variation4.phpt b/ext/standard/tests/array/array_reverse_variation4.phpt
index 09b2eb4bee..21cced1703 100644
--- a/ext/standard/tests/array/array_reverse_variation4.phpt
+++ b/ext/standard/tests/array/array_reverse_variation4.phpt
@@ -54,10 +54,10 @@ $arrays = array (
array("hello", $heredoc => "string"), // heredoc
// array with object, unset variable and resource variable
- array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'),
+ array(@$unset_var => "hello", $fp => 'resource'),
// array with mixed values
-/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2, $fp => 'resource', 133 => "int", 444.432 => "float", @$unset_var => "unset", $heredoc => "heredoc")
+/*11*/ array('hello' => 1, "fruit" => 2.2, $fp => 'resource', 133 => "int", 444.432 => "float", @$unset_var => "unset", $heredoc => "heredoc")
);
// loop through the various elements of $arrays to test array_reverse()
@@ -83,13 +83,9 @@ echo "Done";
--EXPECTF--
*** Testing array_reverse() : usage variations ***
-Warning: Illegal offset type in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-- Iteration 1 --
- default argument -
array(0) {
diff --git a/ext/standard/tests/array/array_search1.phpt b/ext/standard/tests/array/array_search1.phpt
index 49563f9712..10c1672e54 100644
--- a/ext/standard/tests/array/array_search1.phpt
+++ b/ext/standard/tests/array/array_search1.phpt
@@ -5,8 +5,6 @@ array_search() tests
$a = array(1=>0, 2=>1, 4=>3, "a"=>"b", "c"=>"d");
-var_dump(array_search(1));
-var_dump(array_search(1,1));
var_dump(array_search("a",$a));
var_dump(array_search("0",$a, true));
var_dump(array_search("0",$a));
@@ -18,12 +16,7 @@ var_dump(array_search(-1,$a, true));
echo "Done\n";
?>
---EXPECTF--
-Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, int given in %s on line %d
-NULL
+--EXPECT--
int(1)
bool(false)
int(1)
diff --git a/ext/standard/tests/array/array_search_variation3.phpt b/ext/standard/tests/array/array_search_variation3.phpt
index 41b0b5bb20..596c36f805 100644
--- a/ext/standard/tests/array/array_search_variation3.phpt
+++ b/ext/standard/tests/array/array_search_variation3.phpt
@@ -33,9 +33,17 @@ class array_search_check {
$array_search_obj = new array_search_check(); //creating new object
//error: as wrong datatype for second argument
-var_dump( array_search("array_var", $array_search_obj) );
+try {
+ var_dump( array_search("array_var", $array_search_obj) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//error: as wrong datatype for second argument
-var_dump( array_search("foo", $array_search_obj) );
+try {
+ var_dump( array_search("foo", $array_search_obj) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//element found as "one" exists in array $array_var
var_dump( array_search("one", $array_search_obj->array_var) );
@@ -48,11 +56,7 @@ string(5) "three"
int(5)
*** Testing objects with array_search() ***
-
-Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
-NULL
+array_search() expects parameter 2 to be array, object given
+array_search() expects parameter 2 to be array, object given
int(1)
Done
diff --git a/ext/standard/tests/array/array_slice.phpt b/ext/standard/tests/array/array_slice.phpt
index 59d804350b..d19f5195d6 100644
--- a/ext/standard/tests/array/array_slice.phpt
+++ b/ext/standard/tests/array/array_slice.phpt
@@ -20,26 +20,6 @@ $var_array = array(
$num = 4;
$str = "john";
-/* Zero args */
-echo"\n*** Output for Zero Argument ***\n";
-array_slice();
-
-/* Single args */
-echo"\n*** Output for Single array Argument ***\n";
-array_slice($var_array);
-
-/* More than valid no. of args (ie. >4 ) */
-echo"\n*** Output for invalid number of Arguments ***\n";
-array_slice($var_array, 2, 4, true, 3);
-
-/* Scalar arg */
-echo"\n*** Output for scalar Argument ***\n";
-array_slice($num, 2);
-
-/* String arg */
-echo"\n*** Output for string Argument ***\n";
-array_slice($str, 2);
-
$counter = 1;
foreach ($var_array as $sub_array)
{
@@ -89,26 +69,6 @@ foreach ($var_array as $sub_array)
?>
--EXPECTF--
-*** Output for Zero Argument ***
-
-Warning: array_slice() expects at least 2 parameters, 0 given in %s on line %d
-
-*** Output for Single array Argument ***
-
-Warning: array_slice() expects at least 2 parameters, 1 given in %s on line %d
-
-*** Output for invalid number of Arguments ***
-
-Warning: array_slice() expects at most 4 parameters, 5 given in %s on line %d
-
-*** Output for scalar Argument ***
-
-Warning: array_slice() expects parameter 1 to be array, int given in %s on line %d
-
-*** Output for string Argument ***
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-
*** Iteration 1 ***
*** Variation with first two Arguments ***
diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt
index 7b6d712a1f..46f33b9503 100644
--- a/ext/standard/tests/array/array_slice_variation1.phpt
+++ b/ext/standard/tests/array/array_slice_variation1.phpt
@@ -15,12 +15,20 @@ var_dump(array_slice(range(1, 3), -1, NULL, 1));
$a = 'foo';
-var_dump(array_slice(range(1, 3), 0, $a));
-var_dump(array_slice(range(1, 3), 0, $a));
+try {
+ var_dump(array_slice(range(1, 3), 0, $a));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump(array_slice(range(1, 3), 0, $a));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump($a);
?>
---EXPECT--
+--EXPECTF--
array(3) {
[0]=>
int(1)
@@ -53,8 +61,6 @@ array(1) {
[2]=>
int(3)
}
-array(0) {
-}
-array(0) {
-}
+array_slice() expects parameter 3 to be int, string given
+array_slice() expects parameter 3 to be int, string given
string(3) "foo"
diff --git a/ext/standard/tests/array/array_slice_variation11.phpt b/ext/standard/tests/array/array_slice_variation11.phpt
new file mode 100644
index 0000000000..aaffcd4251
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation11.phpt
@@ -0,0 +1,105 @@
+--TEST--
+Test array_slice() function : usage variations - array has holes in buckets
+--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
+ */
+
+/*
+ * Check that results of array_slice are correct when there are holes in buckets caused by unset()
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+function dump_slice(array $input, $offsetToUnset, int $offset, int $length) {
+ unset($input[$offsetToUnset]);
+ var_dump(array_slice($input, $offset, $length));
+}
+
+echo "\n-- Call array_slice() on array with string keys--\n";
+$input = ['one' => 'un', 'two' => 'deux', 23 => 'twenty-three', 'zero'];
+dump_slice($input, 'two', 0, 1);
+dump_slice($input, 'two', 0, 2);
+dump_slice($input, 'two', 0, 3);
+dump_slice($input, 23, 1, 2);
+
+echo "\n-- Call array_slice() on array with packed keys--\n";
+$input = [10, 11, 12, 'thirteen'];
+dump_slice($input, 0, 0, 1);
+dump_slice($input, 1, 0, 1);
+dump_slice($input, 1, 0, 3);
+dump_slice($input, 1, -1, 1);
+dump_slice($input, 1, 0, 3);
+dump_slice($input, 1, -3, 3);
+
+echo "Done";
+?>
+--EXPECT--
+*** Testing array_slice() : usage variations ***
+
+-- Call array_slice() on array with string keys--
+array(1) {
+ ["one"]=>
+ string(2) "un"
+}
+array(2) {
+ ["one"]=>
+ string(2) "un"
+ [0]=>
+ string(12) "twenty-three"
+}
+array(3) {
+ ["one"]=>
+ string(2) "un"
+ [0]=>
+ string(12) "twenty-three"
+ [1]=>
+ string(4) "zero"
+}
+array(2) {
+ ["two"]=>
+ string(4) "deux"
+ [0]=>
+ string(4) "zero"
+}
+
+-- Call array_slice() on array with packed keys--
+array(1) {
+ [0]=>
+ int(11)
+}
+array(1) {
+ [0]=>
+ int(10)
+}
+array(3) {
+ [0]=>
+ int(10)
+ [1]=>
+ int(12)
+ [2]=>
+ string(8) "thirteen"
+}
+array(1) {
+ [0]=>
+ string(8) "thirteen"
+}
+array(3) {
+ [0]=>
+ int(10)
+ [1]=>
+ int(12)
+ [2]=>
+ string(8) "thirteen"
+}
+array(3) {
+ [0]=>
+ int(10)
+ [1]=>
+ int(12)
+ [2]=>
+ string(8) "thirteen"
+}
+Done
diff --git a/ext/standard/tests/array/array_slice_variation2.phpt b/ext/standard/tests/array/array_slice_variation2.phpt
deleted file mode 100644
index a76d68e6e0..0000000000
--- a/ext/standard/tests/array/array_slice_variation2.phpt
+++ /dev/null
@@ -1,303 +0,0 @@
---TEST--
-Test array_slice() function : usage variations - Pass different data types as $offset arg
---SKIPIF--
-<?php if (PHP_INT_SIZE > 4) die("skip this test is for 32bit platform only"); ?>
---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 $offset 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, 'three' => 3, 4);
-
-//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 $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,
-
- // empty data
-/*16*/ "",
- '',
- array(),
-
- // string data
-/*19*/ "string",
- 'string',
- $heredoc,
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$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, $input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Iteration 1 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 2 --
-array(3) {
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 3 --
-array(0) {
-}
-
--- Iteration 4 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 5 --
-array(0) {
-}
-
--- Iteration 6 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 7 --
-
-Warning: array_slice() expects parameter 2 to be int, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 9 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 10 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 11 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 12 --
-array(3) {
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 13 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 14 --
-array(3) {
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 15 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 16 --
-
-Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_slice() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 23 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-Done
diff --git a/ext/standard/tests/array/array_splice_basic.phpt b/ext/standard/tests/array/array_splice_basic.phpt
index 9a96ccb362..cf6fcd1db2 100644
--- a/ext/standard/tests/array/array_splice_basic.phpt
+++ b/ext/standard/tests/array/array_splice_basic.phpt
@@ -14,6 +14,12 @@ var_dump (array_splice($input, 2));
var_dump ($input);
// $input is now array("red", "green")
+echo "test truncation with null length \n";
+$input = array("red", "green", "blue", "yellow");
+var_dump (array_splice($input, 2, null));
+var_dump ($input);
+// $input is now array("red", "green")
+
echo "test removing entries from the middle \n";
$input = array("red", "green", "blue", "yellow");
var_dump (array_splice($input, 1, -1));
@@ -56,6 +62,19 @@ array(2) {
[1]=>
string(5) "green"
}
+test truncation with null length
+array(2) {
+ [0]=>
+ string(4) "blue"
+ [1]=>
+ string(6) "yellow"
+}
+array(2) {
+ [0]=>
+ string(3) "red"
+ [1]=>
+ string(5) "green"
+}
test removing entries from the middle
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_udiff_assoc_variation.phpt b/ext/standard/tests/array/array_udiff_assoc_variation.phpt
index eca26a30e6..b71449b259 100644
--- a/ext/standard/tests/array/array_udiff_assoc_variation.phpt
+++ b/ext/standard/tests/array/array_udiff_assoc_variation.phpt
@@ -24,7 +24,6 @@ var_dump( array_udiff_assoc($arr1, $arr2, $arr3, $arr4, $key_compare_function) )
?>
-===DONE===
--EXPECT--
*** Testing array_udiff_assoc() : variation - testing with multiple array arguments ***
array(2) {
@@ -33,4 +32,3 @@ array(2) {
["0.5"]=>
int(5)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt
index 2cbc9572d2..cc9e035f70 100644
--- a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt
+++ b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff_assoc($value, $arr2, $key_comp_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_udiff_assoc($value, $arr2, $key_comp_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_udiff_assoc() : usage variation ***
--int 0--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, object given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, object given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_udiff_assoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_assoc_variation1.php on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, null given
diff --git a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt
index 1a2c1ed978..4ded746508 100644
--- a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt
+++ b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff_assoc($arr1, $value, $key_comp_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_udiff_assoc($arr1, $value, $key_comp_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_udiff_assoc() : usage variation ***
--int 0--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, object given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, object given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_udiff_assoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_assoc_variation2.php on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, null given
diff --git a/ext/standard/tests/array/array_udiff_assoc_variation4.phpt b/ext/standard/tests/array/array_udiff_assoc_variation4.phpt
deleted file mode 100644
index 20a5afa202..0000000000
--- a/ext/standard/tests/array/array_udiff_assoc_variation4.phpt
+++ /dev/null
@@ -1,228 +0,0 @@
---TEST--
-Test array_udiff_assoc() function : usage variation
---FILE--
-<?php
-/* Prototype : array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)
- * Description: Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function.
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_udiff_assoc() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$arr1 = array(1, 2);
-$arr2 = array(1, 2);
-
-include('compare_function.inc');
-$key_comp_func = 'compare_function';
-
-//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 ...
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff_assoc($arr1, $arr2, $value, $key_comp_func) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_udiff_assoc() : usage variation ***
-
---int 0--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---int 1--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---float .5--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, object given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, object given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-
---unset var--
-
-Warning: array_udiff_assoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_assoc_variation4.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_udiff_assoc_variation5.phpt b/ext/standard/tests/array/array_udiff_assoc_variation5.phpt
index 10afe341a3..a48bda09b0 100644
--- a/ext/standard/tests/array/array_udiff_assoc_variation5.phpt
+++ b/ext/standard/tests/array/array_udiff_assoc_variation5.phpt
@@ -37,7 +37,6 @@ function too_few_parameters ($val1) {
var_dump(array_udiff_assoc($arr1, $arr2, 'too_few_parameters'));
?>
-===DONE===
--EXPECT--
*** Testing array_udiff_assoc() : usage variation - differing comparison functions***
@@ -55,4 +54,3 @@ array(1) {
[0]=>
int(1)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt
index 4496194b62..dcfe07083f 100644
--- a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt
+++ b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt
@@ -92,137 +92,89 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff_uassoc($value, $arr2, $data_comp_func, $key_comp_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_udiff_uassoc($value, $arr2, $data_comp_func, $key_comp_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_udiff_uassoc() : usage variation ***
--int 0--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, int given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, float given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, string given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, object given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, object given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_udiff_uassoc(): Expected parameter 1 to be an array, null given in %sarray_udiff_uassoc_variation1.php on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, null given
diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt
index 2324c5a47b..e15076db5f 100644
--- a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt
+++ b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt
@@ -92,137 +92,89 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff_uassoc($arr1, $value, $data_comp_func, $key_comp_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_udiff_uassoc($arr1, $value, $data_comp_func, $key_comp_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_udiff_uassoc() : usage variation ***
--int 0--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, int given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, float given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, string given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, object given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, object given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_udiff_uassoc(): Expected parameter 2 to be an array, null given in %sarray_udiff_uassoc_variation2.php on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, null given
diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation5.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation5.phpt
deleted file mode 100644
index 820f0466ad..0000000000
--- a/ext/standard/tests/array/array_udiff_uassoc_variation5.phpt
+++ /dev/null
@@ -1,229 +0,0 @@
---TEST--
-Test array_udiff_uassoc() function : usage variation
---FILE--
-<?php
-/* Prototype : array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)
- * Description: Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions.
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_udiff_uassoc() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$arr1 = array(1, 2);
-$arr2 = array(1, 2);
-
-include('compare_function.inc');
-$data_comp_func = 'compare_function';
-$key_comp_func = 'compare_function';
-
-//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 ...
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff_uassoc($arr1, $arr2, $value, $data_comp_func, $key_comp_func) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_udiff_uassoc() : usage variation ***
-
---int 0--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---int 1--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, int given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---float .5--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, float given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, string given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, object given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, object given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-
---unset var--
-
-Warning: array_udiff_uassoc(): Expected parameter 3 to be an array, null given in %sarray_udiff_uassoc_variation5.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation6.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation6.phpt
index 4939b8eba5..e6f256d79a 100644
--- a/ext/standard/tests/array/array_udiff_uassoc_variation6.phpt
+++ b/ext/standard/tests/array/array_udiff_uassoc_variation6.phpt
@@ -36,7 +36,6 @@ function too_few_parameters ($val1) {
var_dump(array_udiff_uassoc($arr1, $arr2, 'too_few_parameters', 'too_few_parameters'));
?>
-===DONE===
--EXPECT--
*** Testing array_udiff_uassoc() : usage variation - differing comparison functions***
@@ -54,4 +53,3 @@ array(1) {
[0]=>
int(1)
}
-===DONE===
diff --git a/ext/standard/tests/array/array_udiff_variation1.phpt b/ext/standard/tests/array/array_udiff_variation1.phpt
index 5eb84146a1..a90e3b0e67 100644
--- a/ext/standard/tests/array/array_udiff_variation1.phpt
+++ b/ext/standard/tests/array/array_udiff_variation1.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff($value, $arr2, $data_comp_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_udiff($value, $arr2, $data_comp_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_udiff() : usage variation ***
--int 0--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, int given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, int given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, int given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, int given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, float given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, float given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, float given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, float given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, float given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, null given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, null given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, bool given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, bool given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, bool given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, bool given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, string given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, string given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, string given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, string given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, string given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, string given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, object given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, object given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, null given in %sarray_udiff_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_udiff(): Expected parameter 1 to be an array, null given in %sarray_udiff_variation1.php on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, null given
diff --git a/ext/standard/tests/array/array_udiff_variation2.phpt b/ext/standard/tests/array/array_udiff_variation2.phpt
index 61aa1f0c9a..5c37a3a20a 100644
--- a/ext/standard/tests/array/array_udiff_variation2.phpt
+++ b/ext/standard/tests/array/array_udiff_variation2.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff($arr1, $value, $data_comp_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_udiff($arr1, $value, $data_comp_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_udiff() : usage variation ***
--int 0--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, int given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, int given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, int given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, int given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, float given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, float given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, float given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, float given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, float given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, null given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, null given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, bool given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, bool given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, bool given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, bool given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, string given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, string given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, string given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, string given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, string given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, string given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, object given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, object given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, null given in %sarray_udiff_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_udiff(): Expected parameter 2 to be an array, null given in %sarray_udiff_variation2.php on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, null given
diff --git a/ext/standard/tests/array/array_udiff_variation4.phpt b/ext/standard/tests/array/array_udiff_variation4.phpt
deleted file mode 100644
index a92c5ddfdf..0000000000
--- a/ext/standard/tests/array/array_udiff_variation4.phpt
+++ /dev/null
@@ -1,228 +0,0 @@
---TEST--
-Test array_udiff() function : usage variation
---FILE--
-<?php
-/* Prototype : array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)
- * Description: Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function.
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_udiff() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$arr1 = array(1, 2);
-$arr2 = array(1, 2);
-
-include('compare_function.inc');
-$data_comp_func = 'compare_function';
-
-//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 ...
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_udiff($arr1, $arr2, $value, $data_comp_func) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_udiff() : usage variation ***
-
---int 0--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, int given in %sarray_udiff_variation4.php on line %d
-NULL
-
---int 1--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, int given in %sarray_udiff_variation4.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, int given in %sarray_udiff_variation4.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, int given in %sarray_udiff_variation4.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, float given in %sarray_udiff_variation4.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, float given in %sarray_udiff_variation4.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, float given in %sarray_udiff_variation4.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, float given in %sarray_udiff_variation4.php on line %d
-NULL
-
---float .5--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, float given in %sarray_udiff_variation4.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, null given in %sarray_udiff_variation4.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, null given in %sarray_udiff_variation4.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, bool given in %sarray_udiff_variation4.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, bool given in %sarray_udiff_variation4.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, bool given in %sarray_udiff_variation4.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, bool given in %sarray_udiff_variation4.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, string given in %sarray_udiff_variation4.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, string given in %sarray_udiff_variation4.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, string given in %sarray_udiff_variation4.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, string given in %sarray_udiff_variation4.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, string given in %sarray_udiff_variation4.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, string given in %sarray_udiff_variation4.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, object given in %sarray_udiff_variation4.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, object given in %sarray_udiff_variation4.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, null given in %sarray_udiff_variation4.php on line %d
-NULL
-
---unset var--
-
-Warning: array_udiff(): Expected parameter 3 to be an array, null given in %sarray_udiff_variation4.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_udiff_variation5.phpt b/ext/standard/tests/array/array_udiff_variation5.phpt
index 967817bac3..1ca7977999 100644
--- a/ext/standard/tests/array/array_udiff_variation5.phpt
+++ b/ext/standard/tests/array/array_udiff_variation5.phpt
@@ -37,7 +37,6 @@ function too_few_parameters ($val1) {
var_dump(array_udiff($arr1, $arr2, 'too_few_parameters'));
?>
-===DONE===
--EXPECT--
*** Testing array_udiff() : usage variation ***
@@ -53,4 +52,3 @@ Exception: Too few arguments to function too_many_parameters(), 2 passed and exa
-- comparison function taking too few parameters --
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_assoc_basic2.phpt b/ext/standard/tests/array/array_uintersect_assoc_basic2.phpt
index b9837e7954..c2655cdb5b 100644
--- a/ext/standard/tests/array/array_uintersect_assoc_basic2.phpt
+++ b/ext/standard/tests/array/array_uintersect_assoc_basic2.phpt
@@ -24,7 +24,6 @@ var_dump( array_uintersect_assoc($arr1, $arr2, $arr3, $arr4, $data_compare_funct
?>
-===DONE===
--EXPECT--
*** Testing array_uintersect_assoc() : basic functionality - testing with multiple array arguments ***
array(2) {
@@ -33,4 +32,3 @@ array(2) {
[3]=>
string(5) "three"
}
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt
index a2babcdb02..c99a9947c5 100644
--- a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt
+++ b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect_assoc($value, $arr2, $data_compare_function) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_uintersect_assoc($value, $arr2, $data_compare_function) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_uintersect_assoc() : usage variation ***
--int 0--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, object given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, object given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_uintersect_assoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_assoc_variation1.php on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, null given
diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt
index 8723157506..00a50f3c2f 100644
--- a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt
+++ b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect_assoc($arr1, $value, $data_compare_function) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_uintersect_assoc($arr1, $value, $data_compare_function) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_uintersect_assoc() : usage variation ***
--int 0--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, object given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, object given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_uintersect_assoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_assoc_variation2.php on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, null given
diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation4.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation4.phpt
deleted file mode 100644
index 3024246a3d..0000000000
--- a/ext/standard/tests/array/array_uintersect_assoc_variation4.phpt
+++ /dev/null
@@ -1,228 +0,0 @@
---TEST--
-Test array_uintersect_assoc() function : usage variation
---FILE--
-<?php
-/* Prototype : array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)
- * Description: U
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_uintersect_assoc() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$arr1 = array(1, 2);
-$arr2 = array(1, 2);
-
-include('compare_function.inc');
-$data_compare_function = 'compare_function';
-
-//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 ...
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect_assoc($arr1, $arr2, $value, $data_compare_function ) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_uintersect_assoc() : usage variation ***
-
---int 0--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---int 1--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---float .5--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, object given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, object given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-
---unset var--
-
-Warning: array_uintersect_assoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_assoc_variation4.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation5.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation5.phpt
index 34b10af344..3b6befcc5e 100644
--- a/ext/standard/tests/array/array_uintersect_assoc_variation5.phpt
+++ b/ext/standard/tests/array/array_uintersect_assoc_variation5.phpt
@@ -37,7 +37,6 @@ var_dump(array_uintersect_assoc($arr1, $arr2, 'too_few_parameters'));
?>
-===DONE===
--EXPECT--
*** Testing array_uintersect_assoc() : usage variation - differing comparison functions***
@@ -52,4 +51,3 @@ Exception: Too few arguments to function too_many_parameters(), 2 passed and exa
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt
index 84d4e634cf..4889025872 100644
--- a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt
+++ b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt
@@ -92,137 +92,89 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect_uassoc($value, $arr2, $data_compare_func, $key_compare_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_uintersect_uassoc($value, $arr2, $data_compare_func, $key_compare_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_uintersect_uassoc() : usage variation ***
--int 0--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, int given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, float given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, string given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, object given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, object given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_uintersect_uassoc(): Expected parameter 1 to be an array, null given in %sarray_uintersect_uassoc_variation1.php on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, null given
diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt
index 8692026fc4..a1d897d86e 100644
--- a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt
+++ b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt
@@ -92,137 +92,89 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect_uassoc($arr1, $value, $data_compare_func, $key_compare_func) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_uintersect_uassoc($arr1, $value, $data_compare_func, $key_compare_func) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_uintersect_uassoc() : usage variation ***
--int 0--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, int given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, float given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, string given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, object given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, object given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_uintersect_uassoc(): Expected parameter 2 to be an array, null given in %sarray_uintersect_uassoc_variation2.php on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, null given
diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation5.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation5.phpt
deleted file mode 100644
index d1db008416..0000000000
--- a/ext/standard/tests/array/array_uintersect_uassoc_variation5.phpt
+++ /dev/null
@@ -1,229 +0,0 @@
---TEST--
-Test array_uintersect_uassoc() function : usage variation
---FILE--
-<?php
-/* Prototype : array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)
- * Description: Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks.
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_uintersect_uassoc() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$arr1 = array(1, 2);
-$arr2 = array(1, 2);
-
-include('compare_function.inc');
-$data_compare_func = 'compare_function';
-$key_compare_func = 'compare_function';
-
-//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 ...
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect_uassoc($arr1, $arr2, $value, $data_compare_func, $key_compare_func) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_uintersect_uassoc() : usage variation ***
-
---int 0--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---int 1--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, int given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---float .5--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, float given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, string given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, object given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, object given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-
---unset var--
-
-Warning: array_uintersect_uassoc(): Expected parameter 3 to be an array, null given in %sarray_uintersect_uassoc_variation5.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation6.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation6.phpt
index 6abeac09b7..5553adffb5 100644
--- a/ext/standard/tests/array/array_uintersect_uassoc_variation6.phpt
+++ b/ext/standard/tests/array/array_uintersect_uassoc_variation6.phpt
@@ -36,7 +36,6 @@ function too_few_parameters ($val1) {
var_dump(array_uintersect_uassoc($arr1, $arr2, 'too_few_parameters', 'too_few_parameters'));
?>
-===DONE===
--EXPECT--
*** Testing array_uintersect_uassoc() : usage variation - incorrect callbacks ***
@@ -50,4 +49,3 @@ Exception: Too few arguments to function too_many_parameters(), 2 passed and exa
-- comparison function taking too few parameters --
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_variation1.phpt b/ext/standard/tests/array/array_uintersect_variation1.phpt
index c88177018b..47534f70bc 100644
--- a/ext/standard/tests/array/array_uintersect_variation1.phpt
+++ b/ext/standard/tests/array/array_uintersect_variation1.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect($value, $arr2, $data_compare_function) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_uintersect($value, $arr2, $data_compare_function) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_uintersect() : usage variation ***
--int 0--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, int given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 1--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, int given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int 12345--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, int given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--int -12345--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, int given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, int given
--float 10.5--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, float given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -10.5--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, float given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, float given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, float given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--float .5--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, float given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, float given
--uppercase NULL--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, null given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase null--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, null given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--lowercase true--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--lowercase false--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, bool given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, bool given
--empty string DQ--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, string given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--empty string SQ--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, string given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string DQ--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, string given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--string SQ--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, string given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--mixed case string--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, string given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--heredoc--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, string given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, string given
--instance of classWithToString--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, object given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, object given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, object given
--undefined var--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, null given in %sarray_uintersect_variation1.php on line %d
-NULL
+Expected parameter 1 to be an array, null given
--unset var--
-
-Warning: array_uintersect(): Expected parameter 1 to be an array, null given in %sarray_uintersect_variation1.php on line %d
-NULL
-===DONE===
+Expected parameter 1 to be an array, null given
diff --git a/ext/standard/tests/array/array_uintersect_variation2.phpt b/ext/standard/tests/array/array_uintersect_variation2.phpt
index ee52e21c72..d79cf66c21 100644
--- a/ext/standard/tests/array/array_uintersect_variation2.phpt
+++ b/ext/standard/tests/array/array_uintersect_variation2.phpt
@@ -91,137 +91,89 @@ $inputs = array(
// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect($arr1, $value, $data_compare_function) );
+ echo "\n--$key--\n";
+ try {
+ var_dump( array_uintersect($arr1, $value, $data_compare_function) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing array_uintersect() : usage variation ***
--int 0--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, int given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 1--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, int given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int 12345--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, int given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--int -12345--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, int given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, int given
--float 10.5--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, float given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -10.5--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, float given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float 12.3456789000e10--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, float given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float -12.3456789000e10--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, float given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--float .5--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, float given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, float given
--uppercase NULL--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, null given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase null--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, null given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--lowercase true--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--lowercase false--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase TRUE--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--uppercase FALSE--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, bool given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, bool given
--empty string DQ--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, string given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--empty string SQ--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, string given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string DQ--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, string given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--string SQ--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, string given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--mixed case string--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, string given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--heredoc--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, string given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, string given
--instance of classWithToString--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, object given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--instance of classWithoutToString--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, object given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, object given
--undefined var--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, null given in %sarray_uintersect_variation2.php on line %d
-NULL
+Expected parameter 2 to be an array, null given
--unset var--
-
-Warning: array_uintersect(): Expected parameter 2 to be an array, null given in %sarray_uintersect_variation2.php on line %d
-NULL
-===DONE===
+Expected parameter 2 to be an array, null given
diff --git a/ext/standard/tests/array/array_uintersect_variation4.phpt b/ext/standard/tests/array/array_uintersect_variation4.phpt
deleted file mode 100644
index abc33e591b..0000000000
--- a/ext/standard/tests/array/array_uintersect_variation4.phpt
+++ /dev/null
@@ -1,228 +0,0 @@
---TEST--
-Test array_uintersect() function : usage variation
---FILE--
-<?php
-/* Prototype : array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)
- * Description: Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback.
- * Source code: ext/standard/array.c
- * Alias to functions:
- */
-
-echo "*** Testing array_uintersect() : usage variation ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$arr1 = array(1, 2);
-$arr2 = array(1, 2);
-
-include('compare_function.inc');
-$data_compare_function = 'compare_function';
-
-//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 ...
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( array_uintersect($arr1, $arr2, $value, $data_compare_function) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing array_uintersect() : usage variation ***
-
---int 0--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, int given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---int 1--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, int given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---int 12345--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, int given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---int -12345--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, int given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---float 10.5--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, float given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---float -10.5--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, float given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---float 12.3456789000e10--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, float given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---float -12.3456789000e10--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, float given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---float .5--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, float given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---uppercase NULL--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, null given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---lowercase null--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, null given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---lowercase true--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---lowercase false--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---uppercase TRUE--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---uppercase FALSE--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, bool given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---empty string DQ--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, string given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---empty string SQ--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, string given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---string DQ--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, string given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---string SQ--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, string given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---mixed case string--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, string given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---heredoc--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, string given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---instance of classWithToString--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, object given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---instance of classWithoutToString--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, object given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---undefined var--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, null given in %sarray_uintersect_variation4.php on line %d
-NULL
-
---unset var--
-
-Warning: array_uintersect(): Expected parameter 3 to be an array, null given in %sarray_uintersect_variation4.php on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/array_uintersect_variation5.phpt b/ext/standard/tests/array/array_uintersect_variation5.phpt
index 699188290b..1996d386f1 100644
--- a/ext/standard/tests/array/array_uintersect_variation5.phpt
+++ b/ext/standard/tests/array/array_uintersect_variation5.phpt
@@ -37,7 +37,6 @@ var_dump(array_uintersect($arr1, $arr2, 'too_few_parameters'));
?>
-===DONE===
--EXPECT--
*** Testing array_uintersect() : usage variation - differing comparison functions***
@@ -52,4 +51,3 @@ Exception: Too few arguments to function too_many_parameters(), 2 passed and exa
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/array_unique_variation3.phpt b/ext/standard/tests/array/array_unique_variation3.phpt
index 205bc3a576..0227449233 100644
--- a/ext/standard/tests/array/array_unique_variation3.phpt
+++ b/ext/standard/tests/array/array_unique_variation3.phpt
@@ -50,7 +50,7 @@ $inputs = array (
array("hello", $heredoc => "string", "string"),
// array with object, unset variable and resource variable
-/*8*/ array(new classA() => 11, @$unset_var => "hello", $fp => 'resource', 11, "hello"),
+/*8*/ array(@$unset_var => "hello", $fp => 'resource', 11, "hello"),
);
// loop through each sub-array of $inputs to check the behavior of array_unique()
@@ -68,9 +68,7 @@ echo "Done";
--EXPECTF--
*** Testing array_unique() : assoc. array with diff. keys passed to $input argument ***
-Warning: Illegal offset type in %s on line %d
-
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-- Iteration 1 --
array(1) {
[0]=>
diff --git a/ext/standard/tests/array/array_unique_variation8.phpt b/ext/standard/tests/array/array_unique_variation8.phpt
index d8a318dd93..0ac6f91687 100644
--- a/ext/standard/tests/array/array_unique_variation8.phpt
+++ b/ext/standard/tests/array/array_unique_variation8.phpt
@@ -29,13 +29,13 @@ echo "Done";
--EXPECTF--
*** Testing array_unique() : two dimensional array for $input argument ***
-Notice: Array to string conversion in %sarray_unique_variation8.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_unique_variation8.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_unique_variation8.php on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %sarray_unique_variation8.php on line %d
+Warning: Array to string conversion in %s on line %d
array(1) {
[0]=>
array(4) {
diff --git a/ext/standard/tests/array/array_unshift.phpt b/ext/standard/tests/array/array_unshift.phpt
index 9b474277a9..9ebe83391e 100644
--- a/ext/standard/tests/array/array_unshift.phpt
+++ b/ext/standard/tests/array/array_unshift.phpt
@@ -7,8 +7,6 @@ $a = array();
$s = "";
var_dump(array_unshift($a, $s));
var_dump($a);
-var_dump(array_unshift($s, $a));
-var_dump($a);
var_dump(array_unshift($a, $a));
var_dump($a);
@@ -20,13 +18,6 @@ array(1) {
[0]=>
string(0) ""
}
-
-Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-array(1) {
- [0]=>
- string(0) ""
-}
int(2)
array(2) {
[0]=>
diff --git a/ext/standard/tests/array/array_unshift_variation4.phpt b/ext/standard/tests/array/array_unshift_variation4.phpt
index 7f507c98d0..e468bfcf46 100644
--- a/ext/standard/tests/array/array_unshift_variation4.phpt
+++ b/ext/standard/tests/array/array_unshift_variation4.phpt
@@ -63,10 +63,10 @@ $arrays = array (
array("hello", $heredoc => "string"), // heredoc
// array with object, unset variable and resource variable
- array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'),
+ array(@$unset_var => "hello", $fp => 'resource'),
// array with mixed keys
-/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2,
+/*11*/ array('hello' => 1, "fruit" => 2.2,
$fp => 'resource', 133 => "int", 444.432 => "float",
@$unset_var => "unset", $heredoc => "heredoc")
);
@@ -101,13 +101,9 @@ echo "Done";
--EXPECTF--
*** Testing array_unshift() : associative array with different keys ***
-Warning: Illegal offset type in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-- Iteration 1 --
int(1)
array(1) {
diff --git a/ext/standard/tests/array/array_walk.phpt b/ext/standard/tests/array/array_walk.phpt
index 7cd8a8cf7a..cf792bfa19 100644
--- a/ext/standard/tests/array/array_walk.phpt
+++ b/ext/standard/tests/array/array_walk.phpt
@@ -3,12 +3,6 @@ array_walk() tests
--FILE--
<?php
-var_dump(array_walk());
-$var = 1;
-var_dump(array_walk($var,1));
-$var = array();
-var_dump(array_walk($var,""));
-
function foo($v1, $v2, $v3) {
var_dump($v1);
var_dump($v2);
@@ -31,14 +25,6 @@ try {
echo "Done\n";
?>
--EXPECTF--
-Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
int(1)
int(0)
string(4) "data"
diff --git a/ext/standard/tests/array/array_walk_closure.phpt b/ext/standard/tests/array/array_walk_closure.phpt
index 0a5d854582..7ac62d7484 100644
--- a/ext/standard/tests/array/array_walk_closure.phpt
+++ b/ext/standard/tests/array/array_walk_closure.phpt
@@ -3,14 +3,6 @@ array_walk() closure tests
--FILE--
<?php
-var_dump(array_walk());
-
-$ar = false;
-var_dump(array_walk($ar, $ar));
-
-$ar = NULL;
-var_dump(array_walk($ar, $ar));
-
$ar = ["one" => 1, "two"=>2, "three" => 3];
var_dump(array_walk($ar, function(){ var_dump(func_get_args());}));
@@ -94,14 +86,6 @@ try {
echo "Done\n";
?>
--EXPECTF--
-Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
-NULL
array(2) {
[0]=>
int(1)
diff --git a/ext/standard/tests/array/array_walk_error2.phpt b/ext/standard/tests/array/array_walk_error2.phpt
index a4026180fb..73445892a6 100644
--- a/ext/standard/tests/array/array_walk_error2.phpt
+++ b/ext/standard/tests/array/array_walk_error2.phpt
@@ -61,7 +61,5 @@ Exception: Too few arguments to function callback2(), 3 passed and exactly 4 exp
Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
-- Testing array_walk() function with too many callback parameters --
-
-Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
+Exception: array_walk() expects at most 3 parameters, 4 given
Done
diff --git a/ext/standard/tests/array/array_walk_objects.phpt b/ext/standard/tests/array/array_walk_objects.phpt
index fc04304fc5..9f3ac8c1cd 100644
--- a/ext/standard/tests/array/array_walk_objects.phpt
+++ b/ext/standard/tests/array/array_walk_objects.phpt
@@ -24,7 +24,11 @@ array_walk($t, "walk");
$var = array();
array_walk($var, "walk");
$var = "";
-array_walk($var, "walk");
+try {
+ array_walk($var, "walk");
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
@@ -39,6 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro"
string(14) "test_protected"
string(7) "var_pub"
string(11) "test_public"
-
-Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
+array_walk() expects parameter 1 to be array, string given
Done
diff --git a/ext/standard/tests/array/array_walk_rec_objects.phpt b/ext/standard/tests/array/array_walk_rec_objects.phpt
index a83c227a3b..097143e8ec 100644
--- a/ext/standard/tests/array/array_walk_rec_objects.phpt
+++ b/ext/standard/tests/array/array_walk_rec_objects.phpt
@@ -24,7 +24,11 @@ array_walk_recursive($t, "walk");
$var = array();
array_walk_recursive($var, "walk");
$var = "";
-array_walk_recursive($var, "walk");
+try {
+ array_walk_recursive($var, "walk");
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
@@ -39,6 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro"
string(14) "test_protected"
string(7) "var_pub"
string(11) "test_public"
-
-Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d
+array_walk_recursive() expects parameter 1 to be array, string given
Done
diff --git a/ext/standard/tests/array/array_walk_recursive1.phpt b/ext/standard/tests/array/array_walk_recursive1.phpt
index 962f133e4c..f952b4410b 100644
--- a/ext/standard/tests/array/array_walk_recursive1.phpt
+++ b/ext/standard/tests/array/array_walk_recursive1.phpt
@@ -3,12 +3,6 @@ array_walk_recursive() tests
--FILE--
<?php
-var_dump(array_walk_recursive());
-$var = 1;
-var_dump(array_walk_recursive($var,1));
-$var = array();
-var_dump(array_walk_recursive($var,""));
-
function foo($v1, $v2, $v3) {
var_dump($v1);
var_dump($v2);
@@ -31,14 +25,6 @@ try {
echo "Done\n";
?>
--EXPECTF--
-Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
int(1)
int(0)
string(4) "data"
diff --git a/ext/standard/tests/array/array_walk_recursive_error2.phpt b/ext/standard/tests/array/array_walk_recursive_error2.phpt
index b162a1c9dc..e9bd7ea175 100644
--- a/ext/standard/tests/array/array_walk_recursive_error2.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_error2.phpt
@@ -61,7 +61,5 @@ Exception: Too few arguments to function callback2(), 3 passed and exactly 4 exp
Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
-- Testing array_walk_recursive() function with too many callback parameters --
-
-Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
-NULL
+Exception: array_walk_recursive() expects at most 3 parameters, 4 given
Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation7.phpt b/ext/standard/tests/array/array_walk_recursive_variation7.phpt
index 06dc1aaa09..a0c159d71d 100644
--- a/ext/standard/tests/array/array_walk_recursive_variation7.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_variation7.phpt
@@ -29,9 +29,6 @@ var_dump( array_walk_recursive($input, function($value, $key) { var_dump($key);
echo "-- Anonymous function with three arguments --\n";
var_dump( array_walk_recursive($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 10));
-echo "-- Anonymous function with one more argument --\n";
-var_dump( array_walk_recursive($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 20, 30));
-
echo "-- Anonymous function with null argument --\n";
var_dump( array_walk_recursive( $input, function() { echo "1\n"; }));
echo "Done"
@@ -80,10 +77,6 @@ int(0)
int(10)
bool(true)
--- Anonymous function with one more argument --
-
-Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-- Anonymous function with null argument --
1
1
diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
index 2db8067fe0..51eba1e0e0 100644
--- a/ext/standard/tests/array/array_walk_recursive_variation8.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
@@ -25,7 +25,11 @@ echo "-- With 'min' built-in function --\n";
var_dump( array_walk_recursive($input, "min"));
echo "-- With 'echo' language construct --\n";
-var_dump( array_walk_recursive($input, "echo"));
+try {
+ var_dump( array_walk_recursive($input, "echo"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done"
?>
@@ -36,7 +40,5 @@ bool(true)
-- With 'min' built-in function --
bool(true)
-- With 'echo' language construct --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_walk_variation7.phpt b/ext/standard/tests/array/array_walk_variation7.phpt
index 671ad44309..0354782eda 100644
--- a/ext/standard/tests/array/array_walk_variation7.phpt
+++ b/ext/standard/tests/array/array_walk_variation7.phpt
@@ -29,9 +29,6 @@ var_dump( array_walk($input, function($value, $key) { var_dump($key); var_dump($
echo "-- Anonymous function with three arguments --\n";
var_dump( array_walk($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 10));
-echo "-- Anonymous function with one more argument --\n";
-var_dump( array_walk($input, function($value, $key, $user_data) { var_dump($key); var_dump($value); var_dump($user_data); echo "\n"; }, 20, 30));
-
echo "-- Anonymous function with null argument --\n";
var_dump( array_walk( $input, function() { echo "1\n"; }));
echo "Done"
@@ -80,10 +77,6 @@ int(0)
int(10)
bool(true)
--- Anonymous function with one more argument --
-
-Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-- Anonymous function with null argument --
1
1
diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt
index 829baf1add..baa5f3914b 100644
--- a/ext/standard/tests/array/array_walk_variation8.phpt
+++ b/ext/standard/tests/array/array_walk_variation8.phpt
@@ -25,7 +25,11 @@ echo "-- With 'min' built-in function --\n";
var_dump( array_walk($input, "min"));
echo "-- With 'echo' language construct --\n";
-var_dump( array_walk($input, "echo"));
+try {
+ var_dump( array_walk($input, "echo"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done"
?>
@@ -36,7 +40,5 @@ bool(true)
-- With 'min' built-in function --
bool(true)
-- With 'echo' language construct --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
+array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name
Done
diff --git a/ext/standard/tests/array/bug21918.phpt b/ext/standard/tests/array/bug21918.phpt
index 1c9d746fdf..8e440baf8c 100644
--- a/ext/standard/tests/array/bug21918.phpt
+++ b/ext/standard/tests/array/bug21918.phpt
@@ -28,7 +28,6 @@ foreach($c as $k => $v) {
var_dump($v);
}
-echo "==Done==\n";
?>
--EXPECT--
==Mixed==
@@ -52,4 +51,3 @@ string(1) "a"
==Negative==
int(-2)
string(1) "a"
-==Done==
diff --git a/ext/standard/tests/array/bug30074.phpt b/ext/standard/tests/array/bug30074.phpt
index 289e802c00..e0309bac1f 100644
--- a/ext/standard/tests/array/bug30074.phpt
+++ b/ext/standard/tests/array/bug30074.phpt
@@ -2,12 +2,12 @@
Bug #30074 (EG(uninitialized_zval_ptr) gets set to reference using EXTR_REFS, affecting later values)
--FILE--
<?php
-error_reporting(E_ALL & ~E_NOTICE); // We don't want the notice for $undefined
$result = extract(array('a'=>$undefined), EXTR_REFS);
var_dump(array($a));
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
+Warning: Undefined variable: undefined in %s on line %d
array(1) {
[0]=>
NULL
diff --git a/ext/standard/tests/array/bug30266.phpt b/ext/standard/tests/array/bug30266.phpt
index 8f7c3d2135..0a196c0cb8 100644
--- a/ext/standard/tests/array/bug30266.phpt
+++ b/ext/standard/tests/array/bug30266.phpt
@@ -31,7 +31,5 @@ catch(Exception $e)
echo "Caught: " . $e->getMessage() . "\n";
}
?>
-===DONE===
--EXPECT--
Caught: Error
-===DONE===
diff --git a/ext/standard/tests/array/bug31158.phpt b/ext/standard/tests/array/bug31158.phpt
index 62ba1cfaa3..d4f5210760 100644
--- a/ext/standard/tests/array/bug31158.phpt
+++ b/ext/standard/tests/array/bug31158.phpt
@@ -14,7 +14,7 @@ __();
echo "ok\n";
?>
--EXPECTF--
-Notice: Undefined variable: GLOBALS in %sbug31158.php on line 6
+Warning: Undefined variable: GLOBALS in %s on line %d
-Notice: Trying to access array offset on value of type null in %sbug31158.php on line 6
+Warning: Trying to access array offset on value of type null in %s on line %d
ok
diff --git a/ext/standard/tests/array/bug35014.phpt b/ext/standard/tests/array/bug35014.phpt
index f858bf107b..b674590fd6 100644
--- a/ext/standard/tests/array/bug35014.phpt
+++ b/ext/standard/tests/array/bug35014.phpt
@@ -7,7 +7,6 @@ precision=14
--FILE--
<?php
$tests = array(
- 'foo',
array(),
array(0),
array(3),
@@ -22,9 +21,7 @@ foreach ($tests as $v) {
var_dump(array_product($v));
}
?>
---EXPECTF--
-Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
-NULL
+--EXPECT--
int(1)
int(0)
int(3)
diff --git a/ext/standard/tests/array/bug35014_64bit.phpt b/ext/standard/tests/array/bug35014_64bit.phpt
index 5caf48c6ee..3b3d29b5be 100644
--- a/ext/standard/tests/array/bug35014_64bit.phpt
+++ b/ext/standard/tests/array/bug35014_64bit.phpt
@@ -7,7 +7,6 @@ precision=14
--FILE--
<?php
$tests = array(
- 'foo',
array(),
array(0),
array(3),
@@ -22,9 +21,7 @@ foreach ($tests as $v) {
var_dump(array_product($v));
}
?>
---EXPECTF--
-Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
-NULL
+--EXPECT--
int(1)
int(0)
int(3)
diff --git a/ext/standard/tests/array/bug40191.phpt b/ext/standard/tests/array/bug40191.phpt
index f5e439821d..b94e709364 100644
--- a/ext/standard/tests/array/bug40191.phpt
+++ b/ext/standard/tests/array/bug40191.phpt
@@ -8,12 +8,14 @@ $arrObj->append('foo');
$arrObj->append('bar');
$arrObj->append('foo');
-$arr = array_unique($arrObj);
-var_dump($arr);
+try {
+ $arr = array_unique($arrObj);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
---EXPECTF--
-Warning: array_unique() expects parameter 1 to be array, object given in %s on line %d
-NULL
+--EXPECT--
+array_unique() expects parameter 1 to be array, object given
Done
diff --git a/ext/standard/tests/array/bug42177.phpt b/ext/standard/tests/array/bug42177.phpt
index 5678ca3cac..dc5297b302 100644
--- a/ext/standard/tests/array/bug42177.phpt
+++ b/ext/standard/tests/array/bug42177.phpt
@@ -18,7 +18,11 @@ unset( $a1, $a2 );
$a1 = array();
$a2 = array( 'key1' => &$a1 );
$a1 = array_merge_recursive( $a1, $a2 );
-$a1 = array_merge_recursive( $a1, $a2 );
+try {
+ $a1 = array_merge_recursive( $a1, $a2 );
+} catch (\Error $e) {
+ echo $e->getMessage() . " on line " . $e->getLine() . "\n";
+}
unset( $a1, $a2 );
$x = 'foo';
@@ -30,5 +34,5 @@ $a1 = array_merge_recursive( $a1, $a2 );
unset( $a1, $a2 );
?>
---EXPECTF--
-Warning: array_merge_recursive(): recursion detected in %s on line 18
+--EXPECT--
+Recursion detected on line 19
diff --git a/ext/standard/tests/array/bug43495.phpt b/ext/standard/tests/array/bug43495.phpt
index 522ff1903b..cb011d3d44 100644
--- a/ext/standard/tests/array/bug43495.phpt
+++ b/ext/standard/tests/array/bug43495.phpt
@@ -8,14 +8,21 @@ $a["key1"]["key2"]["key3"]=&$a;
$b=array("key1"=>array("key2"=>array()));
$b["key1"]["key2"]["key3"]=&$b;
-array_merge_recursive($a,$b);
+
+try {
+ array_merge_recursive($a,$b);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
/* Break recursion */
$a["key1"]["key2"]["key3"] = null;
$b["key1"]["key2"]["key3"] = null;
-echo "Done.\n";
?>
---EXPECTF--
-Warning: array_merge_recursive(): recursion detected in %sbug43495.php on line %d
-Done.
+
+DONE
+--EXPECT--
+Recursion detected
+
+DONE
diff --git a/ext/standard/tests/array/bug61058.phpt b/ext/standard/tests/array/bug61058.phpt
index f5e06a4a02..6e78b35711 100644
--- a/ext/standard/tests/array/bug61058.phpt
+++ b/ext/standard/tests/array/bug61058.phpt
@@ -2,7 +2,12 @@
Bug #61058 (array_fill leaks if start index is PHP_INT_MAX)
--FILE--
<?php
-array_fill(PHP_INT_MAX, 2, '*');
+
+try {
+ array_fill(PHP_INT_MAX, 2, '*');
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
---EXPECTF--
-Warning: array_fill(): Cannot add element to the array as the next element is already occupied in %sbug61058.php on line %d
+--EXPECT--
+Cannot add element to the array as the next element is already occupied
diff --git a/ext/standard/tests/array/bug65251.phpt b/ext/standard/tests/array/bug65251.phpt
index 014517794c..3e0f3a1e27 100644
--- a/ext/standard/tests/array/bug65251.phpt
+++ b/ext/standard/tests/array/bug65251.phpt
@@ -3,8 +3,12 @@ Bug #65251: array_merge_recursive() recursion detection broken
--FILE--
<?php
-array_merge_recursive($GLOBALS, $GLOBALS)
+try {
+ array_merge_recursive($GLOBALS, $GLOBALS);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
---EXPECTF--
-Warning: array_merge_recursive(): recursion detected in %s on line %d
+--EXPECT--
+Recursion detected
diff --git a/ext/standard/tests/array/bug67693.phpt b/ext/standard/tests/array/bug67693.phpt
index 516436c511..c9aa2d86fa 100644
--- a/ext/standard/tests/array/bug67693.phpt
+++ b/ext/standard/tests/array/bug67693.phpt
@@ -16,9 +16,9 @@ echo"\nDone";
?>
--EXPECT--
array(2) {
- [0]=>
+ [-1]=>
int(0)
- [1]=>
+ [0]=>
int(0)
}
diff --git a/ext/standard/tests/array/bug70713.phpt b/ext/standard/tests/array/bug70713.phpt
index 7cd0a0f113..f24720607d 100644
--- a/ext/standard/tests/array/bug70713.phpt
+++ b/ext/standard/tests/array/bug70713.phpt
@@ -19,8 +19,13 @@ class obj
}
$arr = array('string' => new obj);
-array_walk_recursive($arr, 'settype');
+
+try {
+ array_walk_recursive($arr, 'settype');
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
?>
---EXPECTF--
-Warning: array_walk_recursive(): Iterated value is no longer an array or object in %s on line %d
+--EXPECT--
+Iterated value is no longer an array or object
diff --git a/ext/standard/tests/array/bug71220.phpt b/ext/standard/tests/array/bug71220.phpt
index 49e5bb7719..ed46b25e18 100644
--- a/ext/standard/tests/array/bug71220.phpt
+++ b/ext/standard/tests/array/bug71220.phpt
@@ -3,8 +3,14 @@ Bug #71220 (Null pointer deref (segfault) in compact via ob_start)
--FILE--
<?php
ob_start("compact");
-ob_end_clean();
+try {
+ ob_end_clean();
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
?>
-okey
+
+OKAY
--EXPECT--
-okey
+Cannot call compact() dynamically
+OKAY
diff --git a/ext/standard/tests/array/bug77395.phpt b/ext/standard/tests/array/bug77395.phpt
index 7910e36982..b90e9dd976 100644
--- a/ext/standard/tests/array/bug77395.phpt
+++ b/ext/standard/tests/array/bug77395.phpt
@@ -10,7 +10,12 @@ function error_handle($level, $message, $file = '', $line = 0){
}
set_error_handler('error_handle');
$data = [['aa'=> 'bb',], ['aa'=> 'bb',],];
-array_multisort(array_column($data, 'bb'),SORT_DESC, $data); // PHP Warning error
+
+try {
+ array_multisort(array_column($data, 'bb'),SORT_DESC, $data); // PHP Warning error
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
--EXPECT--
-array_multisort(): Array sizes are inconsistent
+Array sizes are inconsistent
diff --git a/ext/standard/tests/array/bug77931.phpt b/ext/standard/tests/array/bug77931.phpt
index 98a2eb91cf..45a241f27f 100644
--- a/ext/standard/tests/array/bug77931.phpt
+++ b/ext/standard/tests/array/bug77931.phpt
@@ -3,14 +3,24 @@ Bug #77931: Warning for array_map mentions wrong type
--FILE--
<?php
-array_map('trim', array(), 1);
-array_map('trim', array(), array(), true);
-array_map('trim', array(), array(), array(), null);
+try {
+ array_map('trim', array(), 1);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ array_map('trim', array(), array(), true);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ array_map('trim', array(), array(), array(), null);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-Warning: array_map(): Expected parameter 3 to be an array, int given in %s on line %d
-
-Warning: array_map(): Expected parameter 4 to be an array, bool given in %s on line %d
-
-Warning: array_map(): Expected parameter 5 to be an array, null given in %s on line %d
+--EXPECT--
+Expected parameter 3 to be an array, int given
+Expected parameter 4 to be an array, bool given
+Expected parameter 5 to be an array, null given
diff --git a/ext/standard/tests/array/compact_variation1.phpt b/ext/standard/tests/array/compact_variation1.phpt
index d2b9fc45df..9201bc5aa1 100644
--- a/ext/standard/tests/array/compact_variation1.phpt
+++ b/ext/standard/tests/array/compact_variation1.phpt
@@ -10,7 +10,7 @@ Test compact() function : usage variations - arrays containing references.
/*
* compact variations - arrays with references
*/
-echo "*** Testing compact() : usage variations - arrays containg references ***\n";
+echo "*** Testing compact() : usage variations - arrays containing references ***\n";
$a = 1;
$b = 2;
$c = 3;
@@ -20,31 +20,34 @@ $arr2 = array("a", array(array(array("b"))));
$arr2[1][0][0][] = &$arr2;
$arr2[1][0][0][] = &$arr2[1];
$arr3 = array(&$string);
-var_dump(compact($arr1));
-var_dump(compact($arr2));
-var_dump(compact($arr3));
-echo "Done";
-?>
---EXPECTF--
-*** Testing compact() : usage variations - arrays containg references ***
-Warning: compact(): recursion detected in %s on line %d
-array(1) {
- ["a"]=>
- int(1)
+try {
+ var_dump(compact($arr1));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
}
-Warning: compact(): recursion detected in %s on line %d
+try {
+ var_dump(compact($arr2));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-Warning: compact(): recursion detected in %s on line %d
-array(2) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
+try {
+ var_dump(compact($arr3));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
}
+?>
+
+DONE
+--EXPECT--
+*** Testing compact() : usage variations - arrays containing references ***
+Recursion detected
+Recursion detected
array(1) {
["c"]=>
int(3)
}
-Done
+
+DONE
diff --git a/ext/standard/tests/array/compact_variation2.phpt b/ext/standard/tests/array/compact_variation2.phpt
index 8ca5020d6d..17ac7882c7 100644
--- a/ext/standard/tests/array/compact_variation2.phpt
+++ b/ext/standard/tests/array/compact_variation2.phpt
@@ -22,7 +22,6 @@ function f() {
f();
?>
-==Done==
--EXPECTF--
*** Testing compact() : usage variations - variables outside of current scope ***
@@ -41,4 +40,3 @@ array(2) {
["c"]=>
string(3) "f.c"
}
-==Done==
diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt
index 175cfe7118..1fd2e8e6ca 100644
--- a/ext/standard/tests/array/count_recursive.phpt
+++ b/ext/standard/tests/array/count_recursive.phpt
@@ -111,16 +111,6 @@ for( $i =0; $i < count( $mode_arr ); $i++) {
var_dump(count($arr, $mode_arr[$i]));
}
-
-echo "\n-- Testing error conditions --";
-var_dump( count() ); // No. of args = 0
-var_dump( count(array(), COUNT_NORMAL, 100) ); // No. of args > expected
-
-/* Testing Invalid type arguments */
-var_dump( count("string", ABCD) );
-var_dump( count(100, "string") );
-var_dump( count(array(), "") );
-
echo "\nDone";
/* closing the resource handles */
@@ -230,22 +220,4 @@ For mode '1' count is => int(9)
For mode '' count is => int(3)
For mode '' count is => int(3)
--- Testing error conditions --
-Warning: count() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: count() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: Use of undefined constant ABCD - assumed 'ABCD' (this will throw an Error in a future version of PHP) in %s on line %d
-
-Warning: count() expects parameter 2 to be int, %s given in %s on line %d
-NULL
-
-Warning: count() expects parameter 2 to be int, %s given in %s on line %d
-NULL
-
-Warning: count() expects parameter 2 to be int, %s given in %s on line %d
-NULL
-
Done
diff --git a/ext/standard/tests/array/current_basic.phpt b/ext/standard/tests/array/current_basic.phpt
index 287a479067..fc28b7c342 100644
--- a/ext/standard/tests/array/current_basic.phpt
+++ b/ext/standard/tests/array/current_basic.phpt
@@ -22,11 +22,9 @@ var_dump(current($array));
next($array);
var_dump(current($array));
?>
-===DONE===
--EXPECT--
*** Testing current() : basic functionality ***
string(4) "zero"
string(3) "one"
int(3)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/array/current_variation2.phpt b/ext/standard/tests/array/current_variation2.phpt
index d839370962..2bbc5dca42 100644
--- a/ext/standard/tests/array/current_variation2.phpt
+++ b/ext/standard/tests/array/current_variation2.phpt
@@ -115,7 +115,6 @@ foreach($inputs as $key => $input) {
fclose($fp);
?>
-===DONE===
--EXPECTF--
*** Testing current() : usage variations ***
@@ -152,4 +151,3 @@ NULL
-- Iteration 11 : resource data --
resource(%d) of type (stream)
-===DONE===
diff --git a/ext/standard/tests/array/current_variation3.phpt b/ext/standard/tests/array/current_variation3.phpt
index decb043116..b0684cd7b7 100644
--- a/ext/standard/tests/array/current_variation3.phpt
+++ b/ext/standard/tests/array/current_variation3.phpt
@@ -29,7 +29,6 @@ var_dump(current($array1));
echo "\$array2: ";
var_dump(current($array2));
?>
-===DONE===
--EXPECT--
*** Testing current() : usage variations ***
@@ -39,4 +38,3 @@ string(4) "zero"
-- Position after calling next() --
$array1: string(3) "one"
$array2: string(3) "one"
-===DONE===
diff --git a/ext/standard/tests/array/current_variation4.phpt b/ext/standard/tests/array/current_variation4.phpt
index 5862a86129..a8471e9d7f 100644
--- a/ext/standard/tests/array/current_variation4.phpt
+++ b/ext/standard/tests/array/current_variation4.phpt
@@ -45,7 +45,6 @@ var_dump(current($multi_array[3][3][3]));
// see if internal pointer is in the same position from when accessing this inner array
var_dump(current($multi_array[3][3][3][1]));
?>
-===DONE===
--EXPECT--
*** Testing current() : usage variations ***
@@ -68,4 +67,3 @@ Initial Position: int(1)
Current Position: string(3) "two"
string(3) "two"
int(1)
-===DONE===
diff --git a/ext/standard/tests/array/current_variation5.phpt b/ext/standard/tests/array/current_variation5.phpt
index d49353c24f..7458de07f7 100644
--- a/ext/standard/tests/array/current_variation5.phpt
+++ b/ext/standard/tests/array/current_variation5.phpt
@@ -39,8 +39,6 @@ var_dump(next($a));
current_variation5($a);
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
*** Testing current() : usage variations ***
@@ -55,4 +53,3 @@ string(3) "yes"
string(5) "maybe"
string(5) "maybe"
string(2) "no"
-===DONE===
diff --git a/ext/standard/tests/array/each.phpt b/ext/standard/tests/array/each.phpt
deleted file mode 100644
index 4af2097a7d..0000000000
--- a/ext/standard/tests/array/each.phpt
+++ /dev/null
Binary files differ
diff --git a/ext/standard/tests/array/each_basic.phpt b/ext/standard/tests/array/each_basic.phpt
deleted file mode 100644
index cd38682dc7..0000000000
--- a/ext/standard/tests/array/each_basic.phpt
+++ /dev/null
@@ -1,76 +0,0 @@
---TEST--
-Test each() function : basic functionality
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Test basic functionality of each()
- */
-
-echo "*** Testing each() : basic functionality ***\n";
-
-$arr = array ('one' => 1, 'zero', 'two' => 'deux', 20 => 'twenty');
-echo "\n-- Passed array: --\n";
-var_dump($arr);
-
-echo "\n-- Initial position: --\n";
-var_dump(each($arr));
-
-echo "\n-- End position: --\n";
-end($arr);
-var_dump(each($arr));
-
-echo "\n-- Passed the end of array: --\n";
-var_dump(each($arr));
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : basic functionality ***
-
--- Passed array: --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- string(4) "zero"
- ["two"]=>
- string(4) "deux"
- [20]=>
- string(6) "twenty"
-}
-
--- Initial position: --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-array(4) {
- [1]=>
- int(1)
- ["value"]=>
- int(1)
- [0]=>
- string(3) "one"
- ["key"]=>
- string(3) "one"
-}
-
--- End position: --
-array(4) {
- [1]=>
- string(6) "twenty"
- ["value"]=>
- string(6) "twenty"
- [0]=>
- int(20)
- ["key"]=>
- int(20)
-}
-
--- Passed the end of array: --
-bool(false)
-Done
diff --git a/ext/standard/tests/array/each_error.phpt b/ext/standard/tests/array/each_error.phpt
deleted file mode 100644
index e7ee4976ed..0000000000
--- a/ext/standard/tests/array/each_error.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test each() function : error conditions - pass incorrect number of args
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Pass an incorrect number of arguments to each() to test behaviour
- */
-
-echo "*** Testing each() : error conditions ***\n";
-
-// Zero arguments
-echo "\n-- Testing each() function with Zero arguments --\n";
-var_dump( each() );
-
-//Test each with one more than the expected number of arguments
-echo "\n-- Testing each() function with more than expected no. of arguments --\n";
-$arr = array(1, 2);
-$extra_arg = 10;
-var_dump( each($arr, $extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : error conditions ***
-
--- Testing each() function with Zero arguments --
-
-Warning: each() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing each() function with more than expected no. of arguments --
-
-Warning: each() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/each_variation1.phpt b/ext/standard/tests/array/each_variation1.phpt
deleted file mode 100644
index 6b75d5e15c..0000000000
--- a/ext/standard/tests/array/each_variation1.phpt
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test each() function : usage variations - Pass different data types as $arr arg
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Pass different data types as $arr arg to each() to test behaviour
- */
-
-echo "*** Testing each() : 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 $arr 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 each()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( each($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Iteration 1 --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/array/each_variation2.phpt b/ext/standard/tests/array/each_variation2.phpt
deleted file mode 100644
index 34eeedc9a8..0000000000
--- a/ext/standard/tests/array/each_variation2.phpt
+++ /dev/null
@@ -1,249 +0,0 @@
---TEST--
-Test each() function : usage variations - arrays of different data types
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Pass arrays of different data types as $arr argument to each() to test behaviour
- */
-
-echo "*** Testing each() : 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");
-
-// arrays of different data types to be passed as $arr
-$inputs = array(
-
- // int data
-/*1*/ 'int' => array(
- 0,
- 1,
- 12345,
- -2345,
- ),
-
- // float data
-/*2*/ 'float' => array(
- 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
- ),
-
- // null data
-/*3*/ 'null' => array(
- NULL,
- null,
- ),
-
- // boolean data
-/*4*/ 'bool' => array(
- true,
- false,
- TRUE,
- FALSE,
- ),
-
- // empty data
-/*5*/ 'empty string' => array(
- "",
- '',
- ),
-
-/*6*/ 'empty array' => array(
- ),
-
- // string data
-/*7*/ 'string' => array(
- "string",
- 'string',
- $heredoc,
- ),
-
- // object data
-/*8*/ 'object' => array(
- new classA(),
- ),
-
- // undefined data
-/*9*/ 'undefined' => array(
- @$undefined_var,
- ),
-
- // unset data
-/*10*/ 'unset' => array(
- @$unset_var,
- ),
-
- // resource variable
-/*11*/ 'resource' => array(
- $fp
- ),
-);
-
-// loop through each element of $inputs to check the behavior of each()
-$iterator = 1;
-foreach($inputs as $key => $input) {
- echo "\n-- Iteration $iterator: $key data --\n";
- var_dump( each($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Iteration 1: int data --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-array(4) {
- [1]=>
- int(0)
- ["value"]=>
- int(0)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 2: float data --
-array(4) {
- [1]=>
- float(10.5)
- ["value"]=>
- float(10.5)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 3: null data --
-array(4) {
- [1]=>
- NULL
- ["value"]=>
- NULL
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 4: bool data --
-array(4) {
- [1]=>
- bool(true)
- ["value"]=>
- bool(true)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 5: empty string data --
-array(4) {
- [1]=>
- string(0) ""
- ["value"]=>
- string(0) ""
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 6: empty array data --
-bool(false)
-
--- Iteration 7: string data --
-array(4) {
- [1]=>
- string(6) "string"
- ["value"]=>
- string(6) "string"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 8: object data --
-array(4) {
- [1]=>
- object(classA)#%d (0) {
- }
- ["value"]=>
- object(classA)#%d (0) {
- }
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 9: undefined data --
-array(4) {
- [1]=>
- NULL
- ["value"]=>
- NULL
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 10: unset data --
-array(4) {
- [1]=>
- NULL
- ["value"]=>
- NULL
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 11: resource data --
-array(4) {
- [1]=>
- resource(%d) of type (stream)
- ["value"]=>
- resource(%d) of type (stream)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-Done
diff --git a/ext/standard/tests/array/each_variation3.phpt b/ext/standard/tests/array/each_variation3.phpt
deleted file mode 100644
index 32342d6d78..0000000000
--- a/ext/standard/tests/array/each_variation3.phpt
+++ /dev/null
@@ -1,254 +0,0 @@
---TEST--
-Test each() function : usage variations - keys of different data types
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Pass each() arrays where the keys are different data types to test behaviour
- */
-
-echo "*** Testing each() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// unexpected values to be passed as $arr
-$inputs = array(
-
- // int data
-/*1*/ 'int' => array(
- 0 => 'zero',
- 1 => 'one',
- 12345 => 'positive',
- -2345 => 'negative',
- ),
-
- // float data
-/*2*/ 'float' => array(
- 10.5 => 'positive',
- -10.5 => 'negative',
- .5 => 'half',
- ),
-
-/*3*/ 'extreme floats' => array(
- 12.3456789000e6 => 'large',
- 12.3456789000E-10 => 'small',
- ),
-
- // null data
-/*4*/ 'null uppercase' => array(
- NULL => 'null 1',
- ),
-
-/*5*/ 'null lowercase' => array(
- null => 'null 2',
- ),
-
- // boolean data
-/*6*/ 'bool lowercase' => array(
- true => 'lowert',
- false => 'lowerf',
- ),
-
-/*7*/ 'bool uppercase' => array(
- TRUE => 'uppert',
- FALSE => 'upperf',
- ),
-
- // empty data
-/*8*/ 'empty double quotes' => array(
- "" => 'emptyd',
- ),
-
-/*9*/ 'empty single quotes' => array(
- '' => 'emptys',
- ),
-
- // string data
-/*10*/ 'string' => array(
- "stringd" => 'stringd',
- 'strings' => 'strings',
- $heredoc => 'stringh',
- ),
-
- // undefined data
-/*11*/ 'undefined' => array(
- @$undefined_var => 'undefined',
- ),
-
- // unset data
-/*12*/ 'unset' => array(
- @$unset_var => 'unset',
- ),
-);
-
-// loop through each element of $inputs to check the behavior of each()
-$iterator = 1;
-foreach($inputs as $key => $input) {
- echo "\n-- Iteration $iterator: $key data --\n";
- var_dump( each($input) );
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Iteration 1: int data --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 2: float data --
-array(4) {
- [1]=>
- string(8) "positive"
- ["value"]=>
- string(8) "positive"
- [0]=>
- int(10)
- ["key"]=>
- int(10)
-}
-
--- Iteration 3: extreme floats data --
-array(4) {
- [1]=>
- string(5) "large"
- ["value"]=>
- string(5) "large"
- [0]=>
- int(12345678)
- ["key"]=>
- int(12345678)
-}
-
--- Iteration 4: null uppercase data --
-array(4) {
- [1]=>
- string(6) "null 1"
- ["value"]=>
- string(6) "null 1"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 5: null lowercase data --
-array(4) {
- [1]=>
- string(6) "null 2"
- ["value"]=>
- string(6) "null 2"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 6: bool lowercase data --
-array(4) {
- [1]=>
- string(6) "lowert"
- ["value"]=>
- string(6) "lowert"
- [0]=>
- int(1)
- ["key"]=>
- int(1)
-}
-
--- Iteration 7: bool uppercase data --
-array(4) {
- [1]=>
- string(6) "uppert"
- ["value"]=>
- string(6) "uppert"
- [0]=>
- int(1)
- ["key"]=>
- int(1)
-}
-
--- Iteration 8: empty double quotes data --
-array(4) {
- [1]=>
- string(6) "emptyd"
- ["value"]=>
- string(6) "emptyd"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 9: empty single quotes data --
-array(4) {
- [1]=>
- string(6) "emptys"
- ["value"]=>
- string(6) "emptys"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 10: string data --
-array(4) {
- [1]=>
- string(7) "stringd"
- ["value"]=>
- string(7) "stringd"
- [0]=>
- string(7) "stringd"
- ["key"]=>
- string(7) "stringd"
-}
-
--- Iteration 11: undefined data --
-array(4) {
- [1]=>
- string(9) "undefined"
- ["value"]=>
- string(9) "undefined"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 12: unset data --
-array(4) {
- [1]=>
- string(5) "unset"
- ["value"]=>
- string(5) "unset"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-Done
diff --git a/ext/standard/tests/array/each_variation4.phpt b/ext/standard/tests/array/each_variation4.phpt
deleted file mode 100644
index 64fbb4a8d0..0000000000
--- a/ext/standard/tests/array/each_variation4.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-Test each() function : usage variations - Referenced variables
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Test behaviour of each() when:
- * 1. Passed an array made up of referenced variables
- * 2. Passed an array as $arr argument by reference
- */
-
-echo "*** Testing each() : usage variations ***\n";
-
-echo "\n-- Array made up of referenced variables: --\n";
-$val1 = 'foo';
-$val2 = 'bar';
-
-$arr1 = array('one' => &$val1, &$val2);
-
-echo "-- Call each until at the end of the array: --\n";
-var_dump( each($arr1) );
-var_dump( each($arr1) );
-var_dump( each($arr1) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Array made up of referenced variables: --
--- Call each until at the end of the array: --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-array(4) {
- [1]=>
- string(3) "foo"
- ["value"]=>
- string(3) "foo"
- [0]=>
- string(3) "one"
- ["key"]=>
- string(3) "one"
-}
-array(4) {
- [1]=>
- string(3) "bar"
- ["value"]=>
- string(3) "bar"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-bool(false)
-Done
diff --git a/ext/standard/tests/array/each_variation5.phpt b/ext/standard/tests/array/each_variation5.phpt
deleted file mode 100644
index 441882f962..0000000000
--- a/ext/standard/tests/array/each_variation5.phpt
+++ /dev/null
@@ -1,97 +0,0 @@
---TEST--
-Test each() function : usage variations - Multi-dimensional arrays
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Test behaviour of each() when passed:
- * 1. a two-dimensional array
- * 2. a sub-array
- */
-
-echo "*** Testing each() : usage variations ***\n";
-
-$arr = array ('zero',
- array(1, 2, 3),
- 'one' => 'un',
- array('a', 'b', 'c')
- );
-
-echo "\n-- Pass each() a two-dimensional array --\n";
-for ($i = 1; $i < count($arr); $i++) {
- var_dump( each($arr) );
-}
-
-echo "\n-- Pass each() a sub-array --\n";
-var_dump( each($arr[2]));
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Pass each() a two-dimensional array --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-array(4) {
- [1]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["value"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [0]=>
- int(1)
- ["key"]=>
- int(1)
-}
-array(4) {
- [1]=>
- string(2) "un"
- ["value"]=>
- string(2) "un"
- [0]=>
- string(3) "one"
- ["key"]=>
- string(3) "one"
-}
-
--- Pass each() a sub-array --
-array(4) {
- [1]=>
- string(1) "a"
- ["value"]=>
- string(1) "a"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-Done
diff --git a/ext/standard/tests/array/each_variation6.phpt b/ext/standard/tests/array/each_variation6.phpt
deleted file mode 100644
index de52ba5965..0000000000
--- a/ext/standard/tests/array/each_variation6.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-Test each() function : usage variations - Internal array pointer
---FILE--
-<?php
-/* Prototype : array each(array $arr)
- * Description: Return the currently pointed key..value pair in the passed array,
- * and advance the pointer to the next element
- * Source code: Zend/zend_builtin_functions.c
- */
-
-/*
- * Test the position of the internal array pointer after a call to each()
- */
-
-echo "*** Testing each() : usage variations ***\n";
-
-$arr = array('zero', 'one', 'two', 'abc', 'xyz');
-
-echo "\n-- Current position: --\n";
-echo key($arr) . " => " . current($arr) . "\n";
-
-echo "\n-- Call to each(): --\n";
-var_dump( each($arr) );
-
-echo "\n-- New position: --\n";
-echo key($arr) . " => " . current($arr) . "\n";
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Current position: --
-0 => zero
-
--- Call to each(): --
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- New position: --
-1 => one
-Done
diff --git a/ext/standard/tests/array/end.phpt b/ext/standard/tests/array/end.phpt
index 724f2e612f..a7474a7e73 100644
--- a/ext/standard/tests/array/end.phpt
+++ b/ext/standard/tests/array/end.phpt
@@ -106,21 +106,6 @@ $resources = array($file_handle, $dir_handle);
var_dump( end($resources) );
var_dump( current($resources) );
-echo "\n*** Testing error conditions ***\n";
-/* checking for unexpected number of arguments */
-var_dump( end() );
-var_dump( end($array[0], $array[0]) );
-
-/* checking for unexpected type of arguments */
-$var=1;
-$var1="string";
-var_dump( end($var) );
-var_dump( end($var1) );
-
-/* checking null array */
-$null_array = array();
-var_dump( end($null_array) );
-
echo "Done\n";
@@ -219,19 +204,4 @@ array(2) {
*** Testing end() on resource type ***
resource(%d) of type (stream)
resource(%d) of type (stream)
-
-*** Testing error conditions ***
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-bool(false)
Done
diff --git a/ext/standard/tests/array/end_64bit.phpt b/ext/standard/tests/array/end_64bit.phpt
index 0049041848..ba20693d0f 100644
--- a/ext/standard/tests/array/end_64bit.phpt
+++ b/ext/standard/tests/array/end_64bit.phpt
@@ -106,21 +106,6 @@ $resources = array($file_handle, $dir_handle);
var_dump( end($resources) );
var_dump( current($resources) );
-echo "\n*** Testing error conditions ***\n";
-/* checking for unexpected number of arguments */
-var_dump( end() );
-var_dump( end($array[0], $array[0]) );
-
-/* checking for unexpected type of arguments */
-$var=1;
-$var1="string";
-var_dump( end($var) );
-var_dump( end($var1) );
-
-/* checking null array */
-$null_array = array();
-var_dump( end($null_array) );
-
echo "Done\n";
?>
@@ -218,19 +203,4 @@ array(2) {
*** Testing end() on resource type ***
resource(%d) of type (stream)
resource(%d) of type (stream)
-
-*** Testing error conditions ***
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-bool(false)
Done
diff --git a/ext/standard/tests/array/end_basic.phpt b/ext/standard/tests/array/end_basic.phpt
index b14cc2f836..b337ece75c 100644
--- a/ext/standard/tests/array/end_basic.phpt
+++ b/ext/standard/tests/array/end_basic.phpt
@@ -28,7 +28,6 @@ echo "\n-- Add a new element to array --\n";
$array[2] = 'foo';
var_dump(end($array));
?>
-===DONE===
--EXPECT--
*** Testing end() : basic functionality ***
@@ -43,4 +42,3 @@ string(3) "two"
-- Add a new element to array --
string(3) "foo"
-===DONE===
diff --git a/ext/standard/tests/array/end_variation2.phpt b/ext/standard/tests/array/end_variation2.phpt
index 43972b751e..354e3d5369 100644
--- a/ext/standard/tests/array/end_variation2.phpt
+++ b/ext/standard/tests/array/end_variation2.phpt
@@ -24,7 +24,6 @@ var_dump(end($array_arg));
echo "\n-- Pass a sub-array as \$array_arg --\n";
var_dump(end($array_arg[0]));
?>
-===DONE===
--EXPECT--
*** Testing end() : usage variations ***
@@ -40,4 +39,3 @@ array(3) {
-- Pass a sub-array as $array_arg --
int(7)
-===DONE===
diff --git a/ext/standard/tests/array/end_variation3.phpt b/ext/standard/tests/array/end_variation3.phpt
index fbeea68a12..8e9284b816 100644
--- a/ext/standard/tests/array/end_variation3.phpt
+++ b/ext/standard/tests/array/end_variation3.phpt
@@ -28,7 +28,6 @@ var_dump(current($array1));
echo "\$array2: ";
var_dump(current($array2));
?>
-===DONE===
--EXPECT--
*** Testing end() : usage variations ***
@@ -38,4 +37,3 @@ string(4) "zero"
-- Position after calling end() --
$array1: string(3) "two"
$array2: string(3) "two"
-===DONE===
diff --git a/ext/standard/tests/array/extract_error.phpt b/ext/standard/tests/array/extract_error.phpt
index e8bcf8f5d8..2103a1b9a4 100644
--- a/ext/standard/tests/array/extract_error.phpt
+++ b/ext/standard/tests/array/extract_error.phpt
@@ -6,53 +6,35 @@ Test extract() function (error conditions)
/* Testing Error Conditions */
echo "*** Testing Error Conditions ***\n";
-/* Zero Arguments */
-var_dump( extract() );
-
/* Invalid second argument ( only 0-6 is valid) */
$arr = array(1);
-var_dump( extract($arr, -1 . "wddr") );
-var_dump( extract($arr, 7 , "wddr") );
-
-/* scalar argument */
-$val = 1;
-var_dump( extract($val) );
-/* string argument */
-$str = "test";
-var_dump( extract($str) );
+try {
+ var_dump( extract($arr, -1 . "wddr") );
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-/* More than valid number of arguments i.e. 3 args */
-var_dump( extract($arr, EXTR_SKIP, "aa", "ee") );
+try {
+ var_dump( extract($arr, 7 , "wddr") );
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
/* Two Arguments, second as prefix but without prefix string as third argument */
-var_dump( extract($arr,EXTR_PREFIX_IF_EXISTS) );
+try {
+ var_dump( extract($arr,EXTR_PREFIX_IF_EXISTS) );
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
echo "Done\n";
?>
--EXPECTF--
*** Testing Error Conditions ***
-Warning: extract() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
Notice: A non well formed numeric value encountered in %s on line %d
-
-Warning: extract(): Invalid extract type in %s on line %d
-NULL
-
-Warning: extract(): Invalid extract type in %s on line %d
-NULL
-
-Warning: extract() expects parameter 1 to be array, int given in %s on line %d
-NULL
-
-Warning: extract() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: extract() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: extract(): specified extract type requires the prefix parameter in %s on line %d
-NULL
+Invalid extract type
+Invalid extract type
+Specified extract type requires the prefix parameter
Done
diff --git a/ext/standard/tests/array/extract_error_variation1.phpt b/ext/standard/tests/array/extract_error_variation1.phpt
new file mode 100644
index 0000000000..ec3078a0b9
--- /dev/null
+++ b/ext/standard/tests/array/extract_error_variation1.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Test extract() function - error condition - Invalid prefix.
+--FILE--
+<?php
+$a = ["1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five"];
+
+try {
+ extract($a, EXTR_PREFIX_ALL, '85bogus');
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECT--
+Prefix is not a valid identifier
diff --git a/ext/standard/tests/array/in_array_variation3.phpt b/ext/standard/tests/array/in_array_variation3.phpt
index f07d1dea89..0b58990041 100644
--- a/ext/standard/tests/array/in_array_variation3.phpt
+++ b/ext/standard/tests/array/in_array_variation3.phpt
@@ -36,9 +36,17 @@ class in_array_check {
$in_array_obj = new in_array_check(); //creating new object
//error: as wrong datatype for second argument
-var_dump( in_array("array_var", $in_array_obj) );
+try {
+ var_dump( in_array("array_var", $in_array_obj) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//error: as wrong datatype for second argument
-var_dump( in_array("foo", $in_array_obj) );
+try {
+ var_dump( in_array("foo", $in_array_obj) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
//element found as "one" exists in array $array_var
var_dump( in_array("one", $in_array_obj->array_var) );
@@ -51,11 +59,7 @@ bool(true)
bool(true)
*** Testing objects with in_array() ***
-
-Warning: in_array() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: in_array() expects parameter 2 to be array, object given in %s on line %d
-NULL
+in_array() expects parameter 2 to be array, object given
+in_array() expects parameter 2 to be array, object given
bool(true)
Done
diff --git a/ext/standard/tests/array/key_basic.phpt b/ext/standard/tests/array/key_basic.phpt
index 2b45124921..6e0d2f9d50 100644
--- a/ext/standard/tests/array/key_basic.phpt
+++ b/ext/standard/tests/array/key_basic.phpt
@@ -29,7 +29,6 @@ echo "\n-- Past end of the array --\n";
next($array);
var_dump(key($array));
?>
-===DONE===
--EXPECT--
*** Testing key() : basic functionality ***
@@ -44,4 +43,3 @@ string(5) "three"
-- Past end of the array --
NULL
-===DONE===
diff --git a/ext/standard/tests/array/key_variation2.phpt b/ext/standard/tests/array/key_variation2.phpt
index cf7ca37531..67c7105ec6 100644
--- a/ext/standard/tests/array/key_variation2.phpt
+++ b/ext/standard/tests/array/key_variation2.phpt
@@ -103,7 +103,6 @@ foreach($inputs as $key => $input) {
$iterator++;
};
?>
-===DONE===
--EXPECT--
*** Testing key() : usage variations ***
@@ -152,4 +151,3 @@ string(0) ""
-- Iteration 12 : unset data --
string(0) ""
-===DONE===
diff --git a/ext/standard/tests/array/key_variation3.phpt b/ext/standard/tests/array/key_variation3.phpt
index 2d5387e56e..9ad9ff8a7d 100644
--- a/ext/standard/tests/array/key_variation3.phpt
+++ b/ext/standard/tests/array/key_variation3.phpt
@@ -30,7 +30,6 @@ var_dump(key($array1));
echo "\$array2: ";
var_dump(key($array2));
?>
-===DONE===
--EXPECT--
*** Testing key() : usage variations ***
@@ -40,4 +39,3 @@ int(0)
-- Position after calling next() --
$array1: int(1)
$array2: int(1)
-===DONE===
diff --git a/ext/standard/tests/array/key_variation4.phpt b/ext/standard/tests/array/key_variation4.phpt
index a7fa8d7bf9..b89ca829b4 100644
--- a/ext/standard/tests/array/key_variation4.phpt
+++ b/ext/standard/tests/array/key_variation4.phpt
@@ -44,7 +44,6 @@ var_dump(key($multi_array[3][3][3]));
// see if internal pointer is in the same position from when accessing this inner array
var_dump(key($multi_array[3][3][3][1]));
?>
-===DONE===
--EXPECT--
*** Testing key() : usage variations ***
@@ -60,4 +59,3 @@ Initial Position: int(0)
Current Position: int(2)
int(2)
int(0)
-===DONE===
diff --git a/ext/standard/tests/array/max.phpt b/ext/standard/tests/array/max.phpt
index ae4f304eae..9e6448cd52 100644
--- a/ext/standard/tests/array/max.phpt
+++ b/ext/standard/tests/array/max.phpt
@@ -5,10 +5,24 @@ precision=14
--FILE--
<?php
-var_dump(max());
-var_dump(max(1));
-var_dump(max(array()));
-var_dump(max(new stdclass));
+try {
+ var_dump(max(1));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(max(array()));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(max(new stdclass));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
+
var_dump(max(2,1,2));
var_dump(max(2.1,2.11,2.09));
var_dump(max("", "t", "b"));
@@ -19,18 +33,10 @@ var_dump(max(0, true, false, true));
echo "Done\n";
?>
---EXPECTF--
-Warning: max() expects at least 1 parameter, 0 given in %s on line 3
-NULL
-
-Warning: max(): When only one parameter is given, it must be an array in %s on line 4
-NULL
-
-Warning: max(): Array must contain at least one element in %s on line 5
-bool(false)
-
-Warning: max(): When only one parameter is given, it must be an array in %s on line 6
-NULL
+--EXPECT--
+When only one parameter is given, it must be an array
+Array must contain at least one element
+When only one parameter is given, it must be an array
int(2)
float(2.11)
string(1) "t"
diff --git a/ext/standard/tests/array/max_basiclong_64bit.phpt b/ext/standard/tests/array/max_basiclong_64bit.phpt
index 95116b16c2..6d40be0388 100644
--- a/ext/standard/tests/array/max_basiclong_64bit.phpt
+++ b/ext/standard/tests/array/max_basiclong_64bit.phpt
@@ -28,8 +28,6 @@ $longVals = array(
var_dump(max($longVals));
?>
-===DONE===
--EXPECT--
int(9223372036854775807)
int(9223372036854775807)
-===DONE===
diff --git a/ext/standard/tests/array/min.phpt b/ext/standard/tests/array/min.phpt
index cb8c7cfdca..85defa6e85 100644
--- a/ext/standard/tests/array/min.phpt
+++ b/ext/standard/tests/array/min.phpt
@@ -5,10 +5,24 @@ precision=14
--FILE--
<?php
-var_dump(min());
-var_dump(min(1));
-var_dump(min(array()));
-var_dump(min(new stdclass));
+try {
+ var_dump(min(1));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(min(array()));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(min(new stdclass));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
+
var_dump(min(2,1,2));
var_dump(min(2.1,2.11,2.09));
var_dump(min("", "t", "b"));
@@ -19,18 +33,10 @@ var_dump(min(0, true, false, true));
echo "Done\n";
?>
---EXPECTF--
-Warning: min() expects at least 1 parameter, 0 given in %s on line 3
-NULL
-
-Warning: min(): When only one parameter is given, it must be an array in %s on line 4
-NULL
-
-Warning: min(): Array must contain at least one element in %s on line 5
-bool(false)
-
-Warning: min(): When only one parameter is given, it must be an array in %s on line 6
-NULL
+--EXPECT--
+When only one parameter is given, it must be an array
+Array must contain at least one element
+When only one parameter is given, it must be an array
int(1)
float(2.09)
string(0) ""
diff --git a/ext/standard/tests/array/min_basiclong_64bit.phpt b/ext/standard/tests/array/min_basiclong_64bit.phpt
index 526d77a27a..50e5dda125 100644
--- a/ext/standard/tests/array/min_basiclong_64bit.phpt
+++ b/ext/standard/tests/array/min_basiclong_64bit.phpt
@@ -28,8 +28,6 @@ $longVals = array(
var_dump(min($longVals));
?>
-===DONE===
--EXPECT--
int(-9223372036854775808)
int(-9223372036854775808)
-===DONE===
diff --git a/ext/standard/tests/array/negative_index.phpt b/ext/standard/tests/array/negative_index.phpt
new file mode 100644
index 0000000000..a9f442acbd
--- /dev/null
+++ b/ext/standard/tests/array/negative_index.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test arrays starting with negative indices
+--FILE--
+<?php
+
+$a = array_fill(-2, 3, true);
+$b = [-2 => true, true, true];
+$c = ["string" => true, -2 => true, true, true];
+unset($c["string"]);
+$d[-2] = true;
+$d[] = true;
+$d[] = true;
+$e = [-2 => false];
+array_pop($e);
+$e[] = true;
+$e[] = true;
+$e[] = true;
+
+var_dump($a === $b && $b === $c && $c === $d && $d == $e);
+var_dump($a);
+?>
+--EXPECT--
+bool(true)
+array(3) {
+ [-2]=>
+ bool(true)
+ [-1]=>
+ bool(true)
+ [0]=>
+ bool(true)
+}
diff --git a/ext/standard/tests/array/next_basic.phpt b/ext/standard/tests/array/next_basic.phpt
index 2813f7c514..092eec555a 100644
--- a/ext/standard/tests/array/next_basic.phpt
+++ b/ext/standard/tests/array/next_basic.phpt
@@ -23,7 +23,6 @@ var_dump(next($array));
echo key($array) . " => " . current($array) . "\n";
var_dump(next($array));
?>
-===DONE===
--EXPECT--
*** Testing next() : basic functionality ***
0 => zero
@@ -32,4 +31,3 @@ string(3) "one"
string(3) "two"
2 => two
bool(false)
-===DONE===
diff --git a/ext/standard/tests/array/next_variation2.phpt b/ext/standard/tests/array/next_variation2.phpt
index aff03a619a..892e120b5e 100644
--- a/ext/standard/tests/array/next_variation2.phpt
+++ b/ext/standard/tests/array/next_variation2.phpt
@@ -25,7 +25,6 @@ var_dump(next($array_arg));
echo "\n-- Pass a sub-array as \$array_arg --\n";
var_dump(next($array_arg[0]));
?>
-===DONE===
--EXPECT--
*** Testing next() : usage variations ***
@@ -42,4 +41,3 @@ bool(false)
-- Pass a sub-array as $array_arg --
int(8)
-===DONE===
diff --git a/ext/standard/tests/array/prev_basic.phpt b/ext/standard/tests/array/prev_basic.phpt
index 8e1703259e..92d1536c87 100644
--- a/ext/standard/tests/array/prev_basic.phpt
+++ b/ext/standard/tests/array/prev_basic.phpt
@@ -33,7 +33,6 @@ for ($i = $length; $i > 0; $i--) {
}
?>
-===DONE===
--EXPECT--
*** Testing prev() : basic functionality ***
2 => two
@@ -50,4 +49,3 @@ int(3)
string(4) "help"
string(3) "one"
bool(false)
-===DONE===
diff --git a/ext/standard/tests/array/prev_variation2.phpt b/ext/standard/tests/array/prev_variation2.phpt
index e4c707124c..9c38e6ef37 100644
--- a/ext/standard/tests/array/prev_variation2.phpt
+++ b/ext/standard/tests/array/prev_variation2.phpt
@@ -29,7 +29,6 @@ var_dump(prev($array_arg));
echo "\n-- Pass a sub-array as \$array_arg --\n";
var_dump(prev($array_arg[0]));
?>
-===DONE===
--EXPECT--
*** Testing prev() : usage variations ***
@@ -46,4 +45,3 @@ bool(false)
-- Pass a sub-array as $array_arg --
int(8)
-===DONE===
diff --git a/ext/standard/tests/array/range_bug70239_0.phpt b/ext/standard/tests/array/range_bug70239_0.phpt
index edfdd05fbc..048d40737b 100644
--- a/ext/standard/tests/array/range_bug70239_0.phpt
+++ b/ext/standard/tests/array/range_bug70239_0.phpt
@@ -2,9 +2,11 @@
Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 1
--FILE--
<?php
-range(0, pow(2.0, 100000000));
+try {
+ range(0, pow(2.0, 100000000));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
---EXPECTF--
-Warning: range(): Invalid range supplied: start=0 end=inf in %srange_bug70239_0.php on line %d
-===DONE===
+--EXPECT--
+Invalid range supplied: start=0 end=inf
diff --git a/ext/standard/tests/array/range_bug70239_1.phpt b/ext/standard/tests/array/range_bug70239_1.phpt
index 75419cf829..9ab62870b1 100644
--- a/ext/standard/tests/array/range_bug70239_1.phpt
+++ b/ext/standard/tests/array/range_bug70239_1.phpt
@@ -2,9 +2,11 @@
Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 2
--FILE--
<?php
-range(pow(2.0, 100000000), pow(2.0, 100000000) + 1);
+try {
+ range(pow(2.0, 100000000), pow(2.0, 100000000) + 1);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
---EXPECTF--
-Warning: range(): Invalid range supplied: start=inf end=inf in %srange_bug70239_1.php on line %d
-===DONE===
+--EXPECT--
+Invalid range supplied: start=inf end=inf
diff --git a/ext/standard/tests/array/range_bug70239_2.phpt b/ext/standard/tests/array/range_bug70239_2.phpt
index 76ed638669..192644cd0f 100644
--- a/ext/standard/tests/array/range_bug70239_2.phpt
+++ b/ext/standard/tests/array/range_bug70239_2.phpt
@@ -2,10 +2,11 @@
Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 3
--FILE--
<?php
-var_dump(range(0, PHP_INT_MAX));
+try {
+ var_dump(range(0, PHP_INT_MAX));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
--EXPECTF--
-Warning: range(): The supplied range exceeds the maximum array size: start=0 end=%d in %srange_bug70239_2.php on line %d
-bool(false)
-===DONE===
+The supplied range exceeds the maximum array size: start=0 end=%d
diff --git a/ext/standard/tests/array/range_bug70239_3.phpt b/ext/standard/tests/array/range_bug70239_3.phpt
index 8402870c82..f1f7c94b89 100644
--- a/ext/standard/tests/array/range_bug70239_3.phpt
+++ b/ext/standard/tests/array/range_bug70239_3.phpt
@@ -2,10 +2,11 @@
Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 4
--FILE--
<?php
-var_dump(range(PHP_INT_MIN, 0));
+try {
+ var_dump(range(PHP_INT_MIN, 0));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
--EXPECTF--
-Warning: range(): The supplied range exceeds the maximum array size: start=-%d end=0 in %srange_bug70239_3.php on line %d
-bool(false)
-===DONE===
+The supplied range exceeds the maximum array size: start=-%d end=0
diff --git a/ext/standard/tests/array/range_errors.phpt b/ext/standard/tests/array/range_errors.phpt
index b63e9874bf..971eade4be 100644
--- a/ext/standard/tests/array/range_errors.phpt
+++ b/ext/standard/tests/array/range_errors.phpt
@@ -7,34 +7,84 @@ precision=14
echo "\n*** Testing error conditions ***\n";
-echo "\n-- Testing ( (low < high) && (step = 0) ) --";
-var_dump( range(1, 2, 0) );
-var_dump( range("a", "b", 0) );
-
-echo "\n\n-- Testing ( (low > high) && (step = 0) ) --";
-var_dump( range(2, 1, 0) );
-var_dump( range("b", "a", 0) );
-
-echo "\n\n-- Testing ( (low < high) && (high-low < step) ) --";
-var_dump( range(1.0, 7.0, 6.5) );
-
-echo "\n\n-- Testing ( (low > high) && (low-high < step) ) --";
-var_dump( range(7.0, 1.0, 6.5) );
-
-echo "\n-- Testing Invalid number of arguments --";
-var_dump( range() ); // No.of args = 0
-var_dump( range(1) ); // No.of args < expected
-var_dump( range(1,2,3,4) ); // No.of args > expected
-var_dump( range(-1, -2, 2) );
-var_dump( range("a", "j", "z") );
-var_dump( range(0, 1, "140962482048819216326.24") );
-var_dump( range(0, 1, "140962482048819216326.24.") );
-
-echo "\n-- Testing Invalid steps --";
+echo "\n-- Testing ( (low < high) && (step = 0) ) --\n";
+try {
+ var_dump( range(1, 2, 0) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump( range("a", "b", 0) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+echo "\n\n-- Testing ( (low > high) && (step = 0) ) --\n";
+try {
+ var_dump( range(2, 1, 0) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump( range("b", "a", 0) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+echo "\n\n-- Testing ( (low < high) && (high-low < step) ) --\n";
+try {
+ var_dump( range(1.0, 7.0, 6.5) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+echo "\n\n-- Testing ( (low > high) && (low-high < step) ) --\n";
+try {
+ var_dump( range(7.0, 1.0, 6.5) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+echo "\n-- Testing other conditions --\n";
+try {
+ var_dump( range(-1, -2, 2) );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump( range("a", "j", "z") );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump( range(0, 1, "140962482048819216326.24") );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump( range(0, 1, "140962482048819216326.24.") );
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+echo "\n-- Testing Invalid steps --\n";
$step_arr = array( "string", NULL, FALSE, "", "\0" );
foreach( $step_arr as $step ) {
- var_dump( range( 1, 5, $step ) );
+ try {
+ var_dump( range( 1, 5, $step ) );
+ } catch (\TypeError $e) {
+ echo $e->getMessage(), "\n";
+ } catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+ }
}
echo "Done\n";
@@ -43,65 +93,34 @@ echo "Done\n";
*** Testing error conditions ***
-- Testing ( (low < high) && (step = 0) ) --
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
+step exceeds the specified range
+step exceeds the specified range
-- Testing ( (low > high) && (step = 0) ) --
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
+step exceeds the specified range
+step exceeds the specified range
-- Testing ( (low < high) && (high-low < step) ) --
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
+step exceeds the specified range
-- Testing ( (low > high) && (low-high < step) ) --
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
--- Testing Invalid number of arguments --
-Warning: range() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: range() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+step exceeds the specified range
-Warning: range() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
+-- Testing other conditions --
+step exceeds the specified range
+range() expects parameter 3 to be int or float, string given
+step exceeds the specified range
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
-Warning: range(): Invalid range string - must be numeric in %s on line %d
-bool(false)
-
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
-Warning: range(): Invalid range string - must be numeric in %s on line %d
-bool(false)
+Notice: A non well formed numeric value encountered in %s on line %d
+step exceeds the specified range
-- Testing Invalid steps --
-Warning: range(): Invalid range string - must be numeric in %s on line %d
-bool(false)
-
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
-Warning: range(): step exceeds the specified range in %s on line %d
-bool(false)
-
-Warning: range(): Invalid range string - must be numeric in %s on line %d
-bool(false)
-
-Warning: range(): Invalid range string - must be numeric in %s on line %d
-bool(false)
+range() expects parameter 3 to be int or float, string given
+step exceeds the specified range
+step exceeds the specified range
+range() expects parameter 3 to be int or float, string given
+range() expects parameter 3 to be int or float, string given
Done
diff --git a/ext/standard/tests/array/range_variation.phpt b/ext/standard/tests/array/range_variation.phpt
index f7fc9e0815..3de5f6188f 100644
--- a/ext/standard/tests/array/range_variation.phpt
+++ b/ext/standard/tests/array/range_variation.phpt
@@ -18,7 +18,11 @@ for( $i = 0; $i < count($low_arr); $i++) {
echo "\n*** Possible variatins with steps ***\n";
var_dump( range( 1, 5, TRUE ) );
-var_dump( range( 1, 5, array(1, 2) ) );
+try {
+ var_dump( range( 1, 5, array(1, 2) ) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
@@ -611,16 +615,5 @@ array(5) {
[4]=>
int(5)
}
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
-}
+range() expects parameter 3 to be int or float, array given
Done
diff --git a/ext/standard/tests/array/reset_basic.phpt b/ext/standard/tests/array/reset_basic.phpt
index 04c676a4cf..195c431fd9 100644
--- a/ext/standard/tests/array/reset_basic.phpt
+++ b/ext/standard/tests/array/reset_basic.phpt
@@ -27,7 +27,6 @@ echo key($array) . " => " . current($array) . "\n";
echo "\n-- Call to reset() --\n";
var_dump(reset($array));
?>
-===DONE===
--EXPECT--
*** Testing reset() : basic functionality ***
@@ -42,4 +41,3 @@ string(3) "one"
-- Call to reset() --
string(4) "zero"
-===DONE===
diff --git a/ext/standard/tests/array/reset_variation2.phpt b/ext/standard/tests/array/reset_variation2.phpt
index e155cad592..2dbf152ce6 100644
--- a/ext/standard/tests/array/reset_variation2.phpt
+++ b/ext/standard/tests/array/reset_variation2.phpt
@@ -22,7 +22,6 @@ echo "\n-- Unset First element in array and check reset() --\n";
unset($array[0]);
var_dump(reset($array));
?>
-===DONE===
--EXPECT--
*** Testing reset() : usage variations ***
@@ -31,4 +30,3 @@ a => 0
-- Unset First element in array and check reset() --
string(1) "b"
-===DONE===
diff --git a/ext/standard/tests/array/reset_variation3.phpt b/ext/standard/tests/array/reset_variation3.phpt
index ff17a0cc9e..fd0d86eda8 100644
--- a/ext/standard/tests/array/reset_variation3.phpt
+++ b/ext/standard/tests/array/reset_variation3.phpt
@@ -38,7 +38,6 @@ var_dump(current($array1));
echo "\$array2: ";
var_dump(current($array2));
?>
-===DONE===
--EXPECT--
*** Testing reset() : usage variations ***
@@ -53,4 +52,3 @@ $array2: string(3) "one"
string(4) "zero"
$array1: string(4) "zero"
$array2: string(4) "zero"
-===DONE===
diff --git a/ext/standard/tests/array/sizeof_variation4.phpt b/ext/standard/tests/array/sizeof_variation4.phpt
index 465b818174..2fc98396b1 100644
--- a/ext/standard/tests/array/sizeof_variation4.phpt
+++ b/ext/standard/tests/array/sizeof_variation4.phpt
@@ -89,380 +89,380 @@ echo "Done";
--- Testing sizeof() for all kinds of unset variables in default, Normal and Recursive Modes ---
-- Iteration 1 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 2 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 3 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 4 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 5 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 6 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 7 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 8 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 9 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 10 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 11 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 12 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 13 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 14 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 15 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 16 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 17 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 18 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 19 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
-- Iteration 20 --
Default Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
+Warning: Undefined variable: value in %s on line %d
Warning: sizeof(): Parameter must be an array or an object that implements Countable in %s on line %d
int(0)
diff --git a/ext/standard/tests/array/uasort_variation8.phpt b/ext/standard/tests/array/uasort_variation8.phpt
index 2bb2b46512..d27cd569c0 100644
--- a/ext/standard/tests/array/uasort_variation8.phpt
+++ b/ext/standard/tests/array/uasort_variation8.phpt
@@ -10,7 +10,6 @@ Test uasort() function : usage variations - built-in function as 'cmp_function'
/*
* Passing different built-in library functions in place of 'cmp_function'
* valid comparison functions: strcmp() & strcasecmp()
-* language constructs: echo & exit
*/
echo "*** Testing uasort() : built in function as 'cmp_function' ***\n";
@@ -28,13 +27,6 @@ echo "-- Testing uasort() with built-in 'cmp_function': strcmp() --\n";
var_dump( uasort($array_arg, 'strcmp') ); // expecting: bool(true)
var_dump($array_arg);
-// Testing with language construct as comparison function
-echo "-- Testing uasort() with language construct as 'cmp_function' --\n";
-var_dump( uasort($languageConstruct_fun_arg, 'echo') ); // expecting: bool(false)
-
-echo "-- Testing uasort() with language construct as 'cmp_function' --\n";
-var_dump( uasort($languageConstruct_fun_arg, 'exit') ); // expecting: bool(false)
-
echo "Done"
?>
--EXPECTF--
@@ -67,12 +59,4 @@ array(5) {
["o"]=>
string(6) "orange"
}
--- Testing uasort() with language construct as 'cmp_function' --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
--- Testing uasort() with language construct as 'cmp_function' --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/array/usort_basic.phpt b/ext/standard/tests/array/usort_basic.phpt
index f5a8e7579d..36add207cf 100644
--- a/ext/standard/tests/array/usort_basic.phpt
+++ b/ext/standard/tests/array/usort_basic.phpt
@@ -53,7 +53,6 @@ echo "\n-- Associative array with string keys --\n";
var_dump( usort($string_key_arg, 'cmp') );
var_dump($string_key_arg);
?>
-===DONE===
--EXPECT--
*** Testing usort() : basic functionality ***
@@ -116,4 +115,3 @@ array(4) {
[3]=>
int(10)
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_object1.phpt b/ext/standard/tests/array/usort_object1.phpt
index 18ca31890e..c1e20b181c 100644
--- a/ext/standard/tests/array/usort_object1.phpt
+++ b/ext/standard/tests/array/usort_object1.phpt
@@ -82,7 +82,6 @@ $array_arg = array(
var_dump( usort($array_arg, 'multiple_cmp') );
var_dump($array_arg);
?>
-===DONE===
--EXPECTF--
*** Testing usort() : object functionality ***
bool(true)
@@ -138,4 +137,3 @@ array(3) {
string(5) "apple"
}
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_object2.phpt b/ext/standard/tests/array/usort_object2.phpt
index e0c41936d5..915c3755bc 100644
--- a/ext/standard/tests/array/usort_object2.phpt
+++ b/ext/standard/tests/array/usort_object2.phpt
@@ -95,7 +95,6 @@ $array_arg = array(
var_dump( usort($array_arg, 'cmp_function') );
var_dump($array_arg);
?>
-===DONE===
--EXPECTF--
*** Testing usort() : object functionality ***
-- Testing usort() with StaticClass objects --
@@ -162,4 +161,3 @@ array(4) {
NULL
}
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation10.phpt b/ext/standard/tests/array/usort_variation10.phpt
index be5a1b0969..6985c0ac55 100644
--- a/ext/standard/tests/array/usort_variation10.phpt
+++ b/ext/standard/tests/array/usort_variation10.phpt
@@ -41,7 +41,6 @@ echo "\n-- Array with default/assigned keys --\n";
var_dump( usort($array_arg, 'cmp') );
var_dump($array_arg);
?>
-===DONE===
--EXPECT--
*** Testing usort() : usage variation ***
@@ -76,4 +75,3 @@ array(4) {
[3]=>
string(9) "Pineapple"
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation3.phpt b/ext/standard/tests/array/usort_variation3.phpt
index 88ae8afe4b..0d83d5e2d6 100644
--- a/ext/standard/tests/array/usort_variation3.phpt
+++ b/ext/standard/tests/array/usort_variation3.phpt
@@ -74,7 +74,6 @@ var_dump( usort($array_arg, 'cmp_function') );
echo "\n-- Sorted array after usort() function call --\n";
var_dump($array_arg);
?>
-===DONE===
--EXPECT--
*** Testing usort() : usage variation ***
bool(true)
@@ -112,4 +111,3 @@ array(15) {
[14]=>
int(0)
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation4.phpt b/ext/standard/tests/array/usort_variation4.phpt
index 1335279708..e4365207a3 100644
--- a/ext/standard/tests/array/usort_variation4.phpt
+++ b/ext/standard/tests/array/usort_variation4.phpt
@@ -66,7 +66,6 @@ echo "\n-- Sorting empty array --\n";
var_dump( usort($empty_array, 'cmp_function') );
var_dump($empty_array);
?>
-===DONE===
--EXPECT--
*** Testing usort() : usage variation ***
@@ -152,4 +151,3 @@ array(7) {
bool(true)
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation5.phpt b/ext/standard/tests/array/usort_variation5.phpt
index 2fd3f24ae1..2757054ead 100644
--- a/ext/standard/tests/array/usort_variation5.phpt
+++ b/ext/standard/tests/array/usort_variation5.phpt
@@ -73,7 +73,6 @@ echo "\n-- Sorting Heredoc String values --\n";
var_dump( usort($heredoc_values, 'cmp_function') );
var_dump($heredoc_values);
?>
-===DONE===
--EXPECTF--
*** Testing usort() : usage variation ***
@@ -140,4 +139,3 @@ array(4) {
string(%d) "heredoc string with!@# and 123
Test this!!!"
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation6.phpt b/ext/standard/tests/array/usort_variation6.phpt
index 473f61a0dd..1916ded151 100644
--- a/ext/standard/tests/array/usort_variation6.phpt
+++ b/ext/standard/tests/array/usort_variation6.phpt
@@ -53,7 +53,6 @@ var_dump( usort($array_args[5], 'cmp_function') );
echo "-- Array after call to usort() --\n";
var_dump($array_args[5]);
?>
-===DONE===
--EXPECT--
*** Testing usort() : usage variation ***
@@ -136,4 +135,3 @@ array(5) {
[4]=>
int(54)
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation7.phpt b/ext/standard/tests/array/usort_variation7.phpt
index a493ac752c..bf554bce1d 100644
--- a/ext/standard/tests/array/usort_variation7.phpt
+++ b/ext/standard/tests/array/usort_variation7.phpt
@@ -37,7 +37,6 @@ echo "\n-- Anonymous 'cmp_function' with parameters passed by reference --\n";
var_dump( usort($array_arg, $cmp_function) );
var_dump($array_arg);
?>
-===DONE===
--EXPECT--
*** Testing usort() : usage variation ***
@@ -68,4 +67,3 @@ array(4) {
[3]=>
string(9) "Pineapple"
}
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation8.phpt b/ext/standard/tests/array/usort_variation8.phpt
index 3296c4a36a..55ff362d41 100644
--- a/ext/standard/tests/array/usort_variation8.phpt
+++ b/ext/standard/tests/array/usort_variation8.phpt
@@ -30,16 +30,7 @@ $temp_array2 = $array_arg;
var_dump( usort($temp_array2, 'strcmp') );
var_dump($temp_array2);
-// Testing with language construct as comparison function
-echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
-$temp_array3 = $array_arg;
-var_dump( usort($temp_array3, 'echo') );
-
-echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
-$temp_array4 = $array_arg;
-var_dump( usort($temp_array4, 'exit') );
?>
-===DONE===
--EXPECTF--
*** Testing usort() : usage variation ***
@@ -72,14 +63,3 @@ array(5) {
[4]=>
string(6) "orange"
}
-
--- Testing usort() with language construct as 'cmp_function' --
-
-Warning: usort() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-
--- Testing usort() with language construct as 'cmp_function' --
-
-Warning: usort() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/array/usort_variation9.phpt b/ext/standard/tests/array/usort_variation9.phpt
index 8035c57b13..6c7f511b1f 100644
--- a/ext/standard/tests/array/usort_variation9.phpt
+++ b/ext/standard/tests/array/usort_variation9.phpt
@@ -45,7 +45,6 @@ echo "\n-- Sorting \$array_arg containing different references --\n";
var_dump( usort($array_arg, 'cmp_function') );
var_dump($array_arg);
?>
-===DONE===
--EXPECT--
*** Testing usort() : usage variation ***
@@ -63,4 +62,3 @@ array(5) {
[4]=>
int(200)
}
-===DONE===
diff --git a/ext/standard/tests/assert/assert.phpt b/ext/standard/tests/assert/assert.phpt
index 08e1188d60..71b0649141 100644
--- a/ext/standard/tests/assert/assert.phpt
+++ b/ext/standard/tests/assert/assert.phpt
@@ -1,44 +1,41 @@
--TEST--
assert()
--INI--
-error_reporting = 2039
assert.active = 0
assert.warning = 1
assert.callback =
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
-function a($file,$line,$myev)
+function a($file, $line, $unused, $desc)
{
- echo "assertion failed $line,\"$myev\"\n";
+ echo "assertion failed $line,\"$desc\"\n";
}
class a
{
- function assert($file,$line,$myev)
+ static function assert($file, $line, $unused, $desc)
{
- echo "class assertion failed $line,\"$myev\"\n";
+ echo "class assertion failed $line,\"$desc\"\n";
}
}
assert_options(ASSERT_ACTIVE,1);
-assert_options(ASSERT_QUIET_EVAL,1);
assert_options(ASSERT_WARNING,0);
$a = 0;
assert_options(ASSERT_CALLBACK,"a");
-assert('$a != 0');
+assert($a != 0);
assert_options(ASSERT_CALLBACK,array("a","assert"));
-assert('$a != 0');
+assert($a != 0);
$obj = new a();
assert_options(ASSERT_CALLBACK,array(&$obj,"assert"));
-assert('$a != 0');
+assert($a != 0);
?>
--EXPECT--
-assertion failed 22,"$a != 0"
-class assertion failed 25,"$a != 0"
-class assertion failed 29,"$a != 0"
+assertion failed 21,"assert($a != 0)"
+class assertion failed 24,"assert($a != 0)"
+class assertion failed 28,"assert($a != 0)"
diff --git a/ext/standard/tests/assert/assert02.phpt b/ext/standard/tests/assert/assert02.phpt
deleted file mode 100644
index 85b72369cb..0000000000
--- a/ext/standard/tests/assert/assert02.phpt
+++ /dev/null
@@ -1,64 +0,0 @@
---TEST--
-catch assert() errors
---INI--
-assert.active=1
-assert.warning=1
-assert.callback=
-assert.bail=0
-assert.quiet_eval=0
---FILE--
-<?php
-
-assert(1);
-assert('1');
-assert('$a');
-
-try {
- assert('aa=sd+as+safsafasfasafsaf');
-} catch (Throwable $e) {
- echo $e->getMessage(), "\n";
-}
-
-assert('0');
-
-assert_options(ASSERT_BAIL, 1);
-
-try {
- assert('aa=sd+as+safsafasfasafsaf');
-} catch (Throwable $e) {
- echo $e->getMessage(), "\n";
-}
-
-echo "done\n";
-
-?>
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Notice: Undefined variable: a in %sassert02.php(%d) : assert code on line 1
-
-Warning: assert(): Assertion "$a" failed in %sassert02.php on line %d
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-Failure evaluating code:
-aa=sd+as+safsafasfasafsaf
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Warning: assert(): Assertion "0" failed in %sassert02.php on line %d
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Fatal error: Uncaught ParseError: syntax error, unexpected '=', expecting ';' in %s(%d) : assert code:1
-Stack trace:
-#0 %s(%d): assert('aa=sd+as+safsaf...')
-#1 {main}
-
-Next Error: Failure evaluating code:
-aa=sd+as+safsafasfasafsaf in %s:%d
-Stack trace:
-#0 %s(%d): assert('aa=sd+as+safsaf...')
-#1 {main}
- thrown in %s on line %d
diff --git a/ext/standard/tests/assert/assert03.phpt b/ext/standard/tests/assert/assert03.phpt
index 80c42df473..a15e936af3 100644
--- a/ext/standard/tests/assert/assert03.phpt
+++ b/ext/standard/tests/assert/assert03.phpt
@@ -5,38 +5,31 @@ assert.active = 1
assert.warning = 0
assert.callback =
assert.bail = 0
-assert.quiet_eval = 1
--FILE--
<?php
-function a($file,$line,$myev)
+function a($file, $line, $unused, $desc)
{
- echo "assertion failed - a - $line,\"$myev\"\n";
+ echo "assertion failed - a - $line,\"$desc\"\n";
}
-function b($file,$line,$myev)
+function b($file, $line, $unused, $desc)
{
- echo "assertion failed - b - $line,\"$myev\"\n";
+ echo "assertion failed - b - $line,\"$desc\"\n";
}
assert_options(ASSERT_ACTIVE,1);
-assert_options(ASSERT_QUIET_EVAL,1);
assert_options(ASSERT_WARNING,0);
$a = 0;
-assert_options(ASSERT_CALLBACK,"a");
-assert('$a != 0');
+assert_options(ASSERT_CALLBACK, "a");
+assert($a != 0);
/* Modify call back using ini_set() */
ini_set("assert.callback", "b");
-assert('$a != 0');
+assert($a != 0);
?>
-==DONE==
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-assertion failed - a - %d,"$a != 0"
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-assertion failed - b - %d,"$a != 0"
-==DONE==
+--EXPECT--
+assertion failed - a - 18,"assert($a != 0)"
+assertion failed - b - 22,"assert($a != 0)"
diff --git a/ext/standard/tests/assert/assert04.phpt b/ext/standard/tests/assert/assert04.phpt
index 0100229958..35f7668ce1 100644
--- a/ext/standard/tests/assert/assert04.phpt
+++ b/ext/standard/tests/assert/assert04.phpt
@@ -5,24 +5,14 @@ assert.active = 1
assert.warning = 1
assert.callback =
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
/* Assert not active */
assert_options(ASSERT_ACTIVE, 0);
assert(1);
-
/* Wrong parameter count in assert */
assert_options(ASSERT_ACTIVE, 1);
-assert(2, "failure", 3);
-
-/* Wrong parameter count in assert_options */
-assert_options(ASSERT_ACTIVE, 0, 2);
-
-/* Wrong parameter name in assert_options */
-$test="ASSERT_FRED";
-assert_options($test, 1);
/* Assert false */
assert(0);
@@ -36,12 +26,6 @@ echo "not reached\n";
?>
--EXPECTF--
-Warning: assert() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: assert_options() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: assert_options() expects parameter 1 to be int, string given in %s on line %d
-
Warning: assert(): assert(0) failed in %s on line %d
Warning: assert(): assert(0) failed in %s on line %d
diff --git a/ext/standard/tests/assert/assert_basic.phpt b/ext/standard/tests/assert/assert_basic.phpt
index 73b3e73206..ce53a17a61 100644
--- a/ext/standard/tests/assert/assert_basic.phpt
+++ b/ext/standard/tests/assert/assert_basic.phpt
@@ -5,29 +5,16 @@ assert.active = 1
assert.warning = 0
assert.callback = f1
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
function f1()
{
echo "f1 called\n";
}
-//String assert
-$sa = "0 != 0";
-var_dump($r2=assert($sa));
-$sa = "0 == 0";
-var_dump($r2=assert($sa));
-//Non string assert
-var_dump($r2=assert(0));
-var_dump($r2=assert(1));
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-f1 called
-bool(false)
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-bool(true)
+var_dump($r2 = assert(0));
+var_dump($r2 = assert(1));
+--EXPECT--
f1 called
bool(false)
bool(true)
diff --git a/ext/standard/tests/assert/assert_basic1.phpt b/ext/standard/tests/assert/assert_basic1.phpt
index a5bcda3316..cd4a5601ab 100644
--- a/ext/standard/tests/assert/assert_basic1.phpt
+++ b/ext/standard/tests/assert/assert_basic1.phpt
@@ -5,7 +5,6 @@ assert.active = 0
assert.warning = 0
assert.callback = f1
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
function f1()
@@ -13,17 +12,9 @@ function f1()
echo "f1 called\n";
}
-//String assert
-$sa = "0 != 0";
-var_dump($r2=assert($sa));
-$sa = "0 == 0";
-var_dump($r2=assert($sa));
-
-//Non string assert
var_dump($r2=assert(0));
var_dump($r2=assert(1));
+?>
--EXPECT--
bool(true)
bool(true)
-bool(true)
-bool(true)
diff --git a/ext/standard/tests/assert/assert_basic2.phpt b/ext/standard/tests/assert/assert_basic2.phpt
index d6c150d0d0..052e7d4e89 100644
--- a/ext/standard/tests/assert/assert_basic2.phpt
+++ b/ext/standard/tests/assert/assert_basic2.phpt
@@ -5,7 +5,6 @@ assert.active = 1
assert.warning = 1
assert.callback=f1
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
function f2()
diff --git a/ext/standard/tests/assert/assert_basic3.phpt b/ext/standard/tests/assert/assert_basic3.phpt
index a7fd990cbe..87103cbfbb 100644
--- a/ext/standard/tests/assert/assert_basic3.phpt
+++ b/ext/standard/tests/assert/assert_basic3.phpt
@@ -4,7 +4,6 @@ assert() - basic - Test that bailout works
assert.active = 1
assert.warning = 1
assert.callback = f1
-assert.quiet_eval = 1
assert.bail = 0
--FILE--
<?php
@@ -15,13 +14,10 @@ function f1()
//bail out on error
var_dump($rao=assert_options(ASSERT_BAIL, 1));
-$sa = "0 != 0";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo "If this is printed BAIL hasn't worked";
--EXPECTF--
int(0)
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
f1 called
-Warning: assert(): assert($sa): "0 != 0" failed in %s on line 10
+Warning: assert(): assert(0 != 0) failed in %s on line %d
diff --git a/ext/standard/tests/assert/assert_basic4.phpt b/ext/standard/tests/assert/assert_basic4.phpt
index 4e78cf9ec1..289c51860e 100644
--- a/ext/standard/tests/assert/assert_basic4.phpt
+++ b/ext/standard/tests/assert/assert_basic4.phpt
@@ -4,7 +4,6 @@ assert() - basic - test initial values using ini.get and assert_options
assert.active = 0
assert.warning = 0
assert.bail = 0
-assert.quiet_eval = 0
assert.callback = f1
--FILE--
<?php
@@ -14,23 +13,19 @@ assert.callback = f1
echo "Initial values: assert_options(ASSERT_ACTIVE) => [".assert_options(ASSERT_ACTIVE)."]\n";
echo "Initial values: assert_options(ASSERT_WARNING) => [".assert_options(ASSERT_WARNING)."]\n";
echo "Initial values: assert_options(ASSERT_BAIL) => [".assert_options(ASSERT_BAIL)."]\n";
-echo "Initial values: assert_options(ASSERT_QUIET_EVAL) => [".assert_options(ASSERT_QUIET_EVAL)."]\n";
echo "Initial values: assert_options(ASSERT_CALLBACK) => [".assert_options(ASSERT_CALLBACK)."]\n";
//Using ini.get;
echo "Initial values: ini.get(\"assert.active\") => [".ini_get("assert.active")."]\n";
echo "Initial values: ini.get(\"assert.warning\") => [".ini_get("assert.warning")."]\n";
echo "Initial values: ini.get(\"assert.bail\") => [".ini_get("assert.bail")."]\n";
-echo "Initial values: ini.get(\"assert.quiet_eval\") => [".ini_get("assert.quiet_eval")."]\n";
echo "Initial values: ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n";
--EXPECT--
Initial values: assert_options(ASSERT_ACTIVE) => [0]
Initial values: assert_options(ASSERT_WARNING) => [0]
Initial values: assert_options(ASSERT_BAIL) => [0]
-Initial values: assert_options(ASSERT_QUIET_EVAL) => [0]
Initial values: assert_options(ASSERT_CALLBACK) => [f1]
Initial values: ini.get("assert.active") => [0]
Initial values: ini.get("assert.warning") => [0]
Initial values: ini.get("assert.bail") => [0]
-Initial values: ini.get("assert.quiet_eval") => [0]
Initial values: ini.get("assert.callback") => [f1]
diff --git a/ext/standard/tests/assert/assert_basic5.phpt b/ext/standard/tests/assert/assert_basic5.phpt
index f4943cdf16..cf2ed6ded3 100644
--- a/ext/standard/tests/assert/assert_basic5.phpt
+++ b/ext/standard/tests/assert/assert_basic5.phpt
@@ -5,7 +5,6 @@ assert.active = 1
assert.warning = 0
assert.callback = f1
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
function f1()
@@ -15,22 +14,16 @@ function f1()
//switch warning on and test return value
var_dump($rao=assert_options(ASSERT_WARNING, 1));
-$sa = "0 != 0";
-var_dump($r2=assert($sa));
-$sa = "0 == 0";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
+var_dump($r2=assert(0 == 0));
//switch warning on and test return value
var_dump($rao=assert_options(ASSERT_WARNING, 0));
--EXPECTF--
int(0)
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
f1 called
-Warning: assert(): assert($sa): "0 != 0" failed in %s on line 10
+Warning: assert(): assert(0 != 0) failed in %s on line %d
bool(false)
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
bool(true)
int(1)
diff --git a/ext/standard/tests/assert/assert_basic6.phpt b/ext/standard/tests/assert/assert_basic6.phpt
deleted file mode 100644
index 216c85c94b..0000000000
--- a/ext/standard/tests/assert/assert_basic6.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-assert() - basic - Test that bailout works
---INI--
-assert.active = 1
-assert.warning = 1
-assert.callback = f1
-assert.quiet_eval = 1
-assert.bail = 0
---FILE--
-<?php
-function f1($message)
-{
- echo "f1 called\n";
-}
-
-//bail out on error
-var_dump($rao = assert_options(ASSERT_BAIL, 1));
-$sa = "0 != 0";
-var_dump($r2 = assert($sa, "0 is 0"));
-echo "If this is printed BAIL hasn't worked";
---EXPECTF--
-int(0)
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-f1 called
-
-Warning: assert(): 0 is 0: "0 != 0" failed in %s on line 10
diff --git a/ext/standard/tests/assert/assert_closures.phpt b/ext/standard/tests/assert/assert_closures.phpt
index 4a013283a8..13a7e5415e 100644
--- a/ext/standard/tests/assert/assert_closures.phpt
+++ b/ext/standard/tests/assert/assert_closures.phpt
@@ -4,7 +4,6 @@ assert() - basic - accept closures as callback.
assert.active = 1
assert.warning = 1
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
assert_options(ASSERT_CALLBACK, function () { echo "Hello World!\n"; });
diff --git a/ext/standard/tests/assert/assert_error.phpt b/ext/standard/tests/assert/assert_error.phpt
deleted file mode 100644
index 6e04060765..0000000000
--- a/ext/standard/tests/assert/assert_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-assert() - error - give assert nonsense string with quiet_eval on then off
---INI--
-assert.active = 1
-assert.warning = 1
-assert.callback = f1
-assert.bail = 0
-assert.quiet_eval = 0
---FILE--
-<?php
-function f1()
-{
- echo "f1 called\n";
-}
-
-$sa = "threemeninaboat";
-
-var_dump($r2=assert($sa));
-
-var_dump($ra0 = assert_options(ASSERT_QUIET_EVAL, 1));
-
-var_dump($r2=assert($sa));
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Warning: Use of undefined constant threemeninaboat - assumed 'threemeninaboat' (this will throw an Error in a future version of PHP) in %s(9) : assert code on line 1
-bool(true)
-int(0)
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-bool(true)
diff --git a/ext/standard/tests/assert/assert_error2.phpt b/ext/standard/tests/assert/assert_error2.phpt
index d1b6f1745f..de00743b1b 100644
--- a/ext/standard/tests/assert/assert_error2.phpt
+++ b/ext/standard/tests/assert/assert_error2.phpt
@@ -4,7 +4,6 @@ assert() - basic - Test that bailout works
assert.active = 1
assert.warning = 1
assert.callback = f1
-assert.quiet_eval = 1
assert.bail = 0
error_reporting = -1
display_errors = 1
@@ -17,18 +16,10 @@ function f1($script, $line, $message, $user_message)
//bail out on error
var_dump($rao = assert_options(ASSERT_BAIL, 1));
-var_dump($r2 = assert("0 != 0"));
+var_dump($r2 = assert(0 != 0));
echo "If this is printed BAIL hasn't worked";
--EXPECTF--
int(0)
+f1 called
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Warning: assert(): Assertion "0 != 0" failed in %s on line 9
-
-Fatal error: Uncaught ArgumentCountError: Too few arguments to function f1(), 3 passed and exactly 4 expected in %sassert_error2.php:2
-Stack trace:
-#0 [internal function]: f1('%s', 9, '0 != 0')
-#1 %sassert_error2.php(9): assert('0 != 0')
-#2 {main}
- thrown in %sassert_error2.php on line 2
+Warning: assert(): assert(0 != 0) failed in %s on line %d
diff --git a/ext/standard/tests/assert/assert_error3.phpt b/ext/standard/tests/assert/assert_error3.phpt
deleted file mode 100644
index 24538f4b04..0000000000
--- a/ext/standard/tests/assert/assert_error3.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-assert() - basic - Test recoverable error
---INI--
-assert.active = 1
-assert.warning = 1
-assert.callback = f1
-assert.quiet_eval = 0
-assert.bail = 0
-error_reporting = -1
-display_errors = 1
---FILE--
-<?php
-var_dump($r2 = assert("0 $ 0"));
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Fatal error: Uncaught ParseError: syntax error, unexpected '$', expecting ';' in %s(%d) : assert code:1
-Stack trace:
-#0 %s(%d): assert('0 $ 0')
-#1 {main}
-
-Next Error: Failure evaluating code:
-0 $ 0 in %s:%d
-Stack trace:
-#0 %s(%d): assert('0 $ 0')
-#1 {main}
- thrown in %s on line %d
diff --git a/ext/standard/tests/assert/assert_error4.phpt b/ext/standard/tests/assert/assert_error4.phpt
deleted file mode 100644
index 59b4df6935..0000000000
--- a/ext/standard/tests/assert/assert_error4.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-assert() - basic - Test recoverable error
---INI--
-assert.active = 1
-assert.warning = 1
-assert.callback = f1
-assert.quiet_eval = 0
-assert.bail = 0
-error_reporting = -1
-display_errors = 1
---FILE--
-<?php
-$sa = "0 $ 0";
-var_dump($r2 = assert($sa, "Describing what was asserted"));
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Fatal error: Uncaught ParseError: syntax error, unexpected '$', expecting ';' in %s(%d) : assert code:1
-Stack trace:
-#0 %s(%d): assert('0 $ 0', 'Describing what...')
-#1 {main}
-
-Next Error: Failure evaluating code:
-Describing what was asserted:"0 $ 0" in %s:%d
-Stack trace:
-#0 %s(%d): assert('0 $ 0', 'Describing what...')
-#1 {main}
- thrown in %s on line %d
diff --git a/ext/standard/tests/assert/assert_options_error.phpt b/ext/standard/tests/assert/assert_options_error.phpt
new file mode 100644
index 0000000000..0b50370b6c
--- /dev/null
+++ b/ext/standard/tests/assert/assert_options_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+assert_options() - unknown assert option.
+
+--FILE--
+<?php
+try {
+ assert_options(1000);
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECT--
+Unknown value 1000 \ No newline at end of file
diff --git a/ext/standard/tests/assert/assert_variation.phpt b/ext/standard/tests/assert/assert_variation.phpt
index 023f6690c5..d0cb90ff66 100644
--- a/ext/standard/tests/assert/assert_variation.phpt
+++ b/ext/standard/tests/assert/assert_variation.phpt
@@ -5,7 +5,6 @@ assert.active = 1
assert.warning = 0
assert.callback = f1
assert.bail = 0
-assert.quiet_eval = 0
--FILE--
<?php
function f1()
@@ -22,29 +21,28 @@ function f3()
}
class c1
{
- function assert($file, $line, $myev)
+ static function assert($file, $line, $unused, $desc)
{
- echo "Class assertion failed $line, \"$myev\"\n";
+ echo "Class assertion failed $line, \"$desc\"\n";
}
}
echo "Initial values: assert_options(ASSERT_CALLBACK) => [".assert_options(ASSERT_CALLBACK)."]\n";
echo "Initial values: ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
-$sa = "0 != 0";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo"\n";
echo "Change callback function using ini.set and test return value \n";
var_dump($rv = ini_set("assert.callback","f2"));
echo "assert_options(ASSERT_CALLBACK) => [".assert_options(ASSERT_CALLBACK)."]\n";
echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo"\n";
echo "Change callback function using assert_options and test return value \n";
var_dump($rv=assert_options(ASSERT_CALLBACK, "f3"));
echo "assert_options(ASSERT_CALLBACK) => [".assert_options(ASSERT_CALLBACK)."]\n";
echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo"\n";
@@ -52,14 +50,14 @@ echo "Reset the name of the callback routine to a class method and check that it
var_dump($rc=assert_options(ASSERT_CALLBACK, "c1"));
echo "assert_options(ASSERT_CALLBACK) => [".assert_options(ASSERT_CALLBACK)."]\n";
echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo"\n";
echo "Reset callback options to use a class method \n";
var_dump($rc = assert_options(ASSERT_CALLBACK,array("c1","assert")));
var_dump($rao=assert_options(ASSERT_CALLBACK));
echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo"\n";
echo "Reset callback options to use an object method \n";
@@ -67,13 +65,11 @@ $o = new c1();
var_dump($rc=assert_options(ASSERT_CALLBACK,array(&$o,"assert")));
var_dump($rao=assert_options(ASSERT_CALLBACK));
echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n";
-var_dump($r2=assert($sa));
+var_dump($r2=assert(0 != 0));
echo"\n";
--EXPECTF--
Initial values: assert_options(ASSERT_CALLBACK) => [f1]
Initial values: ini.get("assert.callback") => [f1]
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
f1 called
bool(false)
@@ -81,8 +77,6 @@ Change callback function using ini.set and test return value
string(2) "f1"
assert_options(ASSERT_CALLBACK) => [f2]
ini.get("assert.callback") => [f2]
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
f2 called
bool(false)
@@ -90,8 +84,6 @@ Change callback function using assert_options and test return value
string(2) "f2"
assert_options(ASSERT_CALLBACK) => [f3]
ini.get("assert.callback") => [f2]
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
f3 called
bool(false)
@@ -99,8 +91,6 @@ Reset the name of the callback routine to a class method and check that it works
string(2) "f3"
assert_options(ASSERT_CALLBACK) => [c1]
ini.get("assert.callback") => [f2]
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
bool(false)
Reset callback options to use a class method
@@ -113,11 +103,7 @@ array(2) {
}
ini.get("assert.callback") => [f2]
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-
-Deprecated: Non-static method c1::assert() should not be called statically in %s on line 53
-Class assertion failed 53, "0 != 0"
+Class assertion failed 52, "assert(0 != 0)"
bool(false)
Reset callback options to use an object method
@@ -136,7 +122,5 @@ array(2) {
}
ini.get("assert.callback") => [f2]
-
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-Class assertion failed 61, "0 != 0"
+Class assertion failed 60, "assert(0 != 0)"
bool(false)
diff --git a/ext/standard/tests/assert/bug73303.phpt b/ext/standard/tests/assert/bug73303.phpt
deleted file mode 100644
index 7264f5a322..0000000000
--- a/ext/standard/tests/assert/bug73303.phpt
+++ /dev/null
@@ -1,24 +0,0 @@
---TEST--
-Bug #73303: Scope not inherited by eval in assert()
---FILE--
-<?php
-
-class Test {
- public $prop;
-
- public function main(){
- assert('self::checkCacheKey(get_object_vars($this))');
- echo 'Success';
- }
- private static function checkCacheKey($obj_properties){
- return count($obj_properties) == 1;
- }
-}
-
-$obj = new Test();
-$obj->main();
-
-?>
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
-Success
diff --git a/ext/standard/tests/bug64370_var1.phpt b/ext/standard/tests/bug64370_var1.phpt
index 87172c9b60..16d1ce3365 100644
--- a/ext/standard/tests/bug64370_var1.phpt
+++ b/ext/standard/tests/bug64370_var1.phpt
@@ -10,7 +10,6 @@ $d = (microtime(true)-$_SERVER['REQUEST_TIME_FLOAT'])*1000;
echo "created in $d ms\n";
echo ((bool)($d >= 0)) . "\n";
?>
-===DONE===
--EXPECTF--
$_SERVER['REQUEST_TIME']: %d
$_SERVER['REQUEST_TIME_FLOAT']: %f
@@ -18,4 +17,3 @@ time(): %d
microtime(true): %f
created in %f ms
1
-===DONE===
diff --git a/ext/standard/tests/bug64370_var2.phpt b/ext/standard/tests/bug64370_var2.phpt
index d0d3590ea7..3618a46980 100644
--- a/ext/standard/tests/bug64370_var2.phpt
+++ b/ext/standard/tests/bug64370_var2.phpt
@@ -17,7 +17,5 @@ while(100000 > $i++) {
}
echo "ok\n";
?>
-===DONE===
--EXPECT--
ok
-===DONE===
diff --git a/ext/standard/tests/class_object/forward_static_call_001.phpt b/ext/standard/tests/class_object/forward_static_call_001.phpt
index 0fac78f4ea..0eadad3d79 100644
--- a/ext/standard/tests/class_object/forward_static_call_001.phpt
+++ b/ext/standard/tests/class_object/forward_static_call_001.phpt
@@ -57,7 +57,6 @@ echo "-\n";
C::test3();
?>
-===DONE===
--EXPECT--
A
-
@@ -80,4 +79,3 @@ C
-
B
C
-===DONE===
diff --git a/ext/standard/tests/class_object/forward_static_call_003.phpt b/ext/standard/tests/class_object/forward_static_call_003.phpt
index ea56f8d2e7..8a846fe3da 100644
--- a/ext/standard/tests/class_object/forward_static_call_003.phpt
+++ b/ext/standard/tests/class_object/forward_static_call_003.phpt
@@ -38,7 +38,6 @@ echo "-\n";
C::test();
?>
-===DONE===
--EXPECT--
A
-
@@ -48,4 +47,3 @@ B
C
B
B
-===DONE===
diff --git a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt
index dd852ef61f..2e2e1657af 100644
--- a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt
+++ b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt
@@ -9,8 +9,8 @@ Test get_class_methods() function : usage variations - unexpected types
*/
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
@@ -81,10 +81,10 @@ foreach($values as $value) {
};
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing get_class_methods() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(67)
-Error: 8 - Undefined variable: unset_var, %s(70)
+Error: 2 - Undefined variable: undefined_var
+Error: 2 - Undefined variable: unset_var
Arg value 0
NULL
@@ -112,23 +112,23 @@ NULL
Arg value 0.5
NULL
-Error: 8 - Array to string conversion, %sget_class_methods_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
NULL
-Error: 8 - Array to string conversion, %sget_class_methods_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
NULL
-Error: 8 - Array to string conversion, %sget_class_methods_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
NULL
-Error: 8 - Array to string conversion, %sget_class_methods_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
NULL
-Error: 8 - Array to string conversion, %sget_class_methods_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
NULL
diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt
index b142f8ace9..87a9eac6c3 100644
--- a/ext/standard/tests/class_object/get_class_variation_001.phpt
+++ b/ext/standard/tests/class_object/get_class_variation_001.phpt
@@ -67,8 +67,12 @@ $values = array(
// loop through each element of the array for object
foreach($values as $value) {
- echo @"\nArg value: $value (type: " . gettype($value) . ")\n";
- var_dump( get_class($value) );
+ echo @"\nArg value: $value (type: " . gettype($value) . ")\n";
+ try {
+ var_dump( get_class($value) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
echo "Done";
@@ -76,137 +80,85 @@ echo "Done";
--EXPECTF--
*** Testing get_class() : usage variations ***
-Notice: Undefined variable: undefined_var in %sget_class_variation_001.php on line 58
+Warning: Undefined variable: undefined_var in %s on line %d
-Notice: Undefined variable: unset_var in %sget_class_variation_001.php on line 61
+Warning: Undefined variable: unset_var in %s on line %d
Arg value: 0 (type: integer)
-
-Warning: get_class() expects parameter 1 to be object, int given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, int given
Arg value: 1 (type: integer)
-
-Warning: get_class() expects parameter 1 to be object, int given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, int given
Arg value: 12345 (type: integer)
-
-Warning: get_class() expects parameter 1 to be object, int given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, int given
Arg value: -2345 (type: integer)
-
-Warning: get_class() expects parameter 1 to be object, int given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, int given
Arg value: 10.5 (type: double)
-
-Warning: get_class() expects parameter 1 to be object, float given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, float given
Arg value: -10.5 (type: double)
-
-Warning: get_class() expects parameter 1 to be object, float given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, float given
Arg value: 101234567000 (type: double)
-
-Warning: get_class() expects parameter 1 to be object, float given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, float given
Arg value: 1.07654321E-9 (type: double)
-
-Warning: get_class() expects parameter 1 to be object, float given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, float given
Arg value: 0.5 (type: double)
-
-Warning: get_class() expects parameter 1 to be object, float given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, float given
Arg value: Array (type: array)
-
-Warning: get_class() expects parameter 1 to be object, array given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, array given
Arg value: Array (type: array)
-
-Warning: get_class() expects parameter 1 to be object, array given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, array given
Arg value: Array (type: array)
-
-Warning: get_class() expects parameter 1 to be object, array given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, array given
Arg value: Array (type: array)
-
-Warning: get_class() expects parameter 1 to be object, array given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, array given
Arg value: Array (type: array)
-
-Warning: get_class() expects parameter 1 to be object, array given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, array given
Arg value: (type: NULL)
-
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-bool(false)
+get_class() expects parameter 1 to be object, null given
Arg value: (type: NULL)
-
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-bool(false)
+get_class() expects parameter 1 to be object, null given
Arg value: 1 (type: boolean)
-
-Warning: get_class() expects parameter 1 to be object, bool given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, bool given
Arg value: (type: boolean)
-
-Warning: get_class() expects parameter 1 to be object, bool given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, bool given
Arg value: 1 (type: boolean)
-
-Warning: get_class() expects parameter 1 to be object, bool given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, bool given
Arg value: (type: boolean)
-
-Warning: get_class() expects parameter 1 to be object, bool given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, bool given
Arg value: (type: string)
-
-Warning: get_class() expects parameter 1 to be object, string given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, string given
Arg value: (type: string)
-
-Warning: get_class() expects parameter 1 to be object, string given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, string given
Arg value: string (type: string)
-
-Warning: get_class() expects parameter 1 to be object, string given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, string given
Arg value: string (type: string)
-
-Warning: get_class() expects parameter 1 to be object, string given in %sget_class_variation_001.php on line %d
-bool(false)
+get_class() expects parameter 1 to be object, string given
Arg value: (type: NULL)
-
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-bool(false)
+get_class() expects parameter 1 to be object, null given
Arg value: (type: NULL)
-
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-bool(false)
+get_class() expects parameter 1 to be object, null given
Done
diff --git a/ext/standard/tests/class_object/get_class_vars_variation2.phpt b/ext/standard/tests/class_object/get_class_vars_variation2.phpt
index 0e54864b09..9745c33b0e 100644
--- a/ext/standard/tests/class_object/get_class_vars_variation2.phpt
+++ b/ext/standard/tests/class_object/get_class_vars_variation2.phpt
@@ -74,7 +74,6 @@ $child->test();
echo "\n-- From a child's static context --\n";
Child::testStatic();
?>
-===DONE===
--EXPECT--
*** Testing get_class_vars() : testing visibility
@@ -165,4 +164,3 @@ array(4) {
["prots"]=>
string(20) "protected static var"
}
-===DONE===
diff --git a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt
index 0ad5756837..2aaa93fa8a 100644
--- a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt
+++ b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt
@@ -12,8 +12,8 @@ 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";
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
@@ -83,10 +83,10 @@ foreach($values as $value) {
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing get_parent_class() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(68)
-Error: 8 - Undefined variable: unset_var, %s(71)
+Error: 2 - Undefined variable: undefined_var
+Error: 2 - Undefined variable: unset_var
Arg value 0
bool(false)
@@ -114,23 +114,23 @@ bool(false)
Arg value 0.5
bool(false)
-Error: 8 - Array to string conversion, %sget_parent_class_variation_002.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sget_parent_class_variation_002.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sget_parent_class_variation_002.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sget_parent_class_variation_002.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sget_parent_class_variation_002.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
diff --git a/ext/standard/tests/class_object/is_a_variation_001.phpt b/ext/standard/tests/class_object/is_a_variation_001.phpt
index 563195cd0c..e9dfe0db6d 100644
--- a/ext/standard/tests/class_object/is_a_variation_001.phpt
+++ b/ext/standard/tests/class_object/is_a_variation_001.phpt
@@ -77,9 +77,9 @@ echo "Done";
--EXPECTF--
*** Testing is_a() : usage variations ***
-Notice: Undefined variable: undefined_var in %s on line 59
+Warning: Undefined variable: undefined_var in %s on line %d
-Notice: Undefined variable: unset_var in %s on line 62
+Warning: Undefined variable: unset_var in %s on line %d
Arg value 0
bool(false)
diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt
index d65bfcbc26..961ae96287 100644
--- a/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt
+++ b/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt
@@ -12,8 +12,8 @@ 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";
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
@@ -84,10 +84,10 @@ foreach($values as $value) {
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing is_subclass_of() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(69)
-Error: 8 - Undefined variable: unset_var, %s(72)
+Error: 2 - Undefined variable: undefined_var
+Error: 2 - Undefined variable: unset_var
Arg value 0
bool(false)
@@ -115,23 +115,23 @@ bool(false)
Arg value 0.5
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt
index 0a4c575258..dba37cc3f4 100644
--- a/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt
+++ b/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt
@@ -12,8 +12,8 @@ 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";
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
@@ -84,10 +84,10 @@ foreach($values as $value) {
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing is_subclass_of() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(69)
-Error: 8 - Undefined variable: unset_var, %s(72)
+Error: 2 - Undefined variable: undefined_var
+Error: 2 - Undefined variable: unset_var
Arg value 0
bool(false)
@@ -115,23 +115,23 @@ bool(false)
Arg value 0.5
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
diff --git a/ext/standard/tests/class_object/method_exists_variation_001.phpt b/ext/standard/tests/class_object/method_exists_variation_001.phpt
index 4accebe20a..b975f81958 100644
--- a/ext/standard/tests/class_object/method_exists_variation_001.phpt
+++ b/ext/standard/tests/class_object/method_exists_variation_001.phpt
@@ -12,8 +12,8 @@ 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";
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
@@ -83,10 +83,10 @@ foreach($values as $value) {
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing method_exists() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(68)
-Error: 8 - Undefined variable: unset_var, %s(71)
+Error: 2 - Undefined variable: undefined_var
+Error: 2 - Undefined variable: unset_var
Arg value 0
bool(false)
@@ -114,23 +114,23 @@ bool(false)
Arg value 0.5
bool(false)
-Error: 8 - Array to string conversion, %smethod_exists_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %smethod_exists_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %smethod_exists_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %smethod_exists_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
-Error: 8 - Array to string conversion, %smethod_exists_variation_001.php(%d)
+Error: 2 - Array to string conversion
Arg value Array
bool(false)
diff --git a/ext/standard/tests/class_object/property_exists_error.phpt b/ext/standard/tests/class_object/property_exists_error.phpt
index 217a5c61f9..43f68badd1 100644
--- a/ext/standard/tests/class_object/property_exists_error.phpt
+++ b/ext/standard/tests/class_object/property_exists_error.phpt
@@ -10,38 +10,15 @@ Test property_exists() function : error conditions
echo "*** Testing property_exists() : error conditions ***\n";
-$object_or_class = "obj";
-$property_name = 'string_val';
-$extra_arg = 10;
-
-
-echo "\n-- Testing property_exists() function with more than expected no. of arguments --\n";
-var_dump( property_exists($object_or_class, $property_name, $extra_arg) );
-
-
-echo "\n-- Testing property_exists() function with less than expected no. of arguments --\n";
-var_dump( property_exists($object_or_class) );
-
echo "\n-- Testing property_exists() function with incorrect arguments --\n";
+$property_name = 'string_val';
var_dump( property_exists(10, $property_name) );
?>
-===DONE===
--EXPECTF--
*** Testing property_exists() : error conditions ***
--- Testing property_exists() function with more than expected no. of arguments --
-
-Warning: property_exists() expects exactly 2 parameters, 3 given in %sproperty_exists_error.php on line %d
-NULL
-
--- Testing property_exists() function with less than expected no. of arguments --
-
-Warning: property_exists() expects exactly 2 parameters, 1 given in %sproperty_exists_error.php on line %d
-NULL
-
-- Testing property_exists() function with incorrect arguments --
Warning: First parameter must either be an object or the name of an existing class in %sproperty_exists_error.php on line %d
NULL
-===DONE===
diff --git a/ext/standard/tests/class_object/property_exists_variation1.phpt b/ext/standard/tests/class_object/property_exists_variation1.phpt
index 4b0ce2baff..f32790a029 100644
--- a/ext/standard/tests/class_object/property_exists_variation1.phpt
+++ b/ext/standard/tests/class_object/property_exists_variation1.phpt
@@ -21,7 +21,6 @@ echo "\ntesting __get magic method\n";
var_dump(property_exists("AutoTest", "foo"));
?>
-===DONE===
--EXPECT--
*** Testing property_exists() : class auto loading ***
@@ -30,4 +29,3 @@ bool(true)
testing __get magic method
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/bug41693.phpt b/ext/standard/tests/dir/bug41693.phpt
new file mode 100644
index 0000000000..c42ca2faea
--- /dev/null
+++ b/ext/standard/tests/dir/bug41693.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #41693 (scandir() allows empty directory names)
+--FILE--
+<?php
+
+try {
+ var_dump(scandir(''));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+--EXPECT--
+Directory name cannot be empty
diff --git a/ext/standard/tests/dir/bug72625.phpt b/ext/standard/tests/dir/bug72625.phpt
index b64010fcd4..e3594414ad 100644
--- a/ext/standard/tests/dir/bug72625.phpt
+++ b/ext/standard/tests/dir/bug72625.phpt
@@ -40,7 +40,6 @@ while ($tmp > $base) {
}
?>
-===DONE===
--EXPECTF--
string(%d) "%s/_test/documents/projects/myproject/vendor/name/library/classpath"
bool(true)
@@ -50,4 +49,3 @@ string(%d) "%s/_test/documents/projects/myproject/vendor/name/library/classpath/
bool(true)
string(%d) "%s\_test\documents\projects\myproject\vendor\name\library\classpath"
string(%d) "%s/_test/documents/projects/myproject/vendor/name/library"
-===DONE===
diff --git a/ext/standard/tests/dir/chdir_basic-win32-mb.phpt b/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
index d2d590ff3c..680ff8bd3d 100644
--- a/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
@@ -40,7 +40,6 @@ echo "\n-- Testing chdir() with relative paths: --\n";
var_dump(chdir($level_two_dir_name));
var_dump(getcwd());
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/chdir_basic-win32-mb';
@@ -59,4 +58,3 @@ string(%d) "%sç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one"
-- Testing chdir() with relative paths: --
bool(true)
string(%d) "%sç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one%eç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_two"
-===DONE===
diff --git a/ext/standard/tests/dir/chdir_basic.phpt b/ext/standard/tests/dir/chdir_basic.phpt
index 6c96898dd8..6a216f0362 100644
--- a/ext/standard/tests/dir/chdir_basic.phpt
+++ b/ext/standard/tests/dir/chdir_basic.phpt
@@ -33,7 +33,6 @@ echo "\n-- Testing chdir() with relative paths: --\n";
var_dump(chdir($level1_two_dir_name));
var_dump(getcwd());
?>
-===DONE===
--CLEAN--
<?php
$file_path = __DIR__;
@@ -50,4 +49,3 @@ string(%d) "%slevel1_one"
-- Testing chdir() with relative paths: --
bool(true)
string(%d) "%slevel1_one%elevel1_two"
-===DONE===
diff --git a/ext/standard/tests/dir/chdir_error2-win32-mb.phpt b/ext/standard/tests/dir/chdir_error2-win32-mb.phpt
index 4f6272ce4f..403dcef574 100644
--- a/ext/standard/tests/dir/chdir_error2-win32-mb.phpt
+++ b/ext/standard/tests/dir/chdir_error2-win32-mb.phpt
@@ -23,10 +23,8 @@ $directory = __FILE__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™idonotexist';
var_dump(chdir($directory));
?>
-===DONE===
--EXPECTF--
*** Testing chdir() : error conditions ***
Warning: chdir(): %s (errno %d) in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/chdir_error2.phpt b/ext/standard/tests/dir/chdir_error2.phpt
index 6c322a2e3a..414ae1427c 100644
--- a/ext/standard/tests/dir/chdir_error2.phpt
+++ b/ext/standard/tests/dir/chdir_error2.phpt
@@ -17,10 +17,8 @@ $directory = __FILE__ . '/idonotexist';
var_dump(chdir($directory));
?>
-===DONE===
--EXPECTF--
*** Testing chdir() : error conditions ***
Warning: chdir(): %s (errno %d) in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt b/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
index 9b1d8f1e9c..9e1b2e9aa0 100644
--- a/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
+++ b/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
@@ -65,7 +65,6 @@ var_dump(chdir($level_two_dir_path));
var_dump(chdir("../../$level_one_dir_name"));
var_dump(getcwd());
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/chdir_variation2-win32-mb';
@@ -109,4 +108,3 @@ string(%d) "%sç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one%eç§ã¯ã‚¬ãƒ©ã‚¹ã‚’é
bool(true)
bool(true)
string(%d) "%sç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one"
-===DONE===
diff --git a/ext/standard/tests/dir/chdir_variation2.phpt b/ext/standard/tests/dir/chdir_variation2.phpt
index 7f9c3845ee..acab454ef6 100644
--- a/ext/standard/tests/dir/chdir_variation2.phpt
+++ b/ext/standard/tests/dir/chdir_variation2.phpt
@@ -59,7 +59,6 @@ var_dump(chdir("../../$level2_one_dir_name"));
var_dump(getcwd());
?>
-===DONE===
--CLEAN--
<?php
$file_path = __DIR__;
@@ -101,4 +100,3 @@ string(%d) "%slevel2_one%elevel2_two"
bool(true)
bool(true)
string(%d) "%slevel2_one"
-===DONE===
diff --git a/ext/standard/tests/dir/closedir_basic-win32-mb.phpt b/ext/standard/tests/dir/closedir_basic-win32-mb.phpt
index f74ac29952..dad5b2b657 100644
--- a/ext/standard/tests/dir/closedir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/closedir_basic-win32-mb.phpt
@@ -40,7 +40,6 @@ var_dump(closedir($dh2));
echo "-- Check Directory Handle: --\n";
var_dump($dh2);
?>
-===DONE===
--CLEAN--
<?php
$base_dir = __DIR__;
@@ -59,4 +58,3 @@ resource(%d) of type (Unknown)
NULL
-- Check Directory Handle: --
resource(%d) of type (Unknown)
-===DONE===
diff --git a/ext/standard/tests/dir/closedir_basic.phpt b/ext/standard/tests/dir/closedir_basic.phpt
index 94aaebf9f9..41b51f2080 100644
--- a/ext/standard/tests/dir/closedir_basic.phpt
+++ b/ext/standard/tests/dir/closedir_basic.phpt
@@ -34,7 +34,6 @@ var_dump(closedir($dh2));
echo "-- Check Directory Handle: --\n";
var_dump($dh2);
?>
-===DONE===
--CLEAN--
<?php
$base_dir = __DIR__;
@@ -53,4 +52,3 @@ resource(%d) of type (Unknown)
NULL
-- Check Directory Handle: --
resource(%d) of type (Unknown)
-===DONE===
diff --git a/ext/standard/tests/dir/closedir_error-win32-mb.phpt b/ext/standard/tests/dir/closedir_error-win32-mb.phpt
deleted file mode 100644
index e0a399c688..0000000000
--- a/ext/standard/tests/dir/closedir_error-win32-mb.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-Test closedir() function : error conditions - Pass incorrect number of arguments
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : void closedir([resource $dir_handle])
- * Description: Close directory connection identified by the dir_handle
- * Source code: ext/standard/dir.c
- * Alias to functions: close
- */
-
-/*
- * Pass incorrect number of arguments to closedir() to test behaviour
- */
-
-echo "*** Testing closedir() : error conditions ***\n";
-
-
-//Test closedir with one more than the expected number of arguments
-echo "\n-- Testing closedir() function with more than expected no. of arguments --\n";
-
-$dir_path = __DIR__ . '\ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_error';
-mkdir($dir_path);
-$dir_handle = opendir($dir_path);
-
-$extra_arg = 10;
-var_dump( closedir($dir_handle, $extra_arg) );
-
-//successfully close the directory handle so can delete in CLEAN section
-closedir($dir_handle);
-?>
-===DONE===
---CLEAN--
-<?php
-$base_dir = __DIR__;
-$dir_path = $base_dir . '\ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_error';
-rmdir($dir_path);
-?>
---EXPECTF--
-*** Testing closedir() : error conditions ***
-
--- Testing closedir() function with more than expected no. of arguments --
-
-Warning: closedir() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt b/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt
index 07b9ab869a..a4013676ff 100644
--- a/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt
+++ b/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt
@@ -32,11 +32,14 @@ echo "Directory Handle: ";
var_dump($dh);
echo "\n-- Close directory handle second time: --\n";
-var_dump(closedir($dh));
+try {
+ var_dump(closedir($dh));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Directory Handle: ";
var_dump($dh);
?>
-===DONE===
--CLEAN--
<?php
$directory = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_variation2";
@@ -50,8 +53,5 @@ NULL
Directory Handle: resource(%d) of type (Unknown)
-- Close directory handle second time: --
-
-Warning: closedir(): %s is not a valid Directory resource in %s on line %d
-bool(false)
+closedir(): %s is not a valid Directory resource
Directory Handle: resource(%d) of type (Unknown)
-===DONE===
diff --git a/ext/standard/tests/dir/closedir_variation2.phpt b/ext/standard/tests/dir/closedir_variation2.phpt
index cb85750e71..ee6e876ae8 100644
--- a/ext/standard/tests/dir/closedir_variation2.phpt
+++ b/ext/standard/tests/dir/closedir_variation2.phpt
@@ -26,11 +26,14 @@ echo "Directory Handle: ";
var_dump($dh);
echo "\n-- Close directory handle second time: --\n";
-var_dump(closedir($dh));
+try {
+ var_dump(closedir($dh));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Directory Handle: ";
var_dump($dh);
?>
-===DONE===
--CLEAN--
<?php
$directory = __DIR__ . "/closedir_variation2";
@@ -44,8 +47,5 @@ NULL
Directory Handle: resource(%d) of type (Unknown)
-- Close directory handle second time: --
-
-Warning: closedir(): supplied resource is not a valid Directory resource in %s on line %d
-bool(false)
+closedir(): supplied resource is not a valid Directory resource
Directory Handle: resource(%d) of type (Unknown)
-===DONE===
diff --git a/ext/standard/tests/dir/closedir_variation3.phpt b/ext/standard/tests/dir/closedir_variation3.phpt
index 7d7fdcbf0e..65418ca636 100644
--- a/ext/standard/tests/dir/closedir_variation3.phpt
+++ b/ext/standard/tests/dir/closedir_variation3.phpt
@@ -18,8 +18,11 @@ echo "\n-- Open a file using fopen() --\n";
var_dump($fp = fopen(__FILE__, 'r'));
echo "\n-- Try to close the file pointer using closedir() --\n";
-var_dump(closedir($fp));
-
+try {
+ var_dump(closedir($fp));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
echo "\n-- Check file pointer: --\n";
var_dump($fp);
@@ -27,7 +30,6 @@ if(is_resource($fp)) {
fclose($fp);
}
?>
-===DONE===
--EXPECTF--
*** Testing closedir() : usage variations ***
@@ -35,10 +37,7 @@ if(is_resource($fp)) {
resource(%d) of type (stream)
-- Try to close the file pointer using closedir() --
-
-Warning: closedir(): %d is not a valid Directory resource in %s on line %d
-bool(false)
+%d is not a valid Directory resource
-- Check file pointer: --
resource(%d) of type (stream)
-===DONE===
diff --git a/ext/standard/tests/dir/dir_basic-win32-mb.phpt b/ext/standard/tests/dir/dir_basic-win32-mb.phpt
index d643846852..2106bc37d6 100644
--- a/ext/standard/tests/dir/dir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/dir_basic-win32-mb.phpt
@@ -44,8 +44,12 @@ echo "\nClose directory:\n";
var_dump( $d->close() );
var_dump( $d );
-echo "\nTest read after closing the dir:";
-var_dump( $d->read() );
+echo "\nTest read after closing the dir:\n";
+try {
+ var_dump( $d->read() );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// delete temp files
delete_files($dir_path, 3, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™dir_basic", 1, ".tmp");
@@ -87,6 +91,5 @@ object(Directory)#%d (2) {
}
Test read after closing the dir:
-Warning: Directory::read(): %s is not a valid Directory resource in %s on line %d
-bool(false)
+Directory::read(): %s is not a valid Directory resource
Done
diff --git a/ext/standard/tests/dir/dir_basic.phpt b/ext/standard/tests/dir/dir_basic.phpt
index 4360a749c7..15f8061b7b 100644
--- a/ext/standard/tests/dir/dir_basic.phpt
+++ b/ext/standard/tests/dir/dir_basic.phpt
@@ -38,8 +38,12 @@ echo "\nClose directory:\n";
var_dump( $d->close() );
var_dump( $d );
-echo "\nTest read after closing the dir:";
-var_dump( $d->read() );
+echo "\nTest read after closing the dir:\n";
+try {
+ var_dump( $d->read() );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// delete temp files
delete_files($dir_path, 3, "dir_basic", 1, ".tmp");
@@ -81,6 +85,5 @@ object(Directory)#%d (2) {
}
Test read after closing the dir:
-Warning: Directory::read(): supplied resource is not a valid Directory resource in %s on line %d
-bool(false)
+Directory::read(): supplied resource is not a valid Directory resource
Done
diff --git a/ext/standard/tests/dir/dir_bug73971.phpt b/ext/standard/tests/dir/dir_bug73971.phpt
index 3649b74329..e32516ea15 100644
--- a/ext/standard/tests/dir/dir_bug73971.phpt
+++ b/ext/standard/tests/dir/dir_bug73971.phpt
@@ -30,7 +30,6 @@ foreach ($dir as $finfo) {
}
?>
-==DONE==
--CLEAN--
<?php
$base = __DIR__ . DIRECTORY_SEPARATOR . "bug73971";
@@ -51,4 +50,3 @@ test DirectoryIterator
string(1) "."
string(2) ".."
string(432) "テストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテスト"
-==DONE==
diff --git a/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt b/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt
index 41d90864ef..accb70243d 100644
--- a/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt
@@ -27,7 +27,6 @@ var_dump(getcwd());
chdir($directory);
var_dump(getcwd());
?>
-===DONE===
--CLEAN--
<?php
$directory = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™getcwd_basic";
@@ -37,4 +36,3 @@ rmdir($directory);
*** Testing getcwd() : basic functionality ***
string(%d) "%s"
string(%d) "%s%eç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™getcwd_basic"
-===DONE===
diff --git a/ext/standard/tests/dir/getcwd_basic.phpt b/ext/standard/tests/dir/getcwd_basic.phpt
index 577521a347..0067312041 100644
--- a/ext/standard/tests/dir/getcwd_basic.phpt
+++ b/ext/standard/tests/dir/getcwd_basic.phpt
@@ -21,7 +21,6 @@ var_dump(getcwd());
chdir($directory);
var_dump(getcwd());
?>
-===DONE===
--CLEAN--
<?php
$directory = __DIR__ . "/getcwd_basic";
@@ -31,4 +30,3 @@ rmdir($directory);
*** Testing getcwd() : basic functionality ***
string(%d) "%s"
string(%d) "%s%egetcwd_basic"
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_basic-win32-mb.phpt b/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
index 8bdba8a5ce..340561b218 100644
--- a/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
@@ -46,7 +46,6 @@ var_dump($dh1);
closedir($dh2);
var_dump($dh2);
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/opendir_basic-win32-mb';
@@ -67,4 +66,3 @@ resource(%d) of type (stream)
-- Close directory handles: --
resource(%d) of type (Unknown)
resource(%d) of type (Unknown)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_basic.phpt b/ext/standard/tests/dir/opendir_basic.phpt
index fc5af44e66..6947e77952 100644
--- a/ext/standard/tests/dir/opendir_basic.phpt
+++ b/ext/standard/tests/dir/opendir_basic.phpt
@@ -40,7 +40,6 @@ var_dump($dh1);
closedir($dh2);
var_dump($dh2);
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/opendir_basic';
@@ -61,4 +60,3 @@ resource(%d) of type (stream)
-- Close directory handles: --
resource(%d) of type (Unknown)
resource(%d) of type (Unknown)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_error2.phpt b/ext/standard/tests/dir/opendir_error2.phpt
index 47b7709cec..1eac9a33d8 100644
--- a/ext/standard/tests/dir/opendir_error2.phpt
+++ b/ext/standard/tests/dir/opendir_error2.phpt
@@ -27,7 +27,6 @@ echo "\n-- Pass a non-existent relative path: --\n";
chdir(__DIR__);
var_dump(opendir('idonotexist'));
?>
-===DONE===
--EXPECTF--
*** Testing opendir() : error conditions ***
@@ -40,4 +39,3 @@ bool(false)
Warning: opendir(idonotexist): failed to open dir: %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt b/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt
index 8bf2d3c26a..7185cff737 100644
--- a/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt
+++ b/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt
@@ -37,7 +37,6 @@ if ($dh1 !== $dh2) {
closedir($dh1);
closedir($dh2);
?>
-===DONE===
--CLEAN--
<?php
$path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™opendir_variation3";
@@ -53,4 +52,3 @@ resource(%d) of type (stream)
resource(%d) of type (stream)
New resource created
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation3.phpt b/ext/standard/tests/dir/opendir_variation3.phpt
index 65ec8df82f..83a265ab81 100644
--- a/ext/standard/tests/dir/opendir_variation3.phpt
+++ b/ext/standard/tests/dir/opendir_variation3.phpt
@@ -31,7 +31,6 @@ if ($dh1 !== $dh2) {
closedir($dh1);
closedir($dh2);
?>
-===DONE===
--CLEAN--
<?php
$path = __DIR__ . "/opendir_variation3";
@@ -47,4 +46,3 @@ resource(%d) of type (stream)
resource(%d) of type (stream)
New resource created
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt b/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
index ec9f2b3886..319e178a2e 100644
--- a/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
+++ b/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
@@ -76,7 +76,6 @@ function clean_dh($dh){
unset($dh);
}
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/opendir_variation4-win32-mb';
@@ -112,4 +111,3 @@ resource(%d) of type (stream)
-- $path = '../../'ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one': --
bool(true)
resource(%d) of type (stream)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation4.phpt b/ext/standard/tests/dir/opendir_variation4.phpt
index ea72c8b627..6434c9ef52 100644
--- a/ext/standard/tests/dir/opendir_variation4.phpt
+++ b/ext/standard/tests/dir/opendir_variation4.phpt
@@ -70,7 +70,6 @@ function clean_dh($dh){
unset($dh);
}
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/opendir_variation4';
@@ -106,4 +105,3 @@ resource(%d) of type (stream)
-- $path = '../../'level_one': --
bool(true)
resource(%d) of type (stream)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation5.phpt b/ext/standard/tests/dir/opendir_variation5.phpt
index 937911227c..5f123275da 100644
--- a/ext/standard/tests/dir/opendir_variation5.phpt
+++ b/ext/standard/tests/dir/opendir_variation5.phpt
@@ -63,7 +63,6 @@ if (is_resource($dir_handle2)) {
closedir($dir_handle2);
}
?>
-===DONE===
--CLEAN--
<?php
$parent_dir_path = __DIR__ . "/opendir_variation5";
@@ -91,4 +90,3 @@ bool(false)
Warning: opendir(%s/opendir_variation5/sub_dir/child_dir): failed to open dir: %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation6-win32.phpt b/ext/standard/tests/dir/opendir_variation6-win32.phpt
index 3e3c26e679..3972f6d5c2 100644
--- a/ext/standard/tests/dir/opendir_variation6-win32.phpt
+++ b/ext/standard/tests/dir/opendir_variation6-win32.phpt
@@ -37,7 +37,6 @@ var_dump( opendir($dir_path . "/sub_dir?") );
var_dump( opendir($dir_path . "/sub?dir1") );
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/opendir_variation6";
@@ -72,4 +71,3 @@ Warning: opendir(%s/opendir_variation6/sub?dir1,%s/opendir_variation6/sub?dir1):
Warning: opendir(%s/opendir_variation6/sub?dir1): failed to open dir: %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation6.phpt b/ext/standard/tests/dir/opendir_variation6.phpt
index c51cd4ca26..a9a0221e6e 100644
--- a/ext/standard/tests/dir/opendir_variation6.phpt
+++ b/ext/standard/tests/dir/opendir_variation6.phpt
@@ -37,7 +37,6 @@ var_dump( opendir($dir_path . "/sub_dir?") );
var_dump( opendir($dir_path . "/sub?dir1") );
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/opendir_variation6";
@@ -64,4 +63,3 @@ bool(false)
Warning: opendir(%s/opendir_variation6/sub?dir1): failed to open dir: %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation7.phpt b/ext/standard/tests/dir/opendir_variation7.phpt
index d781c4f538..0f2543805d 100644
--- a/ext/standard/tests/dir/opendir_variation7.phpt
+++ b/ext/standard/tests/dir/opendir_variation7.phpt
@@ -67,7 +67,6 @@ foreach ($permission_values as $perm) {
$iterator++;
}
?>
-===DONE===
--CLEAN--
<?php
// deleting temporary directory
@@ -116,4 +115,3 @@ resource(%d) of type (stream)
-- Iteration 10 --
bool(true)
resource(%d) of type (stream)
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_basic-win32-mb.phpt b/ext/standard/tests/dir/readdir_basic-win32-mb.phpt
index 697d8774f9..18ee74e6b3 100644
--- a/ext/standard/tests/dir/readdir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/readdir_basic-win32-mb.phpt
@@ -52,7 +52,6 @@ foreach($a as $file) {
delete_files($path, 3);
closedir($dh);
?>
-===DONE===
--CLEAN--
<?php
$path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_basic';
@@ -76,4 +75,3 @@ string(2) ".."
string(9) "file1.tmp"
string(9) "file2.tmp"
string(9) "file3.tmp"
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_basic.phpt b/ext/standard/tests/dir/readdir_basic.phpt
index 8c615afc5e..9a45ee4002 100644
--- a/ext/standard/tests/dir/readdir_basic.phpt
+++ b/ext/standard/tests/dir/readdir_basic.phpt
@@ -46,7 +46,6 @@ foreach($a as $file) {
delete_files($path, 3);
closedir($dh);
?>
-===DONE===
--CLEAN--
<?php
$path = __DIR__ . '/readdir_basic';
@@ -70,4 +69,3 @@ string(2) ".."
string(9) "file1.tmp"
string(9) "file2.tmp"
string(9) "file3.tmp"
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt
index ede4199ac6..01ae34fb88 100644
--- a/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt
+++ b/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt
@@ -39,7 +39,6 @@ foreach($entries as $entry) {
var_dump($entry);
}
?>
-===DONE===
--CLEAN--
<?php
$path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation2';
@@ -51,4 +50,3 @@ rmdir($path);
-- Pass an empty directory to readdir() --
string(1) "."
string(2) ".."
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation2.phpt b/ext/standard/tests/dir/readdir_variation2.phpt
index fbe383e768..3fb35a778e 100644
--- a/ext/standard/tests/dir/readdir_variation2.phpt
+++ b/ext/standard/tests/dir/readdir_variation2.phpt
@@ -33,7 +33,6 @@ foreach($entries as $entry) {
var_dump($entry);
}
?>
-===DONE===
--CLEAN--
<?php
$path = __DIR__ . '/readdir_variation2';
@@ -45,4 +44,3 @@ rmdir($path);
-- Pass an empty directory to readdir() --
string(1) "."
string(2) ".."
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt
index 5c2b0c8385..b3f831e067 100644
--- a/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt
+++ b/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt
@@ -49,7 +49,6 @@ delete_files($path_sub, 2);
closedir($dir_handle);
?>
-===DONE===
--CLEAN--
<?php
$path_top = __DIR__ . '/readdir_variation3-win32-mb';
@@ -71,4 +70,3 @@ array(5) {
[4]=>
string(46) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™sub_folder"
}
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation3.phpt b/ext/standard/tests/dir/readdir_variation3.phpt
index 849068e97a..6adac51215 100644
--- a/ext/standard/tests/dir/readdir_variation3.phpt
+++ b/ext/standard/tests/dir/readdir_variation3.phpt
@@ -43,7 +43,6 @@ delete_files($path_sub, 2);
closedir($dir_handle);
?>
-===DONE===
--CLEAN--
<?php
$path_top = __DIR__ . '/readdir_variation3';
@@ -65,4 +64,3 @@ array(5) {
[4]=>
string(10) "sub_folder"
}
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt
index a77fcd8ca4..8e9e3b610e 100644
--- a/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt
+++ b/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt
@@ -81,7 +81,6 @@ var_dump($contents);
closedir($dir_handle);
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation4/";
@@ -181,4 +180,3 @@ array(16) {
[15]=>
string(51) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™single_file.tmp"
}
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation4.phpt b/ext/standard/tests/dir/readdir_variation4.phpt
index 22eb62381a..8bfe176946 100644
--- a/ext/standard/tests/dir/readdir_variation4.phpt
+++ b/ext/standard/tests/dir/readdir_variation4.phpt
@@ -75,7 +75,6 @@ var_dump($contents);
closedir($dir_handle);
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/readdir_variation4/";
@@ -175,4 +174,3 @@ array(16) {
[15]=>
string(15) "single_file.tmp"
}
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation5.phpt b/ext/standard/tests/dir/readdir_variation5.phpt
index 72ec24a9d8..920864d21a 100644
--- a/ext/standard/tests/dir/readdir_variation5.phpt
+++ b/ext/standard/tests/dir/readdir_variation5.phpt
@@ -65,7 +65,6 @@ foreach($permission_values as $perm) {
$iterator++;
}
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/readdir_variation5";
@@ -133,4 +132,3 @@ bool(true)
resource(%d) of type (stream)
-- Calling readdir() --
string(%d) "%s"
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt
index 57a8147a46..3646316247 100644
--- a/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt
+++ b/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt
@@ -61,7 +61,6 @@ delete_files($dir_path, 3, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variatio
closedir($dir_handle1);
closedir();
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation6";
@@ -83,4 +82,3 @@ string(2) ".."
string(59) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation61.tmp"
string(59) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation62.tmp"
string(59) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation63.tmp"
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation6.phpt b/ext/standard/tests/dir/readdir_variation6.phpt
index 379d5cc80c..19bb906f14 100644
--- a/ext/standard/tests/dir/readdir_variation6.phpt
+++ b/ext/standard/tests/dir/readdir_variation6.phpt
@@ -55,7 +55,6 @@ delete_files($dir_path, 3, "readdir_variation6");
closedir($dir_handle1);
closedir();
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/readdir_variation6";
@@ -77,4 +76,3 @@ string(2) ".."
string(23) "readdir_variation61.tmp"
string(23) "readdir_variation62.tmp"
string(23) "readdir_variation63.tmp"
-===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation7.phpt b/ext/standard/tests/dir/readdir_variation7.phpt
index 2cd23b8bfc..a2c0ef059f 100644
--- a/ext/standard/tests/dir/readdir_variation7.phpt
+++ b/ext/standard/tests/dir/readdir_variation7.phpt
@@ -15,14 +15,14 @@ echo "*** Testing readdir() : usage variations ***\n";
// get a resource variable
var_dump($fp = fopen(__FILE__, "r"));
-var_dump( readdir($fp) );
+try {
+ var_dump( readdir($fp) );
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
--EXPECTF--
*** Testing readdir() : usage variations ***
resource(%d) of type (stream)
-
-Warning: readdir(): %d is not a valid Directory resource in %s on line %d
-bool(false)
-===DONE===
+%d is not a valid Directory resource
diff --git a/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt b/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt
index 5e704870ee..c16e993f83 100644
--- a/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt
@@ -63,7 +63,6 @@ closedir($dh2);
delete_files($dir_path1, 1, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file");
delete_files($dir_path2, 1, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file", 2);
?>
-===DONE===
--CLEAN--
<?php
$dir_path1 = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir1";
@@ -99,4 +98,3 @@ array(3) {
}
NULL
bool(true)
-===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_basic.phpt b/ext/standard/tests/dir/rewinddir_basic.phpt
index b0abc0a379..1750121b3e 100644
--- a/ext/standard/tests/dir/rewinddir_basic.phpt
+++ b/ext/standard/tests/dir/rewinddir_basic.phpt
@@ -57,7 +57,6 @@ closedir($dh2);
delete_files($dir_path1, 1);
delete_files($dir_path2, 1, 'file', 2);
?>
-===DONE===
--CLEAN--
<?php
$dir_path1 = __DIR__ . "/rewinddir_basic_dir1";
@@ -93,4 +92,3 @@ array(3) {
}
NULL
bool(true)
-===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt b/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt
index e46640c41e..7d86575b6d 100644
--- a/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt
+++ b/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt
@@ -29,9 +29,12 @@ var_dump(readdir($dir_handle));
closedir($dir_handle);
echo "\n-- Call to rewinddir() --\n";
-var_dump(rewinddir($dir_handle));
+try {
+ var_dump(rewinddir($dir_handle));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_variation2';
@@ -45,7 +48,4 @@ resource(%d) of type (stream)
string(%d) "%s"
-- Call to rewinddir() --
-
-Warning: rewinddir(): %s is not a valid Directory resource in %s on line %d
-bool(false)
-===DONE===
+rewinddir(): %s is not a valid Directory resource
diff --git a/ext/standard/tests/dir/rewinddir_variation2.phpt b/ext/standard/tests/dir/rewinddir_variation2.phpt
index 02654aa80c..9294d68b46 100644
--- a/ext/standard/tests/dir/rewinddir_variation2.phpt
+++ b/ext/standard/tests/dir/rewinddir_variation2.phpt
@@ -23,9 +23,12 @@ var_dump(readdir($dir_handle));
closedir($dir_handle);
echo "\n-- Call to rewinddir() --\n";
-var_dump(rewinddir($dir_handle));
+try {
+ var_dump(rewinddir($dir_handle));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . '/rewinddir_variation2';
@@ -39,7 +42,4 @@ resource(%d) of type (stream)
string(%d) "%s"
-- Call to rewinddir() --
-
-Warning: rewinddir(): supplied resource is not a valid Directory resource in %s on line %d
-bool(false)
-===DONE===
+rewinddir(): supplied resource is not a valid Directory resource
diff --git a/ext/standard/tests/dir/rewinddir_variation3.phpt b/ext/standard/tests/dir/rewinddir_variation3.phpt
index a1ec7f80d4..2bd69e45fc 100644
--- a/ext/standard/tests/dir/rewinddir_variation3.phpt
+++ b/ext/standard/tests/dir/rewinddir_variation3.phpt
@@ -18,7 +18,12 @@ echo "\n-- Open a file using fopen --\n";
var_dump($fp = fopen(__FILE__, 'r'));
$result1 = fread($fp, 5);
-var_dump(rewinddir($fp));
+
+try {
+ var_dump(rewinddir($fp));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
$result2 = fread($fp, 5);
echo "\n-- Check if rewinddir() has repositioned the file pointer --\n";
@@ -28,16 +33,12 @@ if ($result1 === $result2) {
echo "rewinddir() does not work on file pointers\n";
}
?>
-===DONE===
--EXPECTF--
*** Testing rewinddir() : usage variations ***
-- Open a file using fopen --
resource(%d) of type (stream)
-
-Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
-bool(false)
+%d is not a valid Directory resource
-- Check if rewinddir() has repositioned the file pointer --
rewinddir() does not work on file pointers
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_basic-win32-mb.phpt b/ext/standard/tests/dir/scandir_basic-win32-mb.phpt
index 39c375461e..501a3c54c5 100644
--- a/ext/standard/tests/dir/scandir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/scandir_basic-win32-mb.phpt
@@ -37,7 +37,6 @@ var_dump(scandir($directory, $sorting_order, $context));
delete_files($directory, 3, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file");
?>
-===DONE===
--CLEAN--
<?php
$directory = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_basic';
@@ -73,4 +72,3 @@ array(5) {
[4]=>
string(1) "."
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_basic.phpt b/ext/standard/tests/dir/scandir_basic.phpt
index e0e40f5620..e31ef6ea41 100644
--- a/ext/standard/tests/dir/scandir_basic.phpt
+++ b/ext/standard/tests/dir/scandir_basic.phpt
@@ -31,7 +31,6 @@ var_dump(scandir($directory, $sorting_order, $context));
delete_files($directory, 3);
?>
-===DONE===
--CLEAN--
<?php
$directory = __DIR__ . '/scandir_basic';
@@ -67,4 +66,3 @@ array(5) {
[4]=>
string(1) "."
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_error2.phpt b/ext/standard/tests/dir/scandir_error2.phpt
index 121d68bab8..e77b098323 100644
--- a/ext/standard/tests/dir/scandir_error2.phpt
+++ b/ext/standard/tests/dir/scandir_error2.phpt
@@ -27,7 +27,6 @@ var_dump(scandir($directory));
echo "\n-- Pass scandir() a relative path that does not exist --\n";
var_dump(scandir('/idonotexist'));
?>
-===DONE===
--EXPECTF--
*** Testing scandir() : error conditions ***
@@ -44,4 +43,3 @@ Warning: scandir(/idonotexist): failed to open dir: %s in %s on line %d
Warning: scandir(): (errno %d): %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt
index b596eb0e17..120e12e6e7 100644
--- a/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt
+++ b/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt
@@ -46,7 +46,6 @@ var_dump(in_array('ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file2.tmp', $files));
delete_files($dir, 2, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file");
?>
-===DONE===
--CLEAN--
<?php
$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation10';
@@ -82,4 +81,3 @@ bool(true)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation10.phpt b/ext/standard/tests/dir/scandir_variation10.phpt
index 28220c66ba..1de1e9752c 100644
--- a/ext/standard/tests/dir/scandir_variation10.phpt
+++ b/ext/standard/tests/dir/scandir_variation10.phpt
@@ -40,7 +40,6 @@ var_dump(in_array('file2.tmp', $files));
delete_files($dir, 2);
?>
-===DONE===
--CLEAN--
<?php
$dir = __DIR__ . '/scandir_variation10';
@@ -76,4 +75,3 @@ bool(true)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt
deleted file mode 100644
index 5505b3db6d..0000000000
--- a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test scandir() function : usage variations - diff data types as $context arg
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
- * Description: List files & directories inside the specified path
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass different data types as $context argument to test how scandir() behaves
- */
-
-echo "*** Testing scandir() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation3';
-mkdir($dir);
-$sorting_order = SCANDIR_SORT_ASCENDING;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $context argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
- array(),
-
- // string data
-/*19*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*22*/ new classA(),
-
- // undefined data
-/*23*/ @$undefined_var,
-
- // unset data
-/*24*/ @$unset_var,
-
- // resource variable
-/*25*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of scandir()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( scandir($dir, $sorting_order, $input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---CLEAN--
-<?php
-$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation3';
-rmdir($dir);
-?>
---EXPECTF--
-*** Testing scandir() : usage variations ***
-
--- Iteration 1 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: scandir() expects parameter 3 to be resource, int given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: scandir() expects parameter 3 to be resource, float given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: scandir() expects parameter 3 to be resource, bool given in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: scandir() expects parameter 3 to be resource, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: scandir() expects parameter 3 to be resource, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: scandir(): supplied resource is not a valid Stream-Context resource in %s on line %d
-array(2) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
-}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
index 9bfeddf556..88389c6f92 100644
--- a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
+++ b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
@@ -65,7 +65,6 @@ var_dump(scandir('../../ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one'));
@delete_files($level_one_dir_path, 2, 'ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_one');
@delete_files($level_two_dir_path, 2, 'ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_two');
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/scandir_variation4-win32-mb';
@@ -174,4 +173,3 @@ array(5) {
[4]=>
string(45) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™level_two"
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation4.phpt b/ext/standard/tests/dir/scandir_variation4.phpt
index 6030ace2ac..afaa17dee7 100644
--- a/ext/standard/tests/dir/scandir_variation4.phpt
+++ b/ext/standard/tests/dir/scandir_variation4.phpt
@@ -59,7 +59,6 @@ var_dump(scandir('../../level_one'));
@delete_files($level_one_dir_path, 2, 'level_one');
@delete_files($level_two_dir_path, 2, 'level_two');
?>
-===DONE===
--CLEAN--
<?php
$base_dir_path = __DIR__ . '/scandir_variation4';
@@ -168,4 +167,3 @@ array(5) {
[4]=>
string(9) "level_two"
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation5.phpt b/ext/standard/tests/dir/scandir_variation5.phpt
index 189687f1d0..cfd564ca79 100644
--- a/ext/standard/tests/dir/scandir_variation5.phpt
+++ b/ext/standard/tests/dir/scandir_variation5.phpt
@@ -55,7 +55,6 @@ chmod($parent_dir_path, 0666); // restricting parent directory
echo "\n-- After restricting parent directory --\n";
var_dump(scandir($child_dir_path));
?>
-===DONE===
--CLEAN--
<?php
$parent_dir_path = __DIR__ . "/scandir_variation5";
@@ -87,4 +86,3 @@ Warning: scandir(%s/scandir_variation5/sub_dir/child_dir): failed to open dir: %
Warning: scandir(): (errno %d): %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation6.phpt b/ext/standard/tests/dir/scandir_variation6.phpt
index d516411886..80b934f56f 100644
--- a/ext/standard/tests/dir/scandir_variation6.phpt
+++ b/ext/standard/tests/dir/scandir_variation6.phpt
@@ -38,7 +38,6 @@ var_dump( scandir($dir_path . "/sub_dir?") );
var_dump( scandir($dir_path . "/sub?dir1") );
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/scandir_variation6";
@@ -73,4 +72,3 @@ Warning: scandir(%s/scandir_variation6/sub?dir1): failed to open dir: %s in %s o
Warning: scandir(): (errno %d): %s in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation7.phpt b/ext/standard/tests/dir/scandir_variation7.phpt
index bd0cb74a15..901198ffaa 100644
--- a/ext/standard/tests/dir/scandir_variation7.phpt
+++ b/ext/standard/tests/dir/scandir_variation7.phpt
@@ -60,7 +60,6 @@ foreach ($permission_values as $perm) {
$iterator++;
}
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/scandir_variation7";
@@ -158,4 +157,3 @@ array(2) {
[1]=>
string(2) ".."
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt
index acc289e590..ffeda65be7 100644
--- a/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt
+++ b/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt
@@ -71,7 +71,6 @@ foreach ($content as $file_name) {
@unlink($dir_path . $file_name);
}
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation8";
@@ -157,4 +156,3 @@ array(16) {
[15]=>
string(51) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™single_file.tmp"
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation8.phpt b/ext/standard/tests/dir/scandir_variation8.phpt
index 5ba7a6391b..7734c1531f 100644
--- a/ext/standard/tests/dir/scandir_variation8.phpt
+++ b/ext/standard/tests/dir/scandir_variation8.phpt
@@ -65,7 +65,6 @@ foreach ($content as $file_name) {
@unlink($dir_path . $file_name);
}
?>
-===DONE===
--CLEAN--
<?php
$dir_path = __DIR__ . "/scandir_variation8";
@@ -151,4 +150,3 @@ array(16) {
[15]=>
string(15) "single_file.tmp"
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt
index c634f2d3b3..16b26fbb78 100644
--- a/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt
+++ b/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt
@@ -37,7 +37,6 @@ foreach($ints as $sorting_order) {
delete_files($dir, 2, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file");
?>
-===DONE===
--CLEAN--
<?php
$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation9';
@@ -75,4 +74,3 @@ array(4) {
[3]=>
string(45) "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file2.tmp"
}
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation9.phpt b/ext/standard/tests/dir/scandir_variation9.phpt
index 42e42bb6cb..6bfbe28ea0 100644
--- a/ext/standard/tests/dir/scandir_variation9.phpt
+++ b/ext/standard/tests/dir/scandir_variation9.phpt
@@ -31,7 +31,6 @@ foreach($ints as $sorting_order) {
delete_files($dir, 2);
?>
-===DONE===
--CLEAN--
<?php
$dir = __DIR__ . '/scandir_variation9';
@@ -69,4 +68,3 @@ array(4) {
[3]=>
string(9) "file2.tmp"
}
-===DONE===
diff --git a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt
index 73aac5b43c..5594207812 100644
--- a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt
+++ b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt
@@ -15,7 +15,12 @@ echo $rc;
echo "Cannot instantiate a valid Directory directly:\n";
$d = new Directory(getcwd());
var_dump($d);
-var_dump($d->read());
+
+try {
+ var_dump($d->read());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
--EXPECTF--
@@ -60,6 +65,4 @@ Class [ <internal%s> class Directory ] {
Cannot instantiate a valid Directory directly:
object(Directory)#%d (0) {
}
-
-Warning: Directory::read(): Unable to find my handle property in %s on line 15
-bool(false)
+Unable to find my handle property
diff --git a/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt b/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
index cba61d3fbf..2949bd3381 100644
--- a/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
+++ b/ext/standard/tests/directory/DirectoryClass_error_001-mb.phpt
@@ -10,22 +10,41 @@ mkdir($d);
echo "\n--> Try all methods with bad handle:\n";
$d = new Directory($d);
$d->handle = "Havoc!";
-var_dump($d->read());
-var_dump($d->rewind());
-var_dump($d->close());
+try {
+ var_dump($d->read());
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($d->rewind());
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($d->close());
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n--> Try all methods with no handle:\n";
$d = new Directory($d);
unset($d->handle);
-var_dump($d->read());
-var_dump($d->rewind());
-var_dump($d->close());
-echo "\n--> Try all methods with wrong number of args:\n";
-$d = new Directory($d);
-var_dump($d->read(1,2));
-var_dump($d->rewind(1,2));
-var_dump($d->close(1,2));
+try {
+ var_dump($d->read());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ var_dump($d->rewind());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ var_dump($d->close());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
--CLEAN--
@@ -34,36 +53,14 @@ $d = getcwd().PATH_SEPARATOR."ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™";
rmdir($d);
?>
---EXPECTF--
+--EXPECT--
--> Try all methods with bad handle:
-
-Warning: Directory::read(): supplied argument is not a valid Directory resource in %s on line %d
-bool(false)
-
-Warning: Directory::rewind(): supplied argument is not a valid Directory resource in %s on line %d
-bool(false)
-
-Warning: Directory::close(): supplied argument is not a valid Directory resource in %s on line %d
-bool(false)
+Directory::read(): supplied argument is not a valid Directory resource
+Directory::rewind(): supplied argument is not a valid Directory resource
+Directory::close(): supplied argument is not a valid Directory resource
--> Try all methods with no handle:
+Unable to find my handle property
+Unable to find my handle property
+Unable to find my handle property
-Warning: Directory::read(): Unable to find my handle property in %s on line %d
-bool(false)
-
-Warning: Directory::rewind(): Unable to find my handle property in %s on line %d
-bool(false)
-
-Warning: Directory::close(): Unable to find my handle property in %s on line %d
-bool(false)
-
---> Try all methods with wrong number of args:
-
-Warning: Directory::read() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::rewind() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::close() expects at most 1 parameter, 2 given in %s on line %d
-NULL
diff --git a/ext/standard/tests/directory/DirectoryClass_error_001.phpt b/ext/standard/tests/directory/DirectoryClass_error_001.phpt
index 5b2771eef6..1a8bbf3c1d 100644
--- a/ext/standard/tests/directory/DirectoryClass_error_001.phpt
+++ b/ext/standard/tests/directory/DirectoryClass_error_001.phpt
@@ -6,54 +6,50 @@ Directory class behaviour.
echo "\n--> Try all methods with bad handle:\n";
$d = new Directory(getcwd());
$d->handle = "Havoc!";
-var_dump($d->read());
-var_dump($d->rewind());
-var_dump($d->close());
+try {
+ var_dump($d->read());
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($d->rewind());
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump($d->close());
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n--> Try all methods with no handle:\n";
$d = new Directory(getcwd());
unset($d->handle);
-var_dump($d->read());
-var_dump($d->rewind());
-var_dump($d->close());
-echo "\n--> Try all methods with wrong number of args:\n";
-$d = new Directory(getcwd());
-var_dump($d->read(1,2));
-var_dump($d->rewind(1,2));
-var_dump($d->close(1,2));
+try {
+ var_dump($d->read());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ var_dump($d->rewind());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ var_dump($d->close());
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
?>
---EXPECTF--
+--EXPECT--
--> Try all methods with bad handle:
-
-Warning: Directory::read(): supplied argument is not a valid Directory resource in %s on line %d
-bool(false)
-
-Warning: Directory::rewind(): supplied argument is not a valid Directory resource in %s on line %d
-bool(false)
-
-Warning: Directory::close(): supplied argument is not a valid Directory resource in %s on line %d
-bool(false)
+Directory::read(): supplied argument is not a valid Directory resource
+Directory::rewind(): supplied argument is not a valid Directory resource
+Directory::close(): supplied argument is not a valid Directory resource
--> Try all methods with no handle:
-
-Warning: Directory::read(): Unable to find my handle property in %s on line %d
-bool(false)
-
-Warning: Directory::rewind(): Unable to find my handle property in %s on line %d
-bool(false)
-
-Warning: Directory::close(): Unable to find my handle property in %s on line %d
-bool(false)
-
---> Try all methods with wrong number of args:
-
-Warning: Directory::read() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::rewind() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: Directory::close() expects at most 1 parameter, 2 given in %s on line %d
-NULL
+Unable to find my handle property
+Unable to find my handle property
+Unable to find my handle property
diff --git a/ext/standard/tests/directory/bug74589_utf8.phpt b/ext/standard/tests/directory/bug74589_utf8.phpt
index 1bec90fe16..5bf047fbe2 100644
--- a/ext/standard/tests/directory/bug74589_utf8.phpt
+++ b/ext/standard/tests/directory/bug74589_utf8.phpt
@@ -32,12 +32,10 @@ $php = getenv('TEST_PHP_EXECUTABLE');
echo shell_exec("$php -n $test_file");
?>
-===DONE===
--EXPECTF--
string(%d) "%sbug74589_新建文件夹"
string(%d) "%sbug74589_新建文件夹%etest.php"
bool(true)
-===DONE===
--CLEAN--
<?php
$item = "bug74589_新建文件夹"; // utf-8 string
diff --git a/ext/standard/tests/file/005_error.phpt b/ext/standard/tests/file/005_error.phpt
index e3ce551b3d..bc2bf3f978 100644
--- a/ext/standard/tests/file/005_error.phpt
+++ b/ext/standard/tests/file/005_error.phpt
@@ -29,31 +29,6 @@ var_dump( filemtime("/no/such/file/or/dir") );
var_dump( filectime("/no/such/file/or/dir") );
var_dump( touch("/no/such/file/or/dir", 10) );
-/* Only one invalid argument */
-var_dump( fileatime(__FILE__, "string") );
-var_dump( filemtime(__FILE__, 100) );
-var_dump( filectime(__FILE__, TRUE) );
-var_dump( touch(__FILE__, 10, 100, 123) );
-
-echo "\n-- Testing No.of arguments less than expected --";
-var_dump( fileatime() );
-var_dump( filemtime() );
-var_dump( filectime() );
-var_dump( touch() );
-
-echo "\n-- Testing No.of arguments greater than expected --";
-/* Both invalid arguments */
-var_dump( fileatime("/no/such/file/or/dir", "string") );
-var_dump( filemtime("/no/such/file/or/dir", 100) );
-var_dump( filectime("/no/such/file/or/dir", TRUE) );
-var_dump( touch("/no/such/file/or/dir", 10, 100, 123) );
-
-/* Only one invalid argument */
-var_dump( fileatime(__FILE__, "string") );
-var_dump( filemtime(__FILE__, 100) );
-var_dump( filectime(__FILE__, TRUE) );
-var_dump( touch(__FILE__, 10, 100, 123) );
-
echo "\nDone";
?>
--EXPECTF--
@@ -72,54 +47,4 @@ bool(false)
Warning: touch(): Unable to create file /no/such/file/or/dir because No such file or directory in %s on line %d
bool(false)
-Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing No.of arguments less than expected --
-Warning: fileatime() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: touch() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing No.of arguments greater than expected --
-Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
Done
diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt
index 9451a3e18b..9234922790 100644
--- a/ext/standard/tests/file/006_error.phpt
+++ b/ext/standard/tests/file/006_error.phpt
@@ -36,19 +36,6 @@ var_dump( chmod("/no/such/file/dir", 0777) );
var_dump( fileperms("/no/such/file/dir") );
echo "\n";
-/* With args less than expected */
-$fp = fopen(__DIR__."/006_error.tmp", "w");
-fclose($fp);
-var_dump( chmod(__DIR__."/006_error.tmp") );
-var_dump( chmod("nofile") );
-var_dump( chmod() );
-var_dump( fileperms() );
-
-/* With args greater than expected */
-var_dump( chmod(__DIR__."/006_error.tmp", 0755, TRUE) );
-var_dump( fileperms(__DIR__."/006_error.tmp", 0777) );
-var_dump( fileperms("nofile", 0777) );
-
echo "\n*** Done ***\n";
?>
--CLEAN--
@@ -73,25 +60,4 @@ Warning: fileperms(): stat failed for /no/such/file/dir in %s on line %d
bool(false)
-Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: chmod() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: fileperms() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Done ***
diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt
index 6e87d24675..a5c95ab1da 100644
--- a/ext/standard/tests/file/006_variation2.phpt
+++ b/ext/standard/tests/file/006_variation2.phpt
@@ -58,15 +58,23 @@ $perms_array = array(
$count = 1;
foreach($perms_array as $permission) {
echo "-- Iteration $count --\n";
- var_dump( chmod($file_name, $permission) );
- printf("%o", fileperms($file_name) );
- echo "\n";
- clearstatcache();
-
- var_dump( chmod($dir_name, $permission) );
- printf("%o", fileperms($dir_name) );
- echo "\n";
- clearstatcache();
+ try {
+ var_dump( chmod($file_name, $permission) );
+ printf("%o", fileperms($file_name) );
+ echo "\n";
+ clearstatcache();
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+
+ try {
+ var_dump( chmod($dir_name, $permission) );
+ printf("%o", fileperms($dir_name) );
+ echo "\n";
+ clearstatcache();
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count++;
}
echo "*** Done ***\n";
@@ -138,39 +146,15 @@ bool(true)
bool(true)
43567
-- Iteration 12 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
-- Iteration 13 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
-- Iteration 14 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
-- Iteration 15 --
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-103567
-
-Warning: chmod() expects parameter 2 to be int, string given in %s on line %d
-NULL
-43567
+chmod() expects parameter 2 to be int, string given
+chmod() expects parameter 2 to be int, string given
*** Done ***
diff --git a/ext/standard/tests/file/007_basic.phpt b/ext/standard/tests/file/007_basic.phpt
index fd2e5575a9..fa25431580 100644
--- a/ext/standard/tests/file/007_basic.phpt
+++ b/ext/standard/tests/file/007_basic.phpt
@@ -51,9 +51,17 @@ for( $i=0; $i<count($modes); $i++ ) {
// check fclose()
var_dump( fclose($handle) );
var_dump( $handle );
- // confirm the closure, using ftell() and feof(), expect, false
- var_dump( ftell($handle) );
- var_dump( feof($handle) );
+ // confirm the closure, using ftell() and feof()
+ try {
+ var_dump( ftell($handle) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( feof($handle) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
// remove the temp file
@@ -78,9 +86,17 @@ for( $i=0; $i<count($x_modes); $i++ ) {
// check fclose()
var_dump( fclose($handle) );
var_dump( $handle );
- // confirm the closure, using ftell() and feof(), expect, false
- var_dump( ftell($handle) );
- var_dump( feof($handle) );
+ // confirm the closure, using ftell() and feof()
+ try {
+ var_dump( ftell($handle) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( feof($handle) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
var_dump( $handle );
// remove the file
@@ -97,12 +113,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'wb' --
resource(%d) of type (stream)
@@ -110,12 +122,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'wt' --
resource(%d) of type (stream)
@@ -123,12 +131,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'w+' --
resource(%d) of type (stream)
@@ -136,12 +140,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'w+b' --
resource(%d) of type (stream)
@@ -149,12 +149,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'w+t' --
resource(%d) of type (stream)
@@ -162,12 +158,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'r' --
resource(%d) of type (stream)
@@ -175,12 +167,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'rb' --
resource(%d) of type (stream)
@@ -188,12 +176,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'rt' --
resource(%d) of type (stream)
@@ -201,12 +185,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'r+' --
resource(%d) of type (stream)
@@ -214,12 +194,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'r+b' --
resource(%d) of type (stream)
@@ -227,12 +203,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'r+t' --
resource(%d) of type (stream)
@@ -240,12 +212,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'a' --
resource(%d) of type (stream)
@@ -253,12 +221,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'ab' --
resource(%d) of type (stream)
@@ -266,12 +230,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'at' --
resource(%d) of type (stream)
@@ -279,12 +239,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'a+' --
resource(%d) of type (stream)
@@ -292,12 +248,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'a+t' --
resource(%d) of type (stream)
@@ -305,12 +257,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'a+b' --
resource(%d) of type (stream)
@@ -318,12 +266,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
-- Iteration with mode 'x' --
resource(%d) of type (stream)
@@ -331,12 +275,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
resource(%d) of type (Unknown)
-- Iteration with mode 'xb' --
@@ -345,12 +285,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
resource(%d) of type (Unknown)
-- Iteration with mode 'xt' --
@@ -359,12 +295,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
resource(%d) of type (Unknown)
-- Iteration with mode 'x+' --
@@ -373,12 +305,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
resource(%d) of type (Unknown)
-- Iteration with mode 'x+b' --
@@ -387,12 +315,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
resource(%d) of type (Unknown)
-- Iteration with mode 'x+t' --
@@ -401,12 +325,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
-
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
+feof(): supplied resource is not a valid stream resource
resource(%d) of type (Unknown)
*** Done ***
diff --git a/ext/standard/tests/file/007_error.phpt b/ext/standard/tests/file/007_error.phpt
deleted file mode 100644
index 93a6a23e5f..0000000000
--- a/ext/standard/tests/file/007_error.phpt
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test fopen, fclose() & feof() functions: error conditions
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---FILE--
-<?php
-/*
- Prototype: resource fopen(string $filename, string $mode
- [, bool $use_include_path [, resource $context]] );
- Description: Opens file or URL.
-
- Prototype: bool fclose ( resource $handle );
- Description: Closes an open file pointer
-
- Prototype: bool feof ( resource $handle )
- Description: Returns TRUE if the file pointer is at EOF or an error occurs
- (including socket timeout); otherwise returns FALSE.
-*/
-
-echo "*** Testing error conditions for fopen(), fclsoe() & feof() ***\n";
-/* Arguments less than minimum no.of args */
-
-// fopen ()
-var_dump(fopen(__FILE__)); // one valid argument
-var_dump(fopen()); // zero argument
-
-// fclose()
-$fp = fopen(__FILE__, "r");
-fclose($fp);
-var_dump( fclose($fp) ); // closed handle
-var_dump( fclose(__FILE__) ); // invalid handle
-var_dump( fclose() ); // zero argument
-
-//feof()
-var_dump( feof($fp) ); // closed handle
-var_dump( feof(__FILE__) ); // invalid handle
-var_dump( feof() ); //zero argument
-
-/* Arguments greater than maximum no.of ags */
-var_dump(fopen(__FILE__, "r", TRUE, "www.example.com", 100));
-
-$fp = fopen(__FILE__, "r");
-var_dump( fclose($fp, "handle") );
-
-var_dump( feof($fp, "handle"));
-fclose($fp);
-
-/* test invalid arguments : non-resources */
-echo "-- Testing fopen(), fclose() & feof() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
- NULL,
- ""
-);
-
-/* loop to test fclose with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( fopen($invalid_args[$loop_counter - 1], "r") );
- var_dump( fclose($invalid_args[$loop_counter - 1]) );
- var_dump( feof($invalid_args[$loop_counter - 1]) );
-}
-
-?>
---EXPECTF--
-*** Testing error conditions for fopen(), fclsoe() & feof() ***
-
-Warning: fopen() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: fopen() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: fclose(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: fclose() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: feof() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: fopen() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-
-Warning: fclose() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: feof() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
--- Testing fopen(), fclose() & feof() with invalid arguments --
--- Iteration 1 --
-
-Warning: fopen(string): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fopen(10): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fopen(10.5): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fopen(1): failed to open stream: No such file or directory in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fopen() expects parameter 1 to be a valid path, array given in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fopen() expects parameter 1 to be a valid path, object given in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: fopen(): Filename cannot be empty in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: fopen(): Filename cannot be empty in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: feof() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
diff --git a/ext/standard/tests/file/basename-win32.phpt b/ext/standard/tests/file/basename-win32.phpt
index 996b060cea..703861dec7 100644
--- a/ext/standard/tests/file/basename-win32.phpt
+++ b/ext/standard/tests/file/basename-win32.phpt
@@ -115,23 +115,6 @@ check_basename( $file_paths );
echo "\n*** Testing possible variations in path and suffix ***\n";
check_basename( $file_path_variations );
-echo "\n*** Testing error conditions ***\n";
-// zero arguments
-var_dump( basename() );
-
-// more than expected no. of arguments
-var_dump( basename("\\blah\\tmp\\bar.zip", ".zip", ".zip") );
-
-// passing invalid type arguments
-$object = new stdclass;
-var_dump( basename( array("string\\bar") ) );
-var_dump( basename( array("string\\bar"), "bar" ) );
-var_dump( basename( "bar", array("string\\bar") ) );
-var_dump( basename( $object, "bar" ) );
-var_dump( basename( $object ) );
-var_dump( basename( $object, $object ) );
-var_dump( basename( "bar", $object ) );
-
echo "Done\n";
?>
--EXPECTF--
@@ -309,33 +292,4 @@ string(0) ""
--Iteration 32--
string(0) ""
-
-*** Testing error conditions ***
-
-Warning: basename() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: basename() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: basename() expects parameter 2 to be string, object given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/file/basename.phpt b/ext/standard/tests/file/basename.phpt
index a9b4389b5a..8352f4da4b 100644
--- a/ext/standard/tests/file/basename.phpt
+++ b/ext/standard/tests/file/basename.phpt
Binary files differ
diff --git a/ext/standard/tests/file/basename_bug66395-win32.phpt b/ext/standard/tests/file/basename_bug66395-win32.phpt
index b4ad18dd28..c276107881 100644
--- a/ext/standard/tests/file/basename_bug66395-win32.phpt
+++ b/ext/standard/tests/file/basename_bug66395-win32.phpt
@@ -9,10 +9,8 @@ echo basename("d:subdir\\file.txt") . "\n";
echo basename("y:file.txt", ".txt") . "\n";
echo basename("notdriveletter:file.txt") . "\n";
?>
-==DONE==
--EXPECT--
file.txt
file.txt
file
notdriveletter:file.txt
-==DONE==
diff --git a/ext/standard/tests/file/basename_bug66395_variation2-win32.phpt b/ext/standard/tests/file/basename_bug66395_variation2-win32.phpt
index 4dc05dbeb1..7311b7797c 100644
--- a/ext/standard/tests/file/basename_bug66395_variation2-win32.phpt
+++ b/ext/standard/tests/file/basename_bug66395_variation2-win32.phpt
@@ -19,7 +19,6 @@ echo basename("x:y:z:hello\world:my.stream:\$DATA") . "\n";
echo basename("a:\\b:\\c:d:hello\\world:c:\$DATA") . "\n";
echo basename("a:\\b:\\c:d:hello\\d:world:c:\$DATA") . "\n";
?>
-==DONE==
--EXPECT--
y
y
@@ -35,4 +34,3 @@ world:some.stream:$DATA
world:my.stream:$DATA
world:c:$DATA
world:c:$DATA
-==DONE==
diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt
index 5460203e05..174e349b15 100644
--- a/ext/standard/tests/file/bug39863.phpt
+++ b/ext/standard/tests/file/bug39863.phpt
@@ -7,16 +7,11 @@ Andrew van der Stock, vanderaj @ owasp.org
$filename = __FILE__ . chr(0). ".ridiculous";
-if (file_exists($filename)) {
- echo "FAIL\n";
-}
-else {
- echo "PASS\n";
+try {
+ var_dump(file_exists($filename));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
}
?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d
-PASS
-===DONE===
+--EXPECT--
+file_exists() expects parameter 1 to be a valid path, string given
diff --git a/ext/standard/tests/file/bug41693.phpt b/ext/standard/tests/file/bug41693.phpt
deleted file mode 100644
index ea074fa4fd..0000000000
--- a/ext/standard/tests/file/bug41693.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Bug #41693 (scandir() allows empty directory names)
---FILE--
-<?php
-
-var_dump(scandir(''));
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/file/bug47517.phpt b/ext/standard/tests/file/bug47517.phpt
index f8c9e41446..9a95ff52e7 100644
--- a/ext/standard/tests/file/bug47517.phpt
+++ b/ext/standard/tests/file/bug47517.phpt
@@ -15,7 +15,5 @@ if (!$status) {
/* This has to behave same way on both 64- and 32-bits. */
file_put_contents('C:\Program Files\myfile.txt', 'hello');
?>
-==DONE==
--EXPECTF--
Warning: file_put_contents(C:\Program Files\myfile.txt): failed to open stream: Permission denied in %sbug47517.php on line %d
-==DONE==
diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt
index e51c27e457..b5690484a2 100644
--- a/ext/standard/tests/file/bug52820.phpt
+++ b/ext/standard/tests/file/bug52820.phpt
@@ -10,7 +10,7 @@ if (!extension_loaded("curl")) exit("skip curl extension not loaded");
$handle=curl_init('http://127.0.0.1:37349/');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
-if (!curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
+if (!@curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
die("skip fopencookie not supported on this platform");
--FILE--
<?php
diff --git a/ext/standard/tests/file/bug61961.phpt b/ext/standard/tests/file/bug61961.phpt
index a2d83fe77e..c9ae4c8880 100644
--- a/ext/standard/tests/file/bug61961.phpt
+++ b/ext/standard/tests/file/bug61961.phpt
@@ -8,7 +8,5 @@ file_put_contents($tmp_empty_file, "");
var_dump(file_get_contents($tmp_empty_file, NULL, NULL, NULL, 10));
unlink($tmp_empty_file);
?>
-==DONE==
--EXPECT--
string(0) ""
-==DONE==
diff --git a/ext/standard/tests/file/bug71882.phpt b/ext/standard/tests/file/bug71882.phpt
index c132aa95c7..ce3adb1def 100644
--- a/ext/standard/tests/file/bug71882.phpt
+++ b/ext/standard/tests/file/bug71882.phpt
@@ -5,8 +5,6 @@ Bug #71882 (Negative ftruncate() on php://memory exhausts memory)
$fd = fopen("php://memory", "w+");
var_dump(ftruncate($fd, -1));
?>
-==DONE==
--EXPECTF--
Warning: ftruncate(): Negative size is not supported in %s%ebug71882.php on line %d
bool(false)
-==DONE==
diff --git a/ext/standard/tests/file/bug72035.phpt b/ext/standard/tests/file/bug72035.phpt
index 704d746efc..1fd5b5c148 100644
--- a/ext/standard/tests/file/bug72035.phpt
+++ b/ext/standard/tests/file/bug72035.phpt
@@ -3,7 +3,6 @@ Bug #72035 php-cgi.exe fails to run scripts relative to drive root
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) die('skip windows only test');
-if(php_sapi_name() != "cli") die('skip CLI only test');
$cgi = realpath(dirname(PHP_BINARY)) . DIRECTORY_SEPARATOR . "php-cgi.exe";
if (!file_exists($cgi)) die('skip CGI binary not found');
@@ -31,10 +30,8 @@ if (is_resource($proc)) {
unlink($fl);
?>
-==DONE==
--EXPECTF--
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
hello
-==DONE==
diff --git a/ext/standard/tests/file/bug74719.phpt b/ext/standard/tests/file/bug74719.phpt
index 57309bcf06..ab888d682f 100644
--- a/ext/standard/tests/file/bug74719.phpt
+++ b/ext/standard/tests/file/bug74719.phpt
@@ -33,11 +33,9 @@ if (rmdir($tmpDir, NULL)) {
}
?>
-===DONE===
--EXPECT--
ok
ok
ok
ok
ok
-===DONE===
diff --git a/ext/standard/tests/file/bug75679.phpt b/ext/standard/tests/file/bug75679.phpt
index 1441447853..df8b994781 100644
--- a/ext/standard/tests/file/bug75679.phpt
+++ b/ext/standard/tests/file/bug75679.phpt
@@ -24,7 +24,6 @@ foreach ($Files2Report as $file => &$Report)
?>
-==DONE==
--CLEAN--
<?php
$d = __DIR__;
@@ -63,4 +62,3 @@ Array
[strlen] => 261
[result] => ok
)
-==DONE==
diff --git a/ext/standard/tests/file/chmod_error.phpt b/ext/standard/tests/file/chmod_error.phpt
index 3b234c741f..e45ee4ecba 100644
--- a/ext/standard/tests/file/chmod_error.phpt
+++ b/ext/standard/tests/file/chmod_error.phpt
@@ -10,38 +10,13 @@ Test chmod() function : error conditions
echo "*** Testing chmod() : error conditions ***\n";
-
-//Test chmod with one more than the expected number of arguments
-echo "\n-- Testing chmod() function with more than expected no. of arguments --\n";
-$filename = 'string_val';
-$mode = 10;
-$extra_arg = 10;
-var_dump( chmod($filename, $mode, $extra_arg) );
-
-// Testing chmod with one less than the expected number of arguments
-echo "\n-- Testing chmod() function with less than expected no. of arguments --\n";
-$filename = 'string_val';
-var_dump( chmod($filename) );
-
// testing chmod with a non-existing file
$filename = "___nonExisitingFile___";
var_dump(chmod($filename, 0777));
?>
-===DONE===
--EXPECTF--
*** Testing chmod() : error conditions ***
--- Testing chmod() function with more than expected no. of arguments --
-
-Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
--- Testing chmod() function with less than expected no. of arguments --
-
-Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
Warning: chmod(): No such file or directory in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/copy_error.phpt b/ext/standard/tests/file/copy_error.phpt
index 2d6395167b..36eb58fc2a 100644
--- a/ext/standard/tests/file/copy_error.phpt
+++ b/ext/standard/tests/file/copy_error.phpt
@@ -11,13 +11,6 @@ echo "*** Testing copy() function: error conditions --\n";
/* Invalid args */
var_dump( copy("/no/file", "file") );
-/* No.of args less than expected */
-var_dump( copy() );
-var_dump( copy(__FILE__) );
-
-/* No.of args less than expected */
-var_dump( copy(__FILE__, "file1", "file1") );
-
echo "*** Done ***\n";
?>
--EXPECTF--
@@ -25,13 +18,4 @@ echo "*** Done ***\n";
Warning: copy(/no/file): failed to open stream: No such file or directory in %s on line %d
bool(false)
-
-Warning: copy() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: copy() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: copy() expects parameter 3 to be resource, string given in %s on line %d
-NULL
*** Done ***
diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt
index b082c082b5..01385cb893 100644
--- a/ext/standard/tests/file/copy_variation4.phpt
+++ b/ext/standard/tests/file/copy_variation4.phpt
Binary files differ
diff --git a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt
index 9131a4cfcd..14f7bac438 100644
--- a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt
+++ b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt
@@ -7,7 +7,5 @@ $h = opendir($d);
var_dump(fstat($h));
closedir($h);
?>
-===DONE===
--EXPECT--
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/dirname_basic-win32.phpt b/ext/standard/tests/file/dirname_basic-win32.phpt
index bb53255fc8..f596f9a359 100644
--- a/ext/standard/tests/file/dirname_basic-win32.phpt
+++ b/ext/standard/tests/file/dirname_basic-win32.phpt
@@ -57,7 +57,6 @@ foreach ($paths as $path) {
}
?>
-===DONE===
--EXPECT--
*** Testing dirname() : basic functionality ***
string(0) ""
@@ -90,4 +89,3 @@ string(1) "."
string(14) " c:\test\adir"
string(1) "\"
string(1) "\"
-===DONE===
diff --git a/ext/standard/tests/file/dirname_basic.phpt b/ext/standard/tests/file/dirname_basic.phpt
index 74d0a14e9e..774192830a 100644
--- a/ext/standard/tests/file/dirname_basic.phpt
+++ b/ext/standard/tests/file/dirname_basic.phpt
@@ -57,7 +57,6 @@ foreach ($paths as $path) {
}
?>
-===DONE===
--EXPECT--
*** Testing dirname() : basic functionality ***
string(0) ""
@@ -90,4 +89,3 @@ string(1) "."
string(1) "."
string(1) "/"
string(1) "/"
-===DONE===
diff --git a/ext/standard/tests/file/dirname_no_path_normalization-win32.phpt b/ext/standard/tests/file/dirname_no_path_normalization-win32.phpt
index 2bb227b5c2..6098ca2694 100644
--- a/ext/standard/tests/file/dirname_no_path_normalization-win32.phpt
+++ b/ext/standard/tests/file/dirname_no_path_normalization-win32.phpt
@@ -21,7 +21,5 @@ if (strlen($s) >= 10000) {
var_dump(strlen($s));
}
?>
-===DONE===
--EXPECT--
OK
-===DONE===
diff --git a/ext/standard/tests/file/disk.phpt b/ext/standard/tests/file/disk.phpt
index a048af6ccb..fe415535ba 100644
--- a/ext/standard/tests/file/disk.phpt
+++ b/ext/standard/tests/file/disk.phpt
@@ -11,9 +11,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
--FILE--
<?php
-var_dump(disk_free_space());
-var_dump(disk_total_space());
-
var_dump(disk_free_space(-1));
var_dump(disk_total_space(-1));
@@ -26,12 +23,6 @@ var_dump(disk_total_space("/some/path/here"));
echo "Done\n";
?>
--EXPECTF--
-Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
Warning: disk_free_space(): No such file or directory in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/disk_free_space_error-win32.phpt b/ext/standard/tests/file/disk_free_space_error-win32.phpt
index 43e71719c0..e7439d3f34 100644
--- a/ext/standard/tests/file/disk_free_space_error-win32.phpt
+++ b/ext/standard/tests/file/disk_free_space_error-win32.phpt
@@ -16,12 +16,6 @@ if(substr(PHP_OS, 0, 3) != 'WIN' )
echo "*** Testing error conditions ***\n";
$file_path = __DIR__;
-var_dump( disk_free_space() ); // Zero Arguments
-var_dump( diskfreespace() );
-
-var_dump( disk_free_space( $file_path, "extra argument") ); // More than valid number of arguments
-var_dump( diskfreespace( $file_path, "extra argument") );
-
var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory
var_dump( diskfreespace( $file_path."/dir1" ));
@@ -43,18 +37,6 @@ unlink($file_path."/disk_free_space.tmp");
--EXPECTF--
*** Testing error conditions ***
-Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: disk_free_space(): The system cannot find the path specified.
in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt
index aca17b2331..ea8d84aa36 100644
--- a/ext/standard/tests/file/disk_free_space_error.phpt
+++ b/ext/standard/tests/file/disk_free_space_error.phpt
@@ -16,12 +16,6 @@ if(substr(PHP_OS, 0, 3) == 'WIN')
echo "*** Testing error conditions ***\n";
$file_path = __DIR__;
-var_dump( disk_free_space() ); // Zero Arguments
-var_dump( diskfreespace() );
-
-var_dump( disk_free_space( $file_path, "extra argument") ); // More than valid number of arguments
-var_dump( diskfreespace( $file_path, "extra argument") );
-
var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory
var_dump( diskfreespace( $file_path."/dir1" ));
@@ -43,18 +37,6 @@ unlink($file_path."/disk_free_space.tmp");
--EXPECTF--
*** Testing error conditions ***
-Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: disk_free_space(): No such file or directory in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt
index 25eeadf800..d47850d898 100644
--- a/ext/standard/tests/file/disk_free_space_variation.phpt
+++ b/ext/standard/tests/file/disk_free_space_variation.phpt
@@ -48,8 +48,16 @@ $count = 1;
/* loop through to test each element the above array */
foreach($dirs_arr as $dir1) {
echo "\n-- Iteration $count --\n";
- var_dump( disk_free_space( $dir1 ) );
- var_dump( diskfreespace( $dir1 ) );
+ try {
+ var_dump( disk_free_space( $dir1 ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( diskfreespace( $dir1 ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count++;
}
@@ -102,35 +110,19 @@ float(%d)
float(%d)
-- Iteration 9 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
-- Iteration 10 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
-- Iteration 11 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
-- Iteration 12 --
-
-Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_free_space() expects parameter 1 to be a valid path, string given
+diskfreespace() expects parameter 1 to be a valid path, string given
--- Done ---
diff --git a/ext/standard/tests/file/disk_total_space_error-win32.phpt b/ext/standard/tests/file/disk_total_space_error-win32.phpt
index c3a2854eff..5896ad213b 100644
--- a/ext/standard/tests/file/disk_total_space_error-win32.phpt
+++ b/ext/standard/tests/file/disk_total_space_error-win32.phpt
@@ -16,10 +16,6 @@ if(substr(PHP_OS, 0, 3) != 'WIN' )
echo "*** Testing error conditions ***\n";
$file_path = __DIR__;
-var_dump( disk_total_space() ); // Zero Arguments
-
-var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments
-
var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory
@@ -38,12 +34,6 @@ unlink($file_path."/disk_total_space.tmp");
--EXPECTF--
*** Testing error conditions ***
-Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_total_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: disk_total_space(): The system cannot find the path specified.
in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt
index 125d093ccd..6c2c3bf833 100644
--- a/ext/standard/tests/file/disk_total_space_error.phpt
+++ b/ext/standard/tests/file/disk_total_space_error.phpt
@@ -16,10 +16,6 @@ if(substr(PHP_OS, 0, 3) == 'WIN')
echo "*** Testing error conditions ***\n";
$file_path = __DIR__;
-var_dump( disk_total_space() ); // Zero Arguments
-
-var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments
-
var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory
@@ -38,12 +34,6 @@ unlink($file_path."/disk_total_space.tmp");
--EXPECTF--
*** Testing error conditions ***
-Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: disk_total_space() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: disk_total_space(): No such file or directory in %s on line %d
bool(false)
float(%d)
diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt
index 3ba3771aac..326fd9ea25 100644
--- a/ext/standard/tests/file/disk_total_space_variation.phpt
+++ b/ext/standard/tests/file/disk_total_space_variation.phpt
@@ -49,7 +49,11 @@ $count = 1;
/* loop through to test each element the above array */
foreach($dirs_arr as $dir1) {
echo "\n-- Iteration $count --\n";
- var_dump( disk_total_space( $dir1 ) );
+ try {
+ var_dump( disk_total_space( $dir1 ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count++;
}
@@ -96,25 +100,17 @@ float(%d)
float(%d)
-- Iteration 9 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
-- Iteration 10 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
-- Iteration 11 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
-- Iteration 12 --
-
-Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+disk_total_space() expects parameter 1 to be a valid path, string given
*** Testing with Binary Input ***
-float(%d)
+float(%s)
--- Done ---
diff --git a/ext/standard/tests/file/fclose_variation1.phpt b/ext/standard/tests/file/fclose_variation1.phpt
index ba3631e50d..8d3e1a1805 100644
--- a/ext/standard/tests/file/fclose_variation1.phpt
+++ b/ext/standard/tests/file/fclose_variation1.phpt
@@ -7,9 +7,13 @@ function separate_zval(&$var) { }
$s2 = $s;
separate_zval($s2);
fclose($s);
-echo fread($s2, strlen("<?php"));
+try {
+ echo fread($s2, strlen("<?php"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\nDone.\n";
---EXPECTF--
-Warning: fread(): supplied resource is not a valid stream resource in %s on line %d
+--EXPECT--
+fread(): supplied resource is not a valid stream resource
Done.
diff --git a/ext/standard/tests/file/feof_basic.phpt b/ext/standard/tests/file/feof_basic.phpt
index 2fc2e4b855..0711a3468d 100644
--- a/ext/standard/tests/file/feof_basic.phpt
+++ b/ext/standard/tests/file/feof_basic.phpt
@@ -64,13 +64,17 @@ var_dump(feof($h));
echo "*** closing file, testing eof ***\n";
fclose($h);
-feof($h);
+try {
+ feof($h);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
unlink($tmpFile1);
unlink($tmpFile2);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing feof() : basic functionality ***
*** testing reading complete file using feof to stop ***
@@ -96,6 +100,5 @@ bool(false)
*** testing feof after a seek passed the end ***
bool(false)
*** closing file, testing eof ***
-
-Warning: feof(): supplied resource is not a valid stream resource in %s on line %d
+feof(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fgetc_variation2.phpt b/ext/standard/tests/file/fgetc_variation2.phpt
index d444209af4..d67e56e56a 100644
--- a/ext/standard/tests/file/fgetc_variation2.phpt
+++ b/ext/standard/tests/file/fgetc_variation2.phpt
@@ -24,29 +24,16 @@ $file_handle = fopen(__FILE__, "r");
fclose($file_handle);
// read from closed file
-var_dump( fgetc($file_handle) );
-
-echo "-- Testing fgetc() with unset handle --\n";
-// open the file for reading
-$file_handle = fopen(__FILE__, "r");
-// unset the file handle
-unset($file_handle);
-
-//fgetc using unset handle
-var_dump( fgetc($file_handle) );
+try {
+ var_dump( fgetc($file_handle) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing fgetc() : usage variations ***
-- Testing fgetc() with closed handle --
-
-Warning: fgetc(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
--- Testing fgetc() with unset handle --
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgetc() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+fgetc(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fgetcsv_variation32.phpt b/ext/standard/tests/file/fgetcsv_variation32.phpt
index eac1046c44..839e51734b 100644
--- a/ext/standard/tests/file/fgetcsv_variation32.phpt
+++ b/ext/standard/tests/file/fgetcsv_variation32.phpt
@@ -15,7 +15,6 @@ while (($data = fgetcsv($stream, 0, ',', '"', '')) !== false) {
}
fclose($stream);
?>
-===DONE===
--EXPECT--
Array
(
@@ -29,4 +28,3 @@ Array
[0] => \\\line1
line2\\\
)
-===DONE===
diff --git a/ext/standard/tests/file/fgets_error.phpt b/ext/standard/tests/file/fgets_error.phpt
index 919343aa87..eed35b3001 100644
--- a/ext/standard/tests/file/fgets_error.phpt
+++ b/ext/standard/tests/file/fgets_error.phpt
@@ -8,14 +8,8 @@ Test fgets() function : error conditions
*/
echo "*** Testing error conditions ***\n";
-// zero argument
-echo "-- Testing fgets() with zero argument --\n";
-var_dump( fgets() );
-// more than expected no. of args
-echo "-- Testing fgets() with more than expected number of arguments --\n";
$fp = fopen(__FILE__, "r");
-var_dump( fgets($fp, 10, $fp) );
// invalid length argument
echo "-- Testing fgets() with invalid length arguments --\n";
@@ -26,45 +20,10 @@ var_dump( fgets($fp, $len) );
$len = 1;
var_dump( fgets($fp, $len) ); // return length - 1 always, expect false
-
-// test invalid arguments : non-resources
-echo "-- Testing fgets() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test fgets() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( fgets($invalid_args[$loop_counter - 1], 10) );
-}
-
-// fgets() on a file handle which is already closed
-echo "-- Testing fgets() with closed/unset file handle --";
-fclose($fp);
-var_dump(fgets($fp,10));
-
-// fgets() on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( fgets(@$file_handle,10));
-
echo "Done\n";
?>
--EXPECTF--
*** Testing error conditions ***
--- Testing fgets() with zero argument --
-
-Warning: fgets() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing fgets() with more than expected number of arguments --
-
-Warning: fgets() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-- Testing fgets() with invalid length arguments --
Warning: fgets(): Length parameter must be greater than 0 in %s on line %d
@@ -73,35 +32,4 @@ bool(false)
Warning: fgets(): Length parameter must be greater than 0 in %s on line %d
bool(false)
bool(false)
--- Testing fgets() with invalid arguments --
--- Iteration 1 --
-
-Warning: fgets() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fgets() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fgets() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fgets() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fgets() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fgets() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Testing fgets() with closed/unset file handle --
-Warning: fgets(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/file/fgets_variation2.phpt b/ext/standard/tests/file/fgets_variation2.phpt
index 0bbcf22039..2626139dcb 100644
--- a/ext/standard/tests/file/fgets_variation2.phpt
+++ b/ext/standard/tests/file/fgets_variation2.phpt
@@ -24,39 +24,22 @@ $file_handle = fopen(__FILE__, "r");
fclose($file_handle);
// read from closed file
-var_dump( fgets($file_handle) ); // default length
-var_dump( fgets($file_handle, 10) ); // with specific length
-
-echo "-- Testing fgets() with unset handle --\n";
-// open the file for reading
-$file_handle = fopen(__FILE__, "r");
-// unset the file handle
-unset($file_handle);
-
-//fgets using unset handle
-var_dump( fgets($file_handle) ); // default length
-var_dump( fgets($file_handle, 10) ); // with specific length
+try {
+ var_dump( fgets($file_handle) ); // default length
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( fgets($file_handle, 10) ); // with specific length
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing fgets() : usage variations ***
-- Testing fgets() with closed handle --
-
-Warning: fgets(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fgets(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
--- Testing fgets() with unset handle --
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+fgets(): supplied resource is not a valid stream resource
+fgets(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fgetss.phpt b/ext/standard/tests/file/fgetss.phpt
deleted file mode 100644
index 7ca6169762..0000000000
--- a/ext/standard/tests/file/fgetss.phpt
+++ /dev/null
@@ -1,144 +0,0 @@
---TEST--
-fgetss() tests
---FILE--
-<?php
-
-$filename = __DIR__."/fgetss.html";
-
-$array = array(
- "askasdfasdf<b>aaaaaa\n</b>dddddd",
- "asdqw<i onClick=\"hello();\">\naaaa<>qqqq",
- "aaa<script>function foo() {}</script>qqq",
- "asdasd<a\n asdjeje",
- "",
- "some text \n<b>blah</i>",
- "some another text <> hoho </>"
- );
-
-foreach ($array as $str) {
- file_put_contents($filename, $str);
- $fp = fopen($filename, "r");
- var_dump(fgetss($fp));
- var_dump(fgetss($fp));
-}
-
-foreach ($array as $str) {
- file_put_contents($filename, $str);
- $fp = fopen($filename, "r");
- var_dump(fgetss($fp, 10));
- var_dump(fgetss($fp, 10));
-}
-
-var_dump(fgetss($fp, -10));
-var_dump(fgetss($fp, 0));
-fclose($fp);
-var_dump(fgetss($fp, 0));
-
-@unlink($filename);
-
-echo "Done\n";
-?>
---EXPECTF--
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(18) "askasdfasdfaaaaaa
-"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(6) "dddddd"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(6) "asdqw
-"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(8) "aaaaqqqq"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(23) "aaafunction foo() {}qqq"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(6) "asdasd"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(0) ""
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(11) "some text
-"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(4) "blah"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(24) "some another text hoho "
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(9) "askasdfas"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(6) "dfaaaa"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(5) "asdqw"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(0) ""
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(3) "aaa"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(7) "functio"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(6) "asdasd"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(0) ""
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(9) "some text"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(2) "
-"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(9) "some anot"
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-string(9) "her text "
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-
-Warning: fgetss(): Length parameter must be greater than 0 in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-
-Warning: fgetss(): Length parameter must be greater than 0 in %s on line %d
-bool(false)
-
-Deprecated: Function fgetss() is deprecated in %s on line %d
-
-Warning: fgetss(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss1.phpt b/ext/standard/tests/file/fgetss1.phpt
deleted file mode 100644
index 55b6adbe6b..0000000000
--- a/ext/standard/tests/file/fgetss1.phpt
+++ /dev/null
@@ -1,73 +0,0 @@
---TEST--
-more fgetss() tests
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-$filename = __DIR__."/fgetss1.html";
-
-$array = array(
- "askasdfasdf<b>aaaaaa\n</b>dddddd",
- "asdqw<i onClick=\"hello();\">\naaaa<>qqqq",
- "aaa<script>function foo() {}</script>qqq",
- "asdasd<a\n asdjeje",
- "",
- "some text \n<b>blah</i>",
- "some another text <> hoho </>"
- );
-
-foreach ($array as $str) {
- file_put_contents($filename, $str);
- $fp = fopen($filename, "r");
- var_dump(fgetss($fp, 1000, "<i>,<b>,<a>"));
- var_dump(fgetss($fp));
-}
-
-foreach ($array as $str) {
- file_put_contents($filename, $str);
- $fp = fopen($filename, "r");
- var_dump(fgetss($fp, 10));
- var_dump(fgetss($fp, 10, "<script>,<a>"));
-}
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-$filename = __DIR__."/fgetss1.html";
-unlink($filename);
-?>
---EXPECT--
-string(21) "askasdfasdf<b>aaaaaa
-"
-string(6) "dddddd"
-string(28) "asdqw<i onClick="hello();">
-"
-string(8) "aaaaqqqq"
-string(23) "aaafunction foo() {}qqq"
-bool(false)
-string(6) "asdasd"
-string(0) ""
-bool(false)
-bool(false)
-string(11) "some text
-"
-string(4) "blah"
-string(24) "some another text hoho "
-bool(false)
-string(9) "askasdfas"
-string(6) "dfaaaa"
-string(5) "asdqw"
-string(0) ""
-string(3) "aaa"
-string(9) "t>functio"
-string(6) "asdasd"
-string(0) ""
-bool(false)
-bool(false)
-string(9) "some text"
-string(2) "
-"
-string(9) "some anot"
-string(9) "her text "
-Done
diff --git a/ext/standard/tests/file/fgetss_basic1.phpt b/ext/standard/tests/file/fgetss_basic1.phpt
deleted file mode 100644
index 80d1b74f3c..0000000000
--- a/ext/standard/tests/file/fgetss_basic1.phpt
+++ /dev/null
@@ -1,137 +0,0 @@
---TEST--
-Test fgetss() function : Basic functionality - read modes only
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* test fgetss with all read modes */
-
-// include the common file related test functions
-include ("file.inc");
-
-echo "*** Testing fgetss() : Basic operations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-EOT;
-
-if(substr(PHP_OS, 0, 3) == "WIN") {
- $string_with_tags = str_replace("\r",'', $string_with_tags);
-}
-/* try reading the file opened in different modes of reading */
-$file_modes = array("r","rb", "rt","r+", "r+b", "r+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $filename = __DIR__."/fgetss_basic1.tmp";
- create_file ($filename); //create an empty file
- file_put_contents($filename, $string_with_tags);
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- rewind($file_handle);
- /* read entire file and strip tags */
- echo "-- fgetss() with default length, file pointer at 0 --\n";
- var_dump( fgetss($file_handle) ); // no length and allowable tags provided, reads entire file
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- rewind($file_handle);
- /* read entire file and strip tags tags */
- echo "-- fgets() with length = 30, file pointer at 0 --\n";
- var_dump( fgetss($file_handle ,30) ); // length parameter given,not reading entire file
- var_dump( ftell($file_handle) ); // checking file pointer position initially
- var_dump( feof($file_handle) ); // confirm file pointer is not at eof
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- delete_file($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : Basic operations ***
-
--- Testing fgetss() with file opened using r mode --
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using rb mode --
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using rt mode --
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using r+ mode --
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using r+b mode --
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using r+t mode --
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt b/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt
deleted file mode 100644
index 68fd7059d0..0000000000
--- a/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test fgetss() function : Basic functionality - read/write modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only on Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
-*/
-
-
-echo "*** Testing fgetss() : basic operations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-EOT;
-if(substr(PHP_OS, 0, 3) == "WIN") {
- $string_with_tags = str_replace("\r",'', $string_with_tags);
-}
-$filename = __DIR__."/fgetss_basic2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- /* read entire file and strip tags */
- echo "-- fgetss() with default length, file pointer at 0 --\n";
- var_dump( fgetss($file_handle) ); // no length and allowable tags provided, reads entire file
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- rewind($file_handle);
- /* read entire file and strip tags tags */
- echo "-- fgets() with length = 30, file pointer at 0 --\n";
- var_dump( fgetss($file_handle ,30) ); // length parameter given,not reading entire file
- var_dump( ftell($file_handle) ); // checking file pointer position initially
- var_dump( feof($file_handle) ); // confirm file pointer is not at eof
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : basic operations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using w+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using w+t mode --
-int(195)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+t mode --
-int(195)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+t mode --
-int(195)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_basic2-win32.phpt b/ext/standard/tests/file/fgetss_basic2-win32.phpt
deleted file mode 100644
index 9e9ab50788..0000000000
--- a/ext/standard/tests/file/fgetss_basic2-win32.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test fgetss() function : Basic functionality - read/write modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only on Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
-*/
-
-
-echo "*** Testing fgetss() : basic operations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-EOT;
-if(substr(PHP_OS, 0, 3) == "WIN") {
- $string_with_tags = str_replace("\r",'', $string_with_tags);
-}
-$filename = __DIR__."/fgetss_basic2.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- /* read entire file and strip tags */
- echo "-- fgetss() with default length, file pointer at 0 --\n";
- var_dump( fgetss($file_handle) ); // no length and allowable tags provided, reads entire file
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- rewind($file_handle);
- /* read entire file and strip tags tags */
- echo "-- fgets() with length = 30, file pointer at 0 --\n";
- var_dump( fgetss($file_handle ,30) ); // length parameter given,not reading entire file
- var_dump( ftell($file_handle) ); // checking file pointer position initially
- var_dump( feof($file_handle) ); // confirm file pointer is not at eof
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : basic operations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using w+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using w+t mode --
-int(195)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+t mode --
-int(195)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+t mode --
-int(195)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_basic2.phpt b/ext/standard/tests/file/fgetss_basic2.phpt
deleted file mode 100644
index 887a752435..0000000000
--- a/ext/standard/tests/file/fgetss_basic2.phpt
+++ /dev/null
@@ -1,216 +0,0 @@
---TEST--
-Test fgetss() function : Basic functionality - read/write modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
-*/
-
-
-echo "*** Testing fgetss() : basic operations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-EOT;
-
-$filename = __DIR__."/fgetss_basic2.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- /* read entire file and strip tags */
- echo "-- fgetss() with default length, file pointer at 0 --\n";
- var_dump( fgetss($file_handle) ); // no length and allowable tags provided, reads entire file
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- rewind($file_handle);
- /* read entire file and strip tags tags */
- echo "-- fgets() with length = 30, file pointer at 0 --\n";
- var_dump( fgetss($file_handle ,30) ); // length parameter given,not reading entire file
- var_dump( ftell($file_handle) ); // checking file pointer position initially
- var_dump( feof($file_handle) ); // confirm file pointer is not at eof
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : basic operations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using w+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using w+t mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using a+t mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+ mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+b mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-
--- Testing fgetss() with file opened using x+t mode --
-int(192)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 --
-string(27) "Testing fgetss() functions
-"
-int(40)
-bool(false)
--- fgets() with length = 30, file pointer at 0 --
-string(23) "Testing fgetss() functi"
-int(29)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_error.phpt b/ext/standard/tests/file/fgetss_error.phpt
deleted file mode 100644
index 13a5399406..0000000000
--- a/ext/standard/tests/file/fgetss_error.phpt
+++ /dev/null
@@ -1,108 +0,0 @@
---TEST--
-Test fgetss() function : error conditions
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-echo "*** Testing error conditions ***\n";
-// zero argument
-echo "-- Testing fgetss() with zero argument --\n";
-var_dump( fgetss() );
-
-// more than expected no. of args
-echo "-- Testing fgetss() with more than expected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( fgetss($fp, 100, '<p><a>', $fp) );
-
-// invalid length argument
-echo "-- Testing fgetss() with invalid length arguments --\n";
-$len = 0;
-$allowable_tags = '<p><a>';
-var_dump( fgetss($fp, $len, $allowable_tags) );
-$len = -10;
-var_dump( fgetss($fp, $len, $allowable_tags) );
-$len = 1;
-var_dump( fgetss($fp, $len, $allowable_tags) ); // return length - 1 always, expect false
-
-// test invalid arguments : non-resources
-echo "-- Testing fgetss() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test fgetss() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( fgetss($invalid_args[$loop_counter - 1], 10, $allowable_tags) );
-}
-// fgetss() on a file handle which is already closed
-echo "-- Testing fgetss() with closed/unset file handle --";
-fclose($fp);
-var_dump(fgetss($fp,10,$allowable_tags));
-
-// fgetss() on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( fgetss(@$file_handle,10));
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing error conditions ***
--- Testing fgetss() with zero argument --
-
-Warning: fgetss() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing fgetss() with more than expected number of arguments --
-
-Warning: fgetss() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
--- Testing fgetss() with invalid length arguments --
-
-Warning: fgetss(): Length parameter must be greater than 0 in %s on line %d
-bool(false)
-
-Warning: fgetss(): Length parameter must be greater than 0 in %s on line %d
-bool(false)
-bool(false)
--- Testing fgetss() with invalid arguments --
--- Iteration 1 --
-
-Warning: fgetss() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fgetss() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fgetss() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fgetss() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fgetss() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fgetss() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Testing fgetss() with closed/unset file handle --
-Warning: fgetss(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fgetss() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation1-win32.phpt b/ext/standard/tests/file/fgetss_variation1-win32.phpt
deleted file mode 100644
index 72e19c293f..0000000000
--- a/ext/standard/tests/file/fgetss_variation1-win32.phpt
+++ /dev/null
@@ -1,192 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - write only modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only on Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgets on files which are opened in non readable modes
- w, wb, wt,
- a, ab, at,
- x, xb, xt
-*/
-
-// include the common file related test functions
-include ("file.inc");
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-if(substr(PHP_OS, 0, 3) == "WIN") {
- $string_with_tags = str_replace("\r",'', $string_with_tags);
-}
-
-$filename = __DIR__."/fgetss_variation1.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w","wb", "wt","a", "ab", "at","x","xb","xt");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags);
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- /* read entire file and strip tags */
- echo "-- fgetss() with default length, file pointer at 0 , expected : no character should be read --\n";
- var_dump( fgetss($file_handle) ); // expected : no character should be read
- var_dump( ftell($file_handle) ); //ensure that file pointer position is not changed
- var_dump( feof($file_handle) ); // check if end of file pointer is set
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- delete_file($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using w mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using wb mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using wt mode --
-int(453)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using a mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using ab mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using at mode --
-int(453)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using x mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using xb mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using xt mode --
-int(453)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation1.phpt b/ext/standard/tests/file/fgetss_variation1.phpt
deleted file mode 100644
index e1a202388c..0000000000
--- a/ext/standard/tests/file/fgetss_variation1.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - write only modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgets on files which are opened in non readable modes
- w, wb, wt,
- a, ab, at,
- x, xb, xt
-*/
-
-// include the common file related test functions
-include ("file.inc");
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-$filename = __DIR__."/fgetss_variation1.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w","wb", "wt","a", "ab", "at","x","xb","xt");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags);
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- /* read entire file and strip tags */
- echo "-- fgetss() with default length, file pointer at 0 , expected : no character should be read --\n";
- var_dump( fgetss($file_handle) ); // expected : no character should be read
- var_dump( ftell($file_handle) ); //ensure that file pointer position is not changed
- var_dump( feof($file_handle) ); // check if end of file pointer is set
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- delete_file($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using w mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using wb mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using wt mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using a mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using ab mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using at mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using x mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using xb mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-
--- Testing fgetss() with file opened using xt mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- fgetss() with default length, file pointer at 0 , expected : no character should be read --
-
-Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
-bool(false)
-int(0)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation2.phpt b/ext/standard/tests/file/fgetss_variation2.phpt
deleted file mode 100644
index 7c581793c2..0000000000
--- a/ext/standard/tests/file/fgetss_variation2.phpt
+++ /dev/null
@@ -1,436 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - read modes
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-// include the common file related test functions
-include ("file.inc");
-
-/*Test fgetss() with all read modes , reading line by line with allowable tags: <test>, <html>, <?> */
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this is the text containing \r character
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-$filename = __DIR__."/fgetss_variation2.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("r","rb", "rt","r+", "r+b", "r+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- create_file ($filename); //create an empty file
- file_put_contents($filename, $string_with_tags);
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- /* rewind the file and read the file line by line with allowable tags */
- echo "-- Reading line by line with allowable tags: <test>, <html>, <?> --\n";
- rewind($file_handle);
- $line = 1;
- while( !feof($file_handle) ) {
- echo "-- Line $line --\n"; $line++;
- var_dump( fgetss($file_handle, 80, "<test>, <html>, <?>") );
- var_dump( ftell($file_handle) ); // check the file pointer position
- var_dump( feof($file_handle) ); // check if eof reached
- }
-
- // close the file
- fclose($file_handle);
- // delete the file
- delete_file($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using r mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(41) "this is the text containing character
-"
-int(383)
-bool(false)
--- Line 9 --
-string(46) "this text contains some html tags body br
-"
-int(451)
-bool(false)
--- Line 10 --
-string(23) "this is the line with
-"
-int(474)
-bool(false)
--- Line 11 --
-string(12) " character. "
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using rb mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(41) "this is the text containing character
-"
-int(383)
-bool(false)
--- Line 9 --
-string(46) "this text contains some html tags body br
-"
-int(451)
-bool(false)
--- Line 10 --
-string(23) "this is the line with
-"
-int(474)
-bool(false)
--- Line 11 --
-string(12) " character. "
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using rt mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(41) "this is the text containing character
-"
-int(383)
-bool(false)
--- Line 9 --
-string(46) "this text contains some html tags body br
-"
-int(451)
-bool(false)
--- Line 10 --
-string(23) "this is the line with
-"
-int(474)
-bool(false)
--- Line 11 --
-string(12) " character. "
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using r+ mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(41) "this is the text containing character
-"
-int(383)
-bool(false)
--- Line 9 --
-string(46) "this text contains some html tags body br
-"
-int(451)
-bool(false)
--- Line 10 --
-string(23) "this is the line with
-"
-int(474)
-bool(false)
--- Line 11 --
-string(12) " character. "
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using r+b mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(41) "this is the text containing character
-"
-int(383)
-bool(false)
--- Line 9 --
-string(46) "this text contains some html tags body br
-"
-int(451)
-bool(false)
--- Line 10 --
-string(23) "this is the line with
-"
-int(474)
-bool(false)
--- Line 11 --
-string(12) " character. "
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using r+t mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(41) "this is the text containing character
-"
-int(383)
-bool(false)
--- Line 9 --
-string(46) "this text contains some html tags body br
-"
-int(451)
-bool(false)
--- Line 10 --
-string(23) "this is the line with
-"
-int(474)
-bool(false)
--- Line 11 --
-string(12) " character. "
-int(486)
-bool(true)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation3-win32.phpt b/ext/standard/tests/file/fgetss_variation3-win32.phpt
deleted file mode 100644
index f53d76ce27..0000000000
--- a/ext/standard/tests/file/fgetss_variation3-win32.phpt
+++ /dev/null
@@ -1,573 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - read/write modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only valid for Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
- reading line by line with allowable tags: <test>, <html>, <?>
-*/
-
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-if(substr(PHP_OS, 0, 3) == "WIN") {
- $string_with_tags = str_replace("\r",'', $string_with_tags);
-}
-
-$filename = __DIR__."/fgetss_variation3.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- rewind($file_handle);
- var_dump( ftell($file_handle) );
- var_dump( filesize($filename) );
- var_dump( feof($file_handle) );
-
- /* rewind the file and read the file line by line with allowable tags */
- echo "-- Reading line by line with allowable tags: <test>, <html>, <?> --\n";
- $line = 1;
- while( !feof($file_handle) ) {
- echo "-- Line $line --\n"; $line++;
- var_dump( fgetss($file_handle, 80, "<test>, <html>, <?>") );
- var_dump( ftell($file_handle) ); // check the file pointer position
- var_dump( feof($file_handle) ); // check if eof reached
- }
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+b mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+t mode --
-int(0)
-int(453)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+ mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+b mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+t mode --
-int(0)
-int(453)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+ mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+b mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+t mode --
-int(0)
-int(453)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation3.phpt b/ext/standard/tests/file/fgetss_variation3.phpt
deleted file mode 100644
index d4120f7fc9..0000000000
--- a/ext/standard/tests/file/fgetss_variation3.phpt
+++ /dev/null
@@ -1,569 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - read/write modes
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
- reading line by line with allowable tags: <test>, <html>, <?>
-*/
-
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-$filename = __DIR__."/fgetss_variation3.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- rewind($file_handle);
- var_dump( ftell($file_handle) );
- var_dump( filesize($filename) );
- var_dump( feof($file_handle) );
-
- /* rewind the file and read the file line by line with allowable tags */
- echo "-- Reading line by line with allowable tags: <test>, <html>, <?> --\n";
- $line = 1;
- while( !feof($file_handle) ) {
- echo "-- Line $line --\n"; $line++;
- var_dump( fgetss($file_handle, 80, "<test>, <html>, <?>") );
- var_dump( ftell($file_handle) ); // check the file pointer position
- var_dump( feof($file_handle) ); // check if eof reached
- }
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+b mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+t mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+ mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+b mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+t mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+ mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+b mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+t mode --
-int(0)
-int(445)
-bool(false)
--- Reading line by line with allowable tags: <test>, <html>, <?> --
--- Line 1 --
-string(40) "<test>Testing fgetss() functions</test>
-"
-int(40)
-bool(false)
--- Line 2 --
-string(10) " {;} this
-"
-int(99)
-bool(false)
--- Line 3 --
-string(44) "is a heredoc string. ksklnm@@$$&$&^%&^%&^%&
-"
-int(152)
-bool(false)
--- Line 4 --
-string(21) "<html> html </html>
-"
-int(193)
-bool(false)
--- Line 5 --
-string(43) "this line is without any html and php tags
-"
-int(236)
-bool(false)
--- Line 6 --
-string(79) "this is a line with more than eighty character,want to check line splitting cor"
-int(315)
-bool(false)
--- Line 7 --
-string(27) "rectly after 80 characters
-"
-int(342)
-bool(false)
--- Line 8 --
-string(46) "this text contains some html tags body br
-"
-int(410)
-bool(false)
--- Line 9 --
-string(23) "this is the line with
-"
-int(433)
-bool(false)
--- Line 10 --
-string(12) " character. "
-int(445)
-bool(true)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation4.phpt b/ext/standard/tests/file/fgetss_variation4.phpt
deleted file mode 100644
index 585f277e72..0000000000
--- a/ext/standard/tests/file/fgetss_variation4.phpt
+++ /dev/null
@@ -1,170 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - read modes, file pointer at EOF
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) == "WIN")
- die("skip not for Windows");
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-// include the common file related test functions
-include ("file.inc");
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this is the text containing \r character
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-$filename = __DIR__."/fgetss_variation4.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("r","rb", "rt","r+", "r+b", "r+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- create_file ($filename); //create an empty file
- file_put_contents($filename, $string_with_tags);
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
-
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- echo "-- Reading when file pointer points to EOF --\n";
- var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
- var_dump( ftell($file_handle) ); //ensure file pointer at end
- var_dump( fgetss($file_handle) ); // try to read
- var_dump( ftell($file_handle) ); // find out file position
- var_dump( feof($file_handle) ); // ensure that file pointer is at eof
-
- // now file is at the end try reading with length and allowable tags,expecting false
- var_dump( fgetss($file_handle, 80, "<test>, <html>, <?>") );
- var_dump( ftell($file_handle) ); // find out file position
- var_dump( feof($file_handle) ); // ensure that file pointer is at eof
-
- // close the file
- fclose($file_handle);
- // delete the file
- delete_file($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using r mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(486)
-bool(false)
-int(486)
-bool(true)
-bool(false)
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using rb mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(486)
-bool(false)
-int(486)
-bool(true)
-bool(false)
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using rt mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(486)
-bool(false)
-int(486)
-bool(true)
-bool(false)
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using r+ mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(486)
-bool(false)
-int(486)
-bool(true)
-bool(false)
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using r+b mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(486)
-bool(false)
-int(486)
-bool(true)
-bool(false)
-int(486)
-bool(true)
-
--- Testing fgetss() with file opened using r+t mode --
-int(486)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(486)
-bool(false)
-int(486)
-bool(true)
-bool(false)
-int(486)
-bool(true)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation5-win32.phpt b/ext/standard/tests/file/fgetss_variation5-win32.phpt
deleted file mode 100644
index 035186fd09..0000000000
--- a/ext/standard/tests/file/fgetss_variation5-win32.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - read/write modes, file pointer at EOF
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only valid for Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
-*/
-
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-if(substr(PHP_OS, 0, 3) == "WIN") {
- $string_with_tags = str_replace("\r",'', $string_with_tags);
-}
-
-$filename = __DIR__."/fgetss_variation5.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- echo "-- Reading when file pointer points to EOF --\n";
- var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
- var_dump( ftell($file_handle) ); //ensure file pointer at end
- var_dump( fgetss($file_handle) ); // try to read
- var_dump( ftell($file_handle) ); // find out file position
- var_dump( feof($file_handle) ); // ensure that file pointer is at eof
-
- // now file is at the end try reading with length and allowable tags,expecting false
- var_dump( fgetss($file_handle, 80, "<test>, <html>, <?>") );
- var_dump( ftell($file_handle) ); // find out file position
- var_dump( feof($file_handle) ); // ensure that file pointer is at eof
-
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+b mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+t mode --
-int(453)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(453)
-bool(false)
-int(453)
-bool(true)
-bool(false)
-int(453)
-bool(true)
-
--- Testing fgetss() with file opened using a+ mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+b mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+t mode --
-int(453)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(453)
-bool(false)
-int(453)
-bool(true)
-bool(false)
-int(453)
-bool(true)
-
--- Testing fgetss() with file opened using x+ mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+b mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+t mode --
-int(453)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(453)
-bool(false)
-int(453)
-bool(true)
-bool(false)
-int(453)
-bool(true)
-Done
diff --git a/ext/standard/tests/file/fgetss_variation5.phpt b/ext/standard/tests/file/fgetss_variation5.phpt
deleted file mode 100644
index 928fdeadf5..0000000000
--- a/ext/standard/tests/file/fgetss_variation5.phpt
+++ /dev/null
@@ -1,219 +0,0 @@
---TEST--
-Test fgetss() function : usage variations - read/write modes, file pointer at EOF
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-/*
- Prototype: string fgetss ( resource $handle [, int $length [, string $allowable_tags]] );
- Description: Gets line from file pointer and strip HTML tags
-*/
-
-/* try fgetss on files which are opened in read/write modes
- w+, w+b, w+t,
- a+, a+b, a+t,
- x+, x+b, x+t
-*/
-
-
-echo "*** Testing fgetss() : usage variations ***\n";
-
-/* string with html and php tags */
-$string_with_tags = <<<EOT
-<test>Testing fgetss() functions</test>
-<?php echo "this string is within php tag"; ?> {;}<{> this
-is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
-<html> html </html> <?php echo "php"; ?>
-this line is without any html and php tags
-this is a line with more than eighty character,want to check line splitting correctly after 80 characters
-this text contains some html tags <body> body </body> <br> br </br>
-this is the line with \n character.
-EOT;
-
-$filename = __DIR__."/fgetss_variation5.tmp";
-
-/* try reading the file opened in different modes of reading */
-$file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t");
-
-for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
- echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
-
- /* create an empty file and write the strings with tags */
- $file_handle = fopen($filename, $file_modes[$mode_counter]);
- fwrite($file_handle,$string_with_tags); //writing data to the file
- if(!$file_handle) {
- echo "Error: failed to open file $filename!\n";
- exit();
- }
- // rewind the file pointer to beginning of the file
- var_dump( filesize($filename) );
- var_dump( rewind($file_handle) );
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
-
- echo "-- Reading when file pointer points to EOF --\n";
- var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
- var_dump( ftell($file_handle) ); //ensure file pointer at end
- var_dump( fgetss($file_handle) ); // try to read
- var_dump( ftell($file_handle) ); // find out file position
- var_dump( feof($file_handle) ); // ensure that file pointer is at eof
-
- // now file is at the end try reading with length and allowable tags,expecting false
- var_dump( fgetss($file_handle, 80, "<test>, <html>, <?>") );
- var_dump( ftell($file_handle) ); // find out file position
- var_dump( feof($file_handle) ); // ensure that file pointer is at eof
-
-
- // close the file
- fclose($file_handle);
-
- // delete the file
- unlink($filename);
-} // end of for - mode_counter
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fgetss() : usage variations ***
-
--- Testing fgetss() with file opened using w+ mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+b mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using w+t mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+ mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+b mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using a+t mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+ mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+b mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-
--- Testing fgetss() with file opened using x+t mode --
-int(445)
-bool(true)
-int(0)
-bool(false)
--- Reading when file pointer points to EOF --
-int(0)
-int(445)
-bool(false)
-int(445)
-bool(true)
-bool(false)
-int(445)
-bool(true)
-Done
diff --git a/ext/standard/tests/file/file_error.phpt b/ext/standard/tests/file/file_error.phpt
index d932966ee5..cd714cca0b 100644
--- a/ext/standard/tests/file/file_error.phpt
+++ b/ext/standard/tests/file/file_error.phpt
@@ -8,14 +8,10 @@ Test file() function : error conditions
Returns the file in an array
*/
$file_path = __DIR__;
-echo "\n*** Testing error conditions ***";
+echo "\n*** Testing error conditions ***\n";
$file_handle = fopen($file_path."/file.tmp", "w");
-var_dump( file() ); // Zero No. of args
$filename = $file_path."/file.tmp";
-var_dump( file($filename, $filename, $filename, $filename) ); // more than expected number of arguments
-
-var_dump( file($filename, "INCORRECT_FLAG", NULL) ); // Incorrect flag
var_dump( file($filename, 10, NULL) ); // Incorrect flag
var_dump( file("temp.tmp") ); // non existing filename
@@ -30,14 +26,6 @@ unlink($file_path."/file.tmp");
?>
--EXPECTF--
*** Testing error conditions ***
-Warning: file() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: file() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: file() expects parameter 2 to be int, string given in %s on line %d
-NULL
array(0) {
}
diff --git a/ext/standard/tests/file/file_get_contents_error.phpt b/ext/standard/tests/file/file_get_contents_error.phpt
index d4c6f16529..9757b3be2a 100644
--- a/ext/standard/tests/file/file_get_contents_error.phpt
+++ b/ext/standard/tests/file/file_get_contents_error.phpt
@@ -17,14 +17,8 @@ include($file_path."/file.inc");
echo "\n-- Testing with Non-existing file --\n";
print( file_get_contents("/no/such/file/or/dir") );
-echo "\n-- Testing No.of arguments less than expected --\n";
-print( file_get_contents() );
-
-echo "\n-- Testing No.of arguments greater than expected --\n";
-
create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte");
$file_handle = fopen($file_path."/file_put_contents_error.tmp", "w");
-print( file_get_contents($file_path."/file1.tmp", false, $file_handle, 1, 2, "extra_argument") );
echo "\n-- Testing for invalid negative maxlen values --";
var_dump( file_get_contents($file_path."/file1.tmp", FALSE, $file_handle, 0, -5) );
@@ -52,14 +46,6 @@ if(file_exists($file_path."/file_put_contents1.tmp")) {
Warning: file_get_contents(/no/such/file/or/dir): failed to open stream: No such file or directory in %s on line %d
--- Testing No.of arguments less than expected --
-
-Warning: file_get_contents() expects at least 1 parameter, 0 given in %s on line %d
-
--- Testing No.of arguments greater than expected --
-
-Warning: file_get_contents() expects at most 5 parameters, 6 given in %s on line %d
-
-- Testing for invalid negative maxlen values --
Warning: file_get_contents(): length must be greater than or equal to zero in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
index f34e6ef418..a50317e8db 100644
--- a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
+++ b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt
@@ -18,15 +18,7 @@ $file_path = __DIR__;
echo "\n-- Testing with Non-existing file --\n";
print( file_get_contents("/no/such/file/or/dir") );
-echo "\n-- Testing No.of arguments less than expected --\n";
-print( file_get_contents() );
-print( file_put_contents() );
-print( file_put_contents($file_path."/".__FILE__) );
-
$file_handle = fopen($file_path."/file_put_contents.tmp", "w");
-echo "\n-- Testing No.of arguments greater than expected --\n";
-print( file_put_contents("abc.tmp", 12345, 1, $file_handle, "extra_argument") );
-print( file_get_contents("abc.tmp", false, $file_handle, 1, 2, "extra_argument") );
echo "\n-- Testing for invalid negative maxlen values --";
file_put_contents($file_path."/file_put_contents1.tmp", "Garbage data in the file");
@@ -50,20 +42,6 @@ unlink($file_path."/file_put_contents1.tmp");
Warning: file_get_contents(/no/such/file/or/dir): failed to open stream: No such file or directory in %s on line %d
--- Testing No.of arguments less than expected --
-
-Warning: file_get_contents() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: file_put_contents() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: file_put_contents() expects at least 2 parameters, 1 given in %s on line %d
-
--- Testing No.of arguments greater than expected --
-
-Warning: file_put_contents() expects at most 4 parameters, 5 given in %s on line %d
-
-Warning: file_get_contents() expects at most 5 parameters, 6 given in %s on line %d
-
-- Testing for invalid negative maxlen values --
Warning: file_get_contents(): length must be greater than or equal to zero in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/file_get_contents_variation1.phpt b/ext/standard/tests/file/file_get_contents_variation1.phpt
index eb502e0527..36bed7cb10 100644
--- a/ext/standard/tests/file/file_get_contents_variation1.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation1.phpt
@@ -43,8 +43,6 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
*** Testing file_get_contents() : variation ***
File in include path
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation2.phpt b/ext/standard/tests/file/file_get_contents_variation2.phpt
index 8c24246aaa..b39c148b89 100644
--- a/ext/standard/tests/file/file_get_contents_variation2.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation2.phpt
@@ -44,8 +44,6 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
*** Testing file_get_contents() : variation ***
File in script location
-===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
index e8d6238715..e0fed02054 100644
--- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
@@ -40,11 +40,14 @@ $names_arr = array(
foreach($names_arr as $key =>$value) {
echo "\n-- Filename: $key --\n";
- var_dump(file_get_contents($value));
+ try {
+ var_dump(file_get_contents($value));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
?>
-===Done===
--EXPECTF--
*** Testing file_get_contents() : variation ***
@@ -79,14 +82,10 @@ Warning: file_get_contents( ): failed to open stream: Permission denied in %s on
bool(false)
-- Filename: \0 --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, string given
-- Filename: array() --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, array given
-- Filename: /no/such/file/dir --
@@ -97,4 +96,3 @@ bool(false)
Warning: file_get_contents(php/php): failed to open stream: No such file or directory in %s on line %d
bool(false)
-===Done===
diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt
index 06fd1b3a5f..9a7087c821 100644
--- a/ext/standard/tests/file/file_get_contents_variation8.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation8.phpt
@@ -39,7 +39,11 @@ $names_arr = array(
for( $i=0; $i<count($names_arr); $i++ ) {
echo "-- Iteration $i --\n";
- var_dump(file_get_contents($names_arr[$i]));
+ try {
+ var_dump(file_get_contents($names_arr[$i]));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
echo "\n*** Done ***\n";
@@ -71,13 +75,9 @@ bool(false)
Warning: file_get_contents( ): failed to open stream: No such file or directory in %s on line %d
bool(false)
-- Iteration 6 --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, string given
-- Iteration 7 --
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, array given
-- Iteration 8 --
Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/file_put_contents.phpt b/ext/standard/tests/file/file_put_contents.phpt
index be2a6ca0ac..f9dc6d1b8e 100644
--- a/ext/standard/tests/file/file_put_contents.phpt
+++ b/ext/standard/tests/file/file_put_contents.phpt
@@ -11,22 +11,27 @@ $file = __DIR__."/file_put_contents.txt";
$context = stream_context_create();
-var_dump(file_put_contents($file, $context));
+try {
+ var_dump(file_put_contents($file, $context));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(file_put_contents($file, new stdClass));
var_dump(file_put_contents($file, new foo));
$fp = fopen($file, "r");
-var_dump(file_put_contents($file, "string", 0, $fp));
+try {
+ var_dump(file_put_contents($file, "string", 0, $fp));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
@unlink($file);
echo "Done\n";
?>
---EXPECTF--
-Warning: file_put_contents(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+--EXPECT--
+file_put_contents(): supplied resource is not a valid stream resource
bool(false)
int(15)
-
-Warning: file_put_contents(): supplied resource is not a valid Stream-Context resource in %s on line %d
-int(6)
+file_put_contents(): supplied resource is not a valid Stream-Context resource
Done
diff --git a/ext/standard/tests/file/file_put_contents_variation1.phpt b/ext/standard/tests/file/file_put_contents_variation1.phpt
index b6f8815cd0..8302454d72 100644
--- a/ext/standard/tests/file/file_put_contents_variation1.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation1.phpt
@@ -31,7 +31,6 @@ unlink($filename);
?>
-===DONE===
--EXPECT--
*** Testing file_put_contents() : variation ***
int(25)
@@ -40,4 +39,3 @@ int(18)
The first string to write, followed by this
25
The first string to write
-===DONE===
diff --git a/ext/standard/tests/file/file_put_contents_variation2.phpt b/ext/standard/tests/file/file_put_contents_variation2.phpt
index ae56486d5f..279291f2cf 100644
--- a/ext/standard/tests/file/file_put_contents_variation2.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation2.phpt
@@ -13,10 +13,10 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
echo "*** Testing file_put_contents() : usage variation ***\n";
// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ if (error_reporting() & $err_no) {
// report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+ echo "Error: $err_no - $err_msg\n";
}
}
set_error_handler('test_error_handler');
@@ -109,8 +109,7 @@ foreach($inputs as $key =>$value) {
unlink($filename);
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing file_put_contents() : usage variation ***
--int 0--
@@ -138,8 +137,8 @@ unlink($filename);
--associative array--
12
--nested arrays--
-Error: 8 - Array to string conversion, %s(%d)
-Error: 8 - Array to string conversion, %s(%d)
+Error: 2 - Array to string conversion
+Error: 2 - Array to string conversion
fooArrayArray
--uppercase NULL--
@@ -164,4 +163,3 @@ Class A object
--undefined var--
--unset var--
-===DONE===
diff --git a/ext/standard/tests/file/file_put_contents_variation4.phpt b/ext/standard/tests/file/file_put_contents_variation4.phpt
index c7df0194ff..7d63ea4b7d 100644
--- a/ext/standard/tests/file/file_put_contents_variation4.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation4.phpt
@@ -43,8 +43,6 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
File in include path
File in include path
-===DONE===
diff --git a/ext/standard/tests/file/file_put_contents_variation5.phpt b/ext/standard/tests/file/file_put_contents_variation5.phpt
index c069c35a7e..d16db38b14 100644
--- a/ext/standard/tests/file/file_put_contents_variation5.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation5.phpt
@@ -41,10 +41,8 @@ function runtest() {
}
}
?>
-===DONE===
--EXPECT--
File written in working directory
File written in working directory
File written in working directory
File written in working directory
-===DONE===
diff --git a/ext/standard/tests/file/file_put_contents_variation6.phpt b/ext/standard/tests/file/file_put_contents_variation6.phpt
index 85f2aad363..389df4db27 100644
--- a/ext/standard/tests/file/file_put_contents_variation6.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation6.phpt
@@ -47,9 +47,7 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
*** Testing file_put_contents() : variation ***
File in include path. This was appended
File in include path. This was appended
-===DONE===
diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
index c21c2da986..656bea5d34 100644
--- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
@@ -37,18 +37,21 @@ $names_arr = array(
);
foreach($names_arr as $key =>$value) {
- echo "\n-- Filename: $key --\n";
- $res = file_put_contents($value, "Some data");
- if ($res !== false && $res != null) {
- echo "$res bytes written to: $value\n";
- unlink($value);
- } else {
- echo "Failed to write data to: $key\n";
- }
+ echo "\n-- Filename: $key --\n";
+ try {
+ $res = file_put_contents($value, "Some data");
+ if ($res !== false && $res != null) {
+ echo "$res bytes written to: $value\n";
+ unlink($value);
+ } else {
+ echo "Failed to write data to: $key\n";
+ }
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
-===Done===
--EXPECTF--
*** Testing file_put_contents() : usage variation ***
@@ -79,14 +82,10 @@ Warning: file_put_contents( ): failed to open stream: Permission denied in %s on
Failed to write data to: " "
-- Filename: \0 --
-
-Warning: file_put_contents() expects parameter 1 to be a valid path, string given in %s on line %d
-Failed to write data to: \0
+file_put_contents() expects parameter 1 to be a valid path, string given
-- Filename: array() --
-
-Warning: file_put_contents() expects parameter 1 to be a valid path, array given in %s on line %d
-Failed to write data to: array()
+file_put_contents() expects parameter 1 to be a valid path, array given
-- Filename: /no/such/file/dir --
@@ -97,4 +96,3 @@ Failed to write data to: /no/such/file/dir
Warning: file_put_contents(php/php): failed to open stream: %s in %s on line %d
Failed to write data to: php/php
-===Done===
diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt
index 497c68b2bb..be20782c4e 100644
--- a/ext/standard/tests/file/file_put_contents_variation8.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8.phpt
Binary files differ
diff --git a/ext/standard/tests/file/filegroup_error.phpt b/ext/standard/tests/file/filegroup_error.phpt
index e32711cd5b..e602f3441f 100644
--- a/ext/standard/tests/file/filegroup_error.phpt
+++ b/ext/standard/tests/file/filegroup_error.phpt
@@ -15,10 +15,6 @@ var_dump( filegroup("/no/such/file/dir") );
var_dump( filegroup("string") );
var_dump( filegroup(100) );
-/* Invalid no.of arguments */
-var_dump( filegroup() ); // args < expected
-var_dump( filegroup("/no/such/file", "root") ); // args > expected
-
echo "\n*** Done ***\n";
?>
--EXPECTF--
@@ -33,10 +29,4 @@ bool(false)
Warning: filegroup(): stat failed for 100 in %s on line %d
bool(false)
-Warning: filegroup() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filegroup() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Done ***
diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt
index 030f97a0f8..6c8b1826c3 100644
--- a/ext/standard/tests/file/filegroup_variation2.phpt
+++ b/ext/standard/tests/file/filegroup_variation2.phpt
@@ -13,7 +13,6 @@ obscure_filename
/* Testing filegroup() with invalid arguments -int, float, bool, NULL, resource */
$file_path = __DIR__;
-$file_handle = fopen($file_path."/filegroup_variation2.tmp", "w");
echo "*** Testing Invalid file types ***\n";
$filenames = array(
@@ -24,7 +23,6 @@ $filenames = array(
TRUE,
FALSE,
NULL,
- $file_handle,
/* scalars */
1234,
@@ -36,7 +34,6 @@ foreach( $filenames as $filename ) {
var_dump( filegroup($filename) );
clearstatcache();
}
-fclose($file_handle);
?>
--CLEAN--
<?php
@@ -58,9 +55,6 @@ bool(false)
bool(false)
bool(false)
-Warning: filegroup() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
Warning: filegroup(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt
index a43a54da0d..274f12bb70 100644
--- a/ext/standard/tests/file/filegroup_variation3.phpt
+++ b/ext/standard/tests/file/filegroup_variation3.phpt
@@ -39,7 +39,11 @@ $count = 1;
/* loop through to test each element in the above array */
foreach($files_arr as $file) {
echo "- Iteration $count -\n";
- var_dump( filegroup( $file_path."/".$file ) );
+ try {
+ var_dump( filegroup( $file_path."/".$file ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
clearstatcache();
$count++;
}
@@ -74,12 +78,8 @@ bool(false)
Warning: filegroup(): stat failed for %s/filegroup_variation3/filegroup*.tmp in %s on line %d
bool(false)
- Iteration 7 -
-
-Warning: filegroup() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+filegroup() expects parameter 1 to be a valid path, string given
- Iteration 8 -
-
-Warning: filegroup() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+filegroup() expects parameter 1 to be a valid path, string given
*** Done ***
diff --git a/ext/standard/tests/file/fileinode_error.phpt b/ext/standard/tests/file/fileinode_error.phpt
index 462ab62367..d080467f04 100644
--- a/ext/standard/tests/file/fileinode_error.phpt
+++ b/ext/standard/tests/file/fileinode_error.phpt
@@ -16,12 +16,6 @@ var_dump( fileinode("/no/such/file/dir") );
var_dump( fileinode("string") );
var_dump( fileinode(100) );
-/* No.of arguments less than expected */
-var_dump( fileinode() );
-
-/* No.of arguments greater than expected */
-var_dump( fileinode(__FILE__, "string") );
-
echo "\n*** Done ***";
--EXPECTF--
*** Testing error conditions of fileinode() ***
@@ -34,10 +28,4 @@ bool(false)
Warning: fileinode(): stat failed for 100 in %s on line 14
bool(false)
-Warning: fileinode() expects exactly 1 parameter, 0 given in %s on line 17
-NULL
-
-Warning: fileinode() expects exactly 1 parameter, 2 given in %s on line 20
-NULL
-
*** Done ***
diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt
index 71cdc395a6..07b76bb62c 100644
--- a/ext/standard/tests/file/fileinode_variation2.phpt
+++ b/ext/standard/tests/file/fileinode_variation2.phpt
@@ -14,7 +14,6 @@ Description: Returns the inode number of the file, or FALSE in case of an error.
/* Testing fileinode() with invalid arguments -int, float, bool, NULL, resource */
$file_path = __DIR__;
-$file_handle = fopen($file_path."/fileinode_variation2.tmp", "w");
echo "*** Testing Invalid file types ***\n";
$filenames = array(
@@ -25,7 +24,6 @@ $filenames = array(
TRUE,
FALSE,
NULL,
- $file_handle,
/* scalars */
1234,
@@ -37,7 +35,6 @@ foreach( $filenames as $filename ) {
var_dump( fileinode($filename) );
clearstatcache();
}
-fclose($file_handle);
?>
--CLEAN--
<?php
@@ -59,9 +56,6 @@ bool(false)
bool(false)
bool(false)
-Warning: fileinode() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
Warning: fileinode(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt
index 72dfcbdc55..16f67b0676 100644
--- a/ext/standard/tests/file/fileinode_variation3.phpt
+++ b/ext/standard/tests/file/fileinode_variation3.phpt
@@ -40,7 +40,11 @@ $count = 1;
/* loop through to test each element in the above array */
foreach($files_arr as $file) {
echo "- Iteration $count -\n";
- var_dump( fileinode( $file_path."/".$file ) );
+ try {
+ var_dump( fileinode( $file_path."/".$file ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
clearstatcache();
$count++;
}
@@ -75,12 +79,8 @@ bool(false)
Warning: fileinode(): stat failed for %s/fileinode_variation3/fileinode*.tmp in %s on line %d
bool(false)
- Iteration 7 -
-
-Warning: fileinode() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileinode() expects parameter 1 to be a valid path, string given
- Iteration 8 -
-
-Warning: fileinode() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileinode() expects parameter 1 to be a valid path, string given
*** Done ***
diff --git a/ext/standard/tests/file/fileowner_error.phpt b/ext/standard/tests/file/fileowner_error.phpt
index 967a541cc0..807c09f0f0 100644
--- a/ext/standard/tests/file/fileowner_error.phpt
+++ b/ext/standard/tests/file/fileowner_error.phpt
@@ -15,10 +15,6 @@ var_dump( fileowner("/no/such/file/dir") );
var_dump( fileowner("string") );
var_dump( fileowner(100) );
-/* Invalid no.of arguments */
-var_dump( fileowner() ); // args < expected
-var_dump( fileowner("/no/such/file", "root") ); // args > expected
-
echo "\n*** Done ***\n";
?>
--EXPECTF--
@@ -33,10 +29,4 @@ bool(false)
Warning: fileowner(): stat failed for 100 in %s on line %d
bool(false)
-Warning: fileowner() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: fileowner() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Done ***
diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt
index 4be8f58682..8de42cb494 100644
--- a/ext/standard/tests/file/fileowner_variation2.phpt
+++ b/ext/standard/tests/file/fileowner_variation2.phpt
@@ -14,7 +14,6 @@ obscure_filename
/* Testing fileowner() with invalid arguments -int, float, bool, NULL, resource */
$file_path = __DIR__;
-$file_handle = fopen($file_path."/fileowner_variation2.tmp", "w");
echo "*** Testing Invalid file types ***\n";
$filenames = array(
@@ -25,7 +24,6 @@ $filenames = array(
TRUE,
FALSE,
NULL,
- $file_handle,
/* scalars */
1234,
@@ -37,7 +35,6 @@ foreach( $filenames as $filename ) {
var_dump( fileowner($filename) );
clearstatcache();
}
-fclose($file_handle);
?>
--CLEAN--
<?php
@@ -59,9 +56,6 @@ bool(false)
bool(false)
bool(false)
-Warning: fileowner() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
Warning: fileowner(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt
index e5d8852776..01d2da2445 100644
--- a/ext/standard/tests/file/fileowner_variation3.phpt
+++ b/ext/standard/tests/file/fileowner_variation3.phpt
@@ -40,7 +40,11 @@ $count = 1;
/* loop through to test each element in the above array */
foreach($files_arr as $file) {
echo "- Iteration $count -\n";
- var_dump( fileowner( $file_path."/".$file ) );
+ try {
+ var_dump( fileowner( $file_path."/".$file ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
clearstatcache();
$count++;
}
@@ -75,12 +79,8 @@ bool(false)
Warning: fileowner(): stat failed for %s/fileowner_variation3/fileowner*.tmp in %s on line %d
bool(false)
- Iteration 7 -
-
-Warning: fileowner() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileowner() expects parameter 1 to be a valid path, string given
- Iteration 8 -
-
-Warning: fileowner() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileowner() expects parameter 1 to be a valid path, string given
*** Done ***
diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt
index d45da017cc..4eee45d869 100644
--- a/ext/standard/tests/file/fileperms_variation2.phpt
+++ b/ext/standard/tests/file/fileperms_variation2.phpt
@@ -13,7 +13,6 @@ obscure_filename
/* Testing fileperms() with invalid arguments -int, float, bool, NULL, resource */
$file_path = __DIR__;
-$file_handle = fopen($file_path."/fileperms_variation2.tmp", "w");
echo "*** Testing Invalid file types ***\n";
$filenames = array(
@@ -24,7 +23,6 @@ $filenames = array(
TRUE,
FALSE,
NULL,
- $file_handle,
/* scalars */
1234,
@@ -36,7 +34,6 @@ foreach( $filenames as $filename ) {
var_dump( fileperms($filename) );
clearstatcache();
}
-fclose($file_handle);
?>
--CLEAN--
<?php
@@ -58,9 +55,6 @@ bool(false)
bool(false)
bool(false)
-Warning: fileperms() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
Warning: fileperms(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt
index 6a4aacdc6d..1588ee67fe 100644
--- a/ext/standard/tests/file/fileperms_variation3.phpt
+++ b/ext/standard/tests/file/fileperms_variation3.phpt
@@ -39,7 +39,11 @@ $count = 1;
/* loop through to test each element in the above array */
foreach($files_arr as $file) {
echo "- Iteration $count -\n";
- var_dump( fileperms( $file_path."/".$file ) );
+ try {
+ var_dump( fileperms( $file_path."/".$file ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
clearstatcache();
$count++;
}
@@ -74,12 +78,8 @@ bool(false)
Warning: fileperms(): stat failed for %s/fileperms_variation3/fileperms*.tmp in %s on line %d
bool(false)
- Iteration 7 -
-
-Warning: fileperms() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileperms() expects parameter 1 to be a valid path, string given
- Iteration 8 -
-
-Warning: fileperms() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fileperms() expects parameter 1 to be a valid path, string given
*** Done ***
diff --git a/ext/standard/tests/file/filesize_error.phpt b/ext/standard/tests/file/filesize_error.phpt
index 9f721ff921..5ad8ee99ca 100644
--- a/ext/standard/tests/file/filesize_error.phpt
+++ b/ext/standard/tests/file/filesize_error.phpt
@@ -14,13 +14,6 @@ echo "*** Testing filesize(): error conditions ***";
var_dump( filesize("/no/such/file") );
var_dump( filesize("/no/such/dir") );
-/* No.of arguments less than expected */
-var_dump( filesize() );
-
-/* No.of arguments greater than expected */
-var_dump( filesize(__FILE__, 2000) );
-echo "\n";
-
echo "*** Done ***\n";
?>
--EXPECTF--
@@ -30,11 +23,4 @@ bool(false)
Warning: filesize(): stat failed for /no/such/dir in %s on line %d
bool(false)
-
-Warning: filesize() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: filesize() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Done ***
diff --git a/ext/standard/tests/file/filetype_error.phpt b/ext/standard/tests/file/filetype_error.phpt
index b49a5286c6..a34671d9b0 100644
--- a/ext/standard/tests/file/filetype_error.phpt
+++ b/ext/standard/tests/file/filetype_error.phpt
@@ -16,12 +16,6 @@ print( filetype("/no/such/file/dir") );
print( filetype("string") );
print( filetype(100) );
-/* No.of args less than expected */
-print( filetype() );
-
-/* No.of args greater than expected */
-print( filetype("file", "file") );
-
echo "\n*** Done ***\n";
?>
--EXPECTF--
@@ -32,8 +26,4 @@ Warning: filetype(): Lstat failed for string in %s on line %d
Warning: filetype(): Lstat failed for 100 in %s on line %d
-Warning: filetype() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: filetype() expects exactly 1 parameter, 2 given in %s on line %d
-
*** Done ***
diff --git a/ext/standard/tests/file/filetype_variation2.phpt b/ext/standard/tests/file/filetype_variation2.phpt
index 1c276a2957..1e006441c5 100644
--- a/ext/standard/tests/file/filetype_variation2.phpt
+++ b/ext/standard/tests/file/filetype_variation2.phpt
@@ -22,8 +22,6 @@ Description: Returns the type of the file. Possible values are fifo, char,
echo "-- Checking for char --\n";
print( filetype("/dev/null") )."\n";
?>
-===DONE===
--EXPECT--
-- Checking for char --
char
-===DONE===
diff --git a/ext/standard/tests/file/filetype_variation3.phpt b/ext/standard/tests/file/filetype_variation3.phpt
index eb82a4d149..0abd264621 100644
--- a/ext/standard/tests/file/filetype_variation3.phpt
+++ b/ext/standard/tests/file/filetype_variation3.phpt
@@ -22,8 +22,6 @@ Description: Returns the type of the file. Possible values are fifo, char,
echo "-- Checking for block --\n";
print( filetype("/dev/ram0") )."\n";
?>
-===DONE===
--EXPECT--
-- Checking for block --
block
-===DONE===
diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt
index 43f9112887..48cba22729 100644
--- a/ext/standard/tests/file/flock.phpt
+++ b/ext/standard/tests/file/flock.phpt
@@ -5,13 +5,14 @@ flock() tests
$file = __DIR__."/flock.dat";
-var_dump(flock());
-var_dump(flock("", "", $var));
-
$fp = fopen($file, "w");
fclose($fp);
-var_dump(flock($fp, LOCK_SH|LOCK_NB));
+try {
+ var_dump(flock($fp, LOCK_SH|LOCK_NB));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
$fp = fopen($file, "w");
@@ -41,14 +42,7 @@ $file = __DIR__."/flock.dat";
unlink($file);
?>
--EXPECTF--
-Warning: flock() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: flock() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Warning: flock(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+flock(): supplied resource is not a valid stream resource
bool(true)
bool(true)
bool(true)
diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt
index d6f1b3f59b..4069dd2aa0 100644
--- a/ext/standard/tests/file/flock_error.phpt
+++ b/ext/standard/tests/file/flock_error.phpt
@@ -31,7 +31,11 @@ $operations = array(
$i = 0;
foreach($operations as $operation) {
echo "\n--- Iteration $i ---";
- var_dump(flock($fp, $operation));
+ try {
+ var_dump(flock($fp, $operation));
+ } catch (TypeError $e) {
+ echo "\n", $e->getMessage(), "\n";
+ }
$i++;
}
@@ -39,16 +43,11 @@ foreach($operations as $operation) {
/* Invalid arguments */
$fp = fopen($file, "w");
fclose($fp);
-var_dump(flock($fp, LOCK_SH|LOCK_NB));
-
-var_dump(flock("", "", $var));
-
-/* No.of args leass than expected */
-var_dump(flock());
-var_dump(flock($fp));
-
-/* No.of args greater than expected */
-var_dump(flock($fp, "", $var, ""));
+try {
+ var_dump(flock($fp, LOCK_SH|LOCK_NB));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
--CLEAN--
<?php
@@ -75,36 +74,17 @@ Warning: flock(): Illegal operation argument in %s on line %d
bool(false)
--- Iteration 4 ---
-Warning: flock() expects parameter 2 to be int, array given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, array given
--- Iteration 5 ---
-Warning: flock() expects parameter 2 to be int, array given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, array given
--- Iteration 6 ---
-Warning: flock() expects parameter 2 to be int, string given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, string given
--- Iteration 7 ---
-Warning: flock() expects parameter 2 to be int, string given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, string given
--- Iteration 8 ---
-Warning: flock() expects parameter 2 to be int, string given in %s on line %d
-NULL
-
-Warning: flock(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: flock() expects parameter 1 to be resource, string given in %s on line %d
-NULL
-
-Warning: flock() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: flock() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: flock() expects at most 3 parameters, 4 given in %s on line %d
-NULL
+flock() expects parameter 2 to be int, string given
+flock(): supplied resource is not a valid stream resource
diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt
index 919e80eec0..4318a844e8 100644
--- a/ext/standard/tests/file/fnmatch_variation.phpt
+++ b/ext/standard/tests/file/fnmatch_variation.phpt
@@ -66,7 +66,11 @@ $pattern_arr = array(
for( $i = 0; $i<count($pattern_arr); $i++ ) {
echo "-- Iteration $i --\n";
- var_dump( fnmatch($pattern_arr[$i], $file_name) );
+ try {
+ var_dump( fnmatch($pattern_arr[$i], $file_name) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
unlink($file_name);
@@ -78,7 +82,11 @@ function match( $pattern, $string ) {
for( $i = 0; $i<count($pattern); $i++ ) {
echo "-- Iteration $i --\n";
for( $j = 0; $j<count($string); $j++ ) {
- var_dump( fnmatch($pattern[$i], $string[$j]) );
+ try {
+ var_dump( fnmatch($pattern[$i], $string[$j]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
}
}
@@ -134,7 +142,7 @@ match($null_arr, $null_arr);
echo "\n*** Done ***\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing fnmatch() with file and various patterns ***
-- Iteration 0 --
bool(true)
@@ -183,13 +191,9 @@ bool(false)
-- Iteration 22 --
bool(false)
-- Iteration 23 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
-- Iteration 24 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
-- Iteration 25 --
bool(false)
-- Iteration 26 --
@@ -263,84 +267,44 @@ bool(true)
--- With Strings ---
-- Iteration 0 --
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(true)
-- Iteration 1 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
-- Iteration 2 --
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(true)
-- Iteration 3 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
-- Iteration 4 --
bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(true)
bool(false)
-- Iteration 5 --
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(true)
@@ -441,64 +405,42 @@ bool(true)
bool(true)
bool(true)
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(false)
-- Iteration 1 --
bool(true)
bool(true)
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(false)
-- Iteration 2 --
bool(true)
bool(true)
bool(true)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(false)
-- Iteration 3 --
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
+fnmatch() expects parameter 1 to be a valid path, string given
-- Iteration 4 --
bool(false)
bool(false)
bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(true)
bool(false)
-- Iteration 5 --
bool(false)
bool(false)
bool(false)
-
-Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
-NULL
+fnmatch() expects parameter 2 to be a valid path, string given
bool(false)
bool(true)
diff --git a/ext/standard/tests/file/fopen_unlink.phpt b/ext/standard/tests/file/fopen_unlink.phpt
index 117863b63d..c87a8bb055 100644
--- a/ext/standard/tests/file/fopen_unlink.phpt
+++ b/ext/standard/tests/file/fopen_unlink.phpt
@@ -18,7 +18,6 @@ var_dump(
);
?>
-===DONE===
--EXPECTF--
string(%d) "%stututu"
resource(%s) of type (Unknown)
@@ -31,4 +30,3 @@ int(5)
int(0)
string(10) "helloworld"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt
index 300cf52864..ab6dc4f7bd 100644
--- a/ext/standard/tests/file/fopen_variation10-win32.phpt
+++ b/ext/standard/tests/file/fopen_variation10-win32.phpt
@@ -83,7 +83,6 @@ rmdir('c:\\'.$rootdir);
?>
-===DONE===
--EXPECTF--
*** Testing fopen() : variation ***
@@ -145,4 +144,3 @@ Warning: fopen(/sortout\fopen_variation10.tmp): failed to open stream: No such f
file not opened for read
Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt
index ed6508b69a..60c41b9a64 100644
--- a/ext/standard/tests/file/fopen_variation11-win32.phpt
+++ b/ext/standard/tests/file/fopen_variation11-win32.phpt
@@ -81,7 +81,6 @@ rmdir($testdir);
rmdir('c:\\'.$rootdir);
?>
-===DONE===
--EXPECTF--
*** Testing fopen() : variation ***
@@ -143,4 +142,3 @@ Warning: fopen(/sortout\fopen_variation11.tmp): failed to open stream: No such f
file not opened for read
Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation12.phpt b/ext/standard/tests/file/fopen_variation12.phpt
index 2f79be1b63..8786337e23 100644
--- a/ext/standard/tests/file/fopen_variation12.phpt
+++ b/ext/standard/tests/file/fopen_variation12.phpt
@@ -44,8 +44,6 @@ function testme() {
}
}
?>
-===DONE===
--EXPECT--
created in working dir
Not created in script dir
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation13.phpt b/ext/standard/tests/file/fopen_variation13.phpt
index 4d613a9145..0609f42d3b 100644
--- a/ext/standard/tests/file/fopen_variation13.phpt
+++ b/ext/standard/tests/file/fopen_variation13.phpt
@@ -47,9 +47,7 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
*** Testing fopen() : variation ***
Created in correct location
Created in correct location
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation14-win32.phpt b/ext/standard/tests/file/fopen_variation14-win32.phpt
index 73c5d68e76..ef8c2114c0 100644
--- a/ext/standard/tests/file/fopen_variation14-win32.phpt
+++ b/ext/standard/tests/file/fopen_variation14-win32.phpt
@@ -98,7 +98,6 @@ function runtest($fileURIs) {
?>
-===DONE===
--EXPECTF--
*** Testing fopen() : variation ***
--- READ: file://fopen14.tmpDir\fopen_variation14.tmp ---
@@ -185,4 +184,3 @@ test passed
test passed
--- WRITE: file:///%s/fopen14.tmpDir/fopen_variation14.tmp ---
test passed
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation14.phpt b/ext/standard/tests/file/fopen_variation14.phpt
index f1e37fdda0..4728eca2db 100644
--- a/ext/standard/tests/file/fopen_variation14.phpt
+++ b/ext/standard/tests/file/fopen_variation14.phpt
@@ -90,7 +90,6 @@ function runtest($fileURIs) {
?>
-===DONE===
--EXPECTF--
*** Testing fopen() : variation ***
--- READ: file://fopen14.tmpDir/fopen_variation14.tmp ---
@@ -131,4 +130,3 @@ Warning: fopen(file://../fopen14.tmpDir/fopen_variation14.tmp): failed to open s
test passed
--- WRITE: file:///%s/fopen14.tmpDir/fopen_variation14.tmp ---
test passed
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation15-win32.phpt b/ext/standard/tests/file/fopen_variation15-win32.phpt
index 52f69db746..5439e0f637 100644
--- a/ext/standard/tests/file/fopen_variation15-win32.phpt
+++ b/ext/standard/tests/file/fopen_variation15-win32.phpt
@@ -102,7 +102,6 @@ function runtest($fileURIs) {
?>
-===DONE===
--EXPECTF--
*** Testing fopen() : variation ***
--- READ: file://fopen15.tmpDir\fopen_variation15.tmp ---
@@ -189,4 +188,3 @@ test passed
test passed
--- WRITE: file:///%s/fopen15.tmpDir/fopen_variation15.tmp ---
test passed
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation15.phpt b/ext/standard/tests/file/fopen_variation15.phpt
index bad0a0b63c..9d0bdc51cb 100644
--- a/ext/standard/tests/file/fopen_variation15.phpt
+++ b/ext/standard/tests/file/fopen_variation15.phpt
@@ -94,7 +94,6 @@ function runtest($fileURIs) {
?>
-===DONE===
--EXPECTF--
*** Testing fopen() : variation ***
--- READ: file://fopen15.tmpDir/fopen_variation15.tmp ---
@@ -135,4 +134,3 @@ Warning: fopen(file://../fopen15.tmpDir/fopen_variation15.tmp): failed to open s
test passed
--- WRITE: file:///%s/fopen15.tmpDir/fopen_variation15.tmp ---
test passed
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation16.phpt b/ext/standard/tests/file/fopen_variation16.phpt
index 5888688fa8..6fe240bec9 100644
--- a/ext/standard/tests/file/fopen_variation16.phpt
+++ b/ext/standard/tests/file/fopen_variation16.phpt
@@ -65,10 +65,8 @@ function runtest() {
rmdir($extraDir);
}
?>
-===DONE===
--EXPECT--
Not created in dir1
found file - not in dir1
Not created in dir1
found file - not in dir1
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation17.phpt b/ext/standard/tests/file/fopen_variation17.phpt
index 5d639e8236..851493eb08 100644
--- a/ext/standard/tests/file/fopen_variation17.phpt
+++ b/ext/standard/tests/file/fopen_variation17.phpt
@@ -64,10 +64,8 @@ function runtest() {
rmdir($extraDir);
}
?>
-===DONE===
--EXPECT--
Not created in dir1
found file for reading
Not created in dir1
found file for reading
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation19.phpt b/ext/standard/tests/file/fopen_variation19.phpt
index 069ce11170..58d69cc2cb 100644
--- a/ext/standard/tests/file/fopen_variation19.phpt
+++ b/ext/standard/tests/file/fopen_variation19.phpt
@@ -92,7 +92,6 @@ function writeFile($file) {
?>
-===DONE===
--EXPECT--
*** Testing fopen() : variation ***
*** testing reading of links ***
@@ -107,4 +106,3 @@ link of link:Hello World again! again! again!
soft link:Goodbye World
hard link:Goodbye World
link of link:Goodbye World
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation5.phpt b/ext/standard/tests/file/fopen_variation5.phpt
index a3f5c1d3be..8d7e3b0384 100644
--- a/ext/standard/tests/file/fopen_variation5.phpt
+++ b/ext/standard/tests/file/fopen_variation5.phpt
@@ -121,7 +121,6 @@ function test_fopen($mode) {
}
?>
-===DONE===
--EXPECT--
--- testing include path ---
@@ -145,4 +144,3 @@ in dir1
in dir1
in working dir
in script dir
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation6.phpt b/ext/standard/tests/file/fopen_variation6.phpt
index a3ce051deb..7a73aa8364 100644
--- a/ext/standard/tests/file/fopen_variation6.phpt
+++ b/ext/standard/tests/file/fopen_variation6.phpt
@@ -36,9 +36,7 @@ echo "\n";
unlink($absfile);
unlink($relfile);
?>
-===DONE===
--EXPECT--
*** Testing fopen() : variation ***
This is an absolute file
This is a relative file
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation7.phpt b/ext/standard/tests/file/fopen_variation7.phpt
index 531b27e0bc..c4800ae9b2 100644
--- a/ext/standard/tests/file/fopen_variation7.phpt
+++ b/ext/standard/tests/file/fopen_variation7.phpt
@@ -56,10 +56,8 @@ function runtest() {
}
}
?>
-===DONE===
--EXPECT--
created in working dir
Not created in dir1
created in working dir
Not created in dir1
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation8.phpt b/ext/standard/tests/file/fopen_variation8.phpt
index 3647191128..229edd5672 100644
--- a/ext/standard/tests/file/fopen_variation8.phpt
+++ b/ext/standard/tests/file/fopen_variation8.phpt
@@ -120,7 +120,6 @@ function test_fopen($mode) {
}
?>
-===DONE===
--EXPECT--
--- testing include path ---
@@ -144,4 +143,3 @@ in dir1
in dir1
in working dir
in script dir
-===DONE===
diff --git a/ext/standard/tests/file/fopen_variation9.phpt b/ext/standard/tests/file/fopen_variation9.phpt
index 5479ddcf2d..0f1c2bafb8 100644
--- a/ext/standard/tests/file/fopen_variation9.phpt
+++ b/ext/standard/tests/file/fopen_variation9.phpt
@@ -56,10 +56,8 @@ function runtest() {
}
}
?>
-===DONE===
--EXPECT--
created in working dir
Not created in dir1
created in working dir
Not created in dir1
-===DONE===
diff --git a/ext/standard/tests/file/fputcsv.phpt b/ext/standard/tests/file/fputcsv.phpt
index 5760882032..f7286254f2 100644
--- a/ext/standard/tests/file/fputcsv.phpt
+++ b/ext/standard/tests/file/fputcsv.phpt
@@ -55,8 +55,6 @@ echo '$list = ';var_export($res);echo ";\n";
@unlink($file);
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
$list = array (
0 => 'aaa,bbb',
@@ -102,4 +100,3 @@ $list = array (
18 => '"\\"","aaa"',
19 => '"\\""",aaa',
);
-===DONE===
diff --git a/ext/standard/tests/file/fputcsv_002.phpt b/ext/standard/tests/file/fputcsv_002.phpt
index db565d5223..90999a9e70 100644
--- a/ext/standard/tests/file/fputcsv_002.phpt
+++ b/ext/standard/tests/file/fputcsv_002.phpt
@@ -20,7 +20,7 @@ $file = __DIR__ .'/fgetcsv-test.csv';
unlink($file);
?>
--EXPECTF--
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
array(7) {
[0]=>
int(1)
diff --git a/ext/standard/tests/file/fputcsv_variation15.phpt b/ext/standard/tests/file/fputcsv_variation15.phpt
index 0e9d306ffa..1715d09e28 100644
--- a/ext/standard/tests/file/fputcsv_variation15.phpt
+++ b/ext/standard/tests/file/fputcsv_variation15.phpt
@@ -57,8 +57,6 @@ echo '$list = ';var_export($res);echo ";\n";
@unlink($file);
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
$list = array (
0 => 'aaa,bbb',
@@ -104,4 +102,3 @@ $list = array (
18 => '"/"","aaa"',
19 => '"/""",aaa',
);
-===DONE===
diff --git a/ext/standard/tests/file/fputcsv_variation16.phpt b/ext/standard/tests/file/fputcsv_variation16.phpt
index 1bae60da20..b5434312c6 100644
--- a/ext/standard/tests/file/fputcsv_variation16.phpt
+++ b/ext/standard/tests/file/fputcsv_variation16.phpt
@@ -14,8 +14,6 @@ rewind($stream);
echo stream_get_contents($stream);
fclose($stream);
?>
-===DONE===
--EXPECT--
\
"\"""
-===DONE===
diff --git a/ext/standard/tests/file/fread_error.phpt b/ext/standard/tests/file/fread_error.phpt
index 1c4068cd97..f51f24c754 100644
--- a/ext/standard/tests/file/fread_error.phpt
+++ b/ext/standard/tests/file/fread_error.phpt
@@ -14,14 +14,6 @@ echo "*** Testing error conditions ***\n";
$filename = __FILE__;
$file_handle = fopen($filename, "r");
-// zero argument
-echo "-- Testing fread() with zero argument --\n";
-var_dump( fread() );
-
-// more than expected no. of args
-echo "-- Testing fread() with more than expected number of arguments --\n";
-var_dump( fread($file_handle, 10, $file_handle) );
-
// invalid length argument
echo "-- Testing fread() with invalid length arguments --\n";
$len = 0;
@@ -29,44 +21,9 @@ var_dump( fread($file_handle, $len) );
$len = -10;
var_dump( fread($file_handle, $len) );
-// test invalid arguments : non-resources
-echo "-- Testing fread() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test fread() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( fread($invalid_args[$loop_counter - 1], 10) );
-}
-
-// fwrite() on a file handle which is already closed
-echo "-- Testing fwrite() with closed/unset file handle --\n";
-fclose($file_handle);
-var_dump( fread($file_handle,$file_content_type) );
-
-// fwrite on a file handle which is unset
-$fp = fopen($filename, "r");
-unset($fp); //unset file handle
-var_dump( fread(@$fp,10) );
-var_dump( fclose(@$fp) );
-
echo "Done\n";
--EXPECTF--
*** Testing error conditions ***
--- Testing fread() with zero argument --
-
-Warning: fread() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
--- Testing fread() with more than expected number of arguments --
-
-Warning: fread() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-- Testing fread() with invalid length arguments --
Warning: fread(): Length parameter must be greater than 0 in %s on line %d
@@ -74,41 +31,4 @@ bool(false)
Warning: fread(): Length parameter must be greater than 0 in %s on line %d
bool(false)
--- Testing fread() with invalid arguments --
--- Iteration 1 --
-
-Warning: fread() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fread() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fread() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fread() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fread() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fread() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
--- Testing fwrite() with closed/unset file handle --
-
-Notice: Undefined variable: file_content_type in %s on line %d
-
-Warning: fread(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fread() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
-
-Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/file/fscanf.phpt b/ext/standard/tests/file/fscanf.phpt
index 7a5a70070e..343138d002 100644
--- a/ext/standard/tests/file/fscanf.phpt
+++ b/ext/standard/tests/file/fscanf.phpt
@@ -5,10 +5,6 @@ fscanf() tests
$filename = __DIR__."/fscanf.dat";
-var_dump(fscanf());
-var_dump(fscanf(array()));
-var_dump(fscanf(array(), array()));
-
file_put_contents($filename, "data");
$fp = fopen($filename, "rt");
@@ -64,14 +60,6 @@ $filename = __DIR__."/fscanf.dat";
unlink($filename);
?>
--EXPECTF--
-Warning: fscanf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: fscanf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: fscanf() expects parameter 1 to be resource, array given in %s on line %d
-NULL
int(0)
NULL
int(1)
diff --git a/ext/standard/tests/file/fscanf_error.phpt b/ext/standard/tests/file/fscanf_error.phpt
index ea6a91e33d..5666689574 100644
--- a/ext/standard/tests/file/fscanf_error.phpt
+++ b/ext/standard/tests/file/fscanf_error.phpt
@@ -17,18 +17,12 @@ if ($file_handle == false)
fwrite($file_handle, "hello world");
fclose($file_handle);
-// zero argument
-var_dump( fscanf() );
-
-// single argument
-$file_handle = fopen($filename, 'r');
-if ($file_handle == false)
- exit("Error:failed to open file $filename");
-var_dump( fscanf($file_handle) );
-fclose($file_handle);
-
// invalid file handle
-var_dump( fscanf($file_handle, "%s") );
+try {
+ var_dump( fscanf($file_handle, "%s") );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// number of formats in format strings not matching the no of variables
$file_handle = fopen($filename, 'r');
@@ -38,7 +32,7 @@ var_dump( fscanf($file_handle, "%d%s%f", $int_var, $string_var) );
fclose($file_handle);
// different invalid format strings
-$invalid_formats = array( $undefined_var, undefined_constant,
+$invalid_formats = array( $undefined_var,
"%", "%h", "%.", "%d%m"
);
@@ -62,24 +56,12 @@ unlink($filename);
?>
--EXPECTF--
*** Testing fscanf() for error conditions ***
-
-Warning: fscanf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: fscanf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: fscanf(): supplied resource is not a valid File-Handle resource in %s on line %d
-bool(false)
+fscanf(): supplied resource is not a valid File-Handle resource
Warning: fscanf(): Different numbers of variable names and field specifiers in %s on line %d
int(-1)
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Warning: Use of undefined constant undefined_constant - assumed 'undefined_constant' (this will throw an Error in a future version of PHP) in %s on line %d
-array(0) {
-}
+Warning: Undefined variable: undefined_var in %s on line %d
array(0) {
}
diff --git a/ext/standard/tests/file/fscanf_variation14.phpt b/ext/standard/tests/file/fscanf_variation14.phpt
index 47caaa3568..151c975776 100644
--- a/ext/standard/tests/file/fscanf_variation14.phpt
+++ b/ext/standard/tests/file/fscanf_variation14.phpt
@@ -76,8 +76,12 @@ $counter = 1;
// writing to the file
foreach($valid_strings as $string) {
- @fprintf($file_handle, $string);
- @fprintf($file_handle, "\n");
+ try {
+ fprintf($file_handle, $string);
+ } catch (\ValueError $e) {
+ } catch (\ArgumentCountError $e) {
+ }
+ fprintf($file_handle, "\n");
}
// closing the file
fclose($file_handle);
diff --git a/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
index 9c1b3a822d..cd58c30f20 100644
--- a/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
+++ b/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
@@ -14,86 +14,21 @@ Test fseek(), ftell() & rewind() functions : error conditions - fseek()
*/
echo "*** Testing fseek() : error conditions ***\n";
-// zero argument
-echo "-- Testing fseek() with zero argument --\n";
-var_dump( fseek() );
-
-// unexpected no. of args
-echo "-- Testing fseek() with unexpected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( fseek($fp) );
-var_dump( fseek($fp, 10, $fp,10) );
-
-// test invalid arguments : non-resources
-echo "-- Testing fseek() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass
-);
-/* loop to test fseek() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( fseek($invalid_args[$loop_counter - 1], 10) );
-}
// fseek() on a file handle which is already closed
-echo "-- Testing fseek() with closed/unset file handle --";
+echo "-- Testing fseek() with closed/unset file handle --\n";
+$fp = fopen(__FILE__, "r");
fclose($fp);
-var_dump(fseek($fp,10));
-
-// fseek() on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( fseek(@$file_handle,10));
+try {
+ var_dump(fseek($fp,10));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing fseek() : error conditions ***
--- Testing fseek() with zero argument --
-
-Warning: fseek() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
--- Testing fseek() with unexpected number of arguments --
-
-Warning: fseek() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: fseek() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
--- Testing fseek() with invalid arguments --
--- Iteration 1 --
-
-Warning: fseek() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fseek() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fseek() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fseek() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fseek() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fseek() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-- Testing fseek() with closed/unset file handle --
-Warning: fseek(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fseek() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+fseek(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
index 8835046f6c..45f1298951 100644
--- a/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
+++ b/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
@@ -14,82 +14,21 @@ Test fseek(), ftell() & rewind() functions : error conditions - ftell()
*/
echo "*** Testing ftell() : error conditions ***\n";
-// zero argument
-echo "-- Testing ftell() with zero argument --\n";
-var_dump( ftell() );
-
-// more than expected no. of args
-echo "-- Testing ftell() with more than expected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( ftell($fp, 10) );
-
-// test invalid arguments : non-resources
-echo "-- Testing ftell() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test ftell with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( ftell($invalid_args[$loop_counter - 1]) );
-}
// ftell on a file handle which is already closed
-echo "-- Testing ftell with closed/unset file handle --";
+echo "-- Testing ftell with closed/unset file handle --\n";
+$fp = fopen(__FILE__, "r");
fclose($fp);
-var_dump(ftell($fp));
-
-// ftell on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( ftell(@$file_handle) );
+try {
+ var_dump(ftell($fp));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ftell() : error conditions ***
--- Testing ftell() with zero argument --
-
-Warning: ftell() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing ftell() with more than expected number of arguments --
-
-Warning: ftell() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
--- Testing ftell() with invalid arguments --
--- Iteration 1 --
-
-Warning: ftell() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: ftell() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: ftell() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: ftell() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: ftell() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: ftell() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-- Testing ftell with closed/unset file handle --
-Warning: ftell(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: ftell() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+ftell(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt b/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
index 0b94bcffc7..e698bca463 100644
--- a/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
+++ b/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
@@ -14,82 +14,21 @@ Test fseek(), ftell() & rewind() functions : error conditions - rewind()
*/
echo "*** Testing rewind() : error conditions ***\n";
-// zero argument
-echo "-- Testing rewind() with zero argument --\n";
-var_dump( rewind() );
-
-// more than expected no. of args
-echo "-- Testing rewind() with more than expected number of arguments --\n";
-$fp = fopen(__FILE__, "r");
-var_dump( rewind($fp, 10) );
-
-// test invalid arguments : non-resources
-echo "-- Testing rewind() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test rewind with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( rewind($invalid_args[$loop_counter - 1]) );
-}
// rewind on a file handle which is already closed
-echo "-- Testing rewind() with closed/unset file handle --";
+echo "-- Testing rewind() with closed/unset file handle --\n";
+$fp = fopen(__FILE__, "r");
fclose($fp);
-var_dump(rewind($fp));
-
-// rewind on a file handle which is unset
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle); //unset file handle
-var_dump( rewind(@$file_handle) );
+try {
+ var_dump(rewind($fp));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing rewind() : error conditions ***
--- Testing rewind() with zero argument --
-
-Warning: rewind() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
--- Testing rewind() with more than expected number of arguments --
-
-Warning: rewind() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
--- Testing rewind() with invalid arguments --
--- Iteration 1 --
-
-Warning: rewind() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: rewind() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: rewind() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: rewind() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: rewind() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: rewind() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-- Testing rewind() with closed/unset file handle --
-Warning: rewind(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: rewind() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+rewind(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fstat.phpt b/ext/standard/tests/file/fstat.phpt
index 415124046e..b48b06cfe5 100644
--- a/ext/standard/tests/file/fstat.phpt
+++ b/ext/standard/tests/file/fstat.phpt
@@ -8,7 +8,11 @@ $filename = __DIR__."/fstat.dat";
$fp = fopen($filename, "w");
var_dump(fstat($fp));
fclose($fp);
-var_dump(fstat($fp));
+try {
+ var_dump(fstat($fp));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
@unlink($filename);
echo "Done\n";
@@ -68,7 +72,5 @@ array(26) {
["blocks"]=>
int(%i)
}
-
-Warning: fstat(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+fstat(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/fstat_basic.phpt b/ext/standard/tests/file/fstat_basic.phpt
index e1f92a7926..d5fdd44e34 100644
--- a/ext/standard/tests/file/fstat_basic.phpt
+++ b/ext/standard/tests/file/fstat_basic.phpt
@@ -6,7 +6,6 @@ $fp = fopen (__FILE__, 'r');
var_dump(fstat( $fp ) );
fclose($fp);
?>
-===DONE===
--EXPECTF--
array(26) {
[0]=>
@@ -62,4 +61,3 @@ array(26) {
["blocks"]=>
int(%i)
}
-===DONE===
diff --git a/ext/standard/tests/file/fstat_variation8.phpt b/ext/standard/tests/file/fstat_variation8.phpt
index c738b1bcaa..4376d6e563 100644
--- a/ext/standard/tests/file/fstat_variation8.phpt
+++ b/ext/standard/tests/file/fstat_variation8.phpt
@@ -27,7 +27,5 @@ if ($failed !== true) {
?>
-===DONE===
--EXPECT--
PASSED: all elements are the same
-===DONE===
diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt
index 61ba1fc509..83569c47d8 100644
--- a/ext/standard/tests/file/ftruncate_error.phpt
+++ b/ext/standard/tests/file/ftruncate_error.phpt
@@ -15,51 +15,16 @@ fwrite($file_handle, "Testing ftruncate error conditions \n");
fflush($file_handle);
echo "\n Initial file size = ".filesize($filename)."\n";
-echo "-- Testing ftruncate() with less than expected number of arguments --\n";
-
-// zero arguments
-var_dump( ftruncate() );
-
-// arguments less than expected numbers
-var_dump( ftruncate( $file_handle ) );
-// check the first size
-var_dump( filesize($filename) );
-
-echo "-- Testing ftruncate() with more than expected number of arguments --\n";
-// more than expected number of arguments
-var_dump( ftruncate($file_handle, 10, 20) );
-// check the first size
-var_dump( filesize($filename) );
-
-// test invalid arguments : non-resources
-echo "-- Testing ftruncate() with invalid file pointer --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test ftruncate() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( ftruncate($invalid_args[$loop_counter - 1], 10) );
-}
-
// ftruncate() on a file handle which is already closed/unset
echo "-- Testing ftruncate() with closed/unset file handle --\n";
// ftruncate on close file handle
fclose($file_handle);
-var_dump( ftruncate($file_handle,10) );
-// check the first size
-var_dump( filesize($filename) );
-
-// ftruncate on a file handle which is unset
-$fp = fopen($filename, "w");
-unset($fp); //unset file handle
-var_dump( ftruncate(@$fp,10));
+try {
+ var_dump( ftruncate($file_handle,10) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// check the first size
var_dump( filesize($filename) );
@@ -70,55 +35,11 @@ echo "Done\n";
$filename = __DIR__."/ftruncate_error.tmp";
unlink( $filename );
?>
---EXPECTF--
+--EXPECT--
*** Testing ftruncate() : error conditions ***
Initial file size = 36
--- Testing ftruncate() with less than expected number of arguments --
-
-Warning: ftruncate() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: ftruncate() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-int(36)
--- Testing ftruncate() with more than expected number of arguments --
-
-Warning: ftruncate() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-int(36)
--- Testing ftruncate() with invalid file pointer --
--- Iteration 1 --
-
-Warning: ftruncate() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: ftruncate() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: ftruncate() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: ftruncate() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: ftruncate() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: ftruncate() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-- Testing ftruncate() with closed/unset file handle --
-
-Warning: ftruncate(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-int(36)
-
-Warning: ftruncate() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+ftruncate(): supplied resource is not a valid stream resource
int(36)
Done
diff --git a/ext/standard/tests/file/fwrite.phpt b/ext/standard/tests/file/fwrite.phpt
index 7cdb270ae3..f2005d7e68 100644
--- a/ext/standard/tests/file/fwrite.phpt
+++ b/ext/standard/tests/file/fwrite.phpt
@@ -6,8 +6,7 @@ fwrite() tests
$filename = __DIR__."/fwrite.dat";
$fp = fopen($filename, "w");
-var_dump(fwrite($fp));
-var_dump(fwrite($fp, array()));
+var_dump(fwrite($fp, ""));
fclose($fp);
$fp = fopen($filename, "r");
@@ -20,35 +19,18 @@ fclose($fp);
var_dump(fwrite($fp, "data", -1));
-var_dump(fwrite(array(), "data", -1));
-var_dump(fwrite(array(), "data"));
-var_dump(fwrite(array()));
-
var_dump(file_get_contents($filename));
@unlink($filename);
echo "Done\n";
?>
--EXPECTF--
-Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
+int(0)
Notice: fwrite(): write of 4 bytes failed with errno=9 Bad file descriptor in %s on line %d
bool(false)
int(0)
int(4)
int(0)
-
-Warning: fwrite() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
string(4) "data"
Done
diff --git a/ext/standard/tests/file/fwrite_error.phpt b/ext/standard/tests/file/fwrite_error.phpt
index a54550a6c8..236c4601b0 100644
--- a/ext/standard/tests/file/fwrite_error.phpt
+++ b/ext/standard/tests/file/fwrite_error.phpt
@@ -16,18 +16,8 @@ include ("file.inc");
echo "*** Testing fwrite() : error conditions ***\n";
$filename = __DIR__."/fwrite_error.tmp";
-
-echo "-- Testing fwrite() with less than expected number of arguments --\n";
-// zero argument
-var_dump( fwrite() );
-// less than expected, 1 arg
$file_handle = fopen ( $filename, "w");
-var_dump( fwrite($file_handle) );
-
-// more than expected no. of args
-echo "-- Testing fwrite() with more than expected number of arguments --\n";
$data = "data";
-var_dump( fwrite($file_handle, $data, strlen($data), 10) );
// invalid length argument
echo "-- Testing fwrite() with invalid length arguments --\n";
@@ -36,31 +26,14 @@ var_dump( fwrite($file_handle, $data, $len) );
$len = -10;
var_dump( fwrite($file_handle, $data, $len) );
-// test invalid arguments : non-resources
-echo "-- Testing fwrite() with invalid arguments --\n";
-$invalid_args = array (
- "string",
- 10,
- 10.5,
- true,
- array(1,2,3),
- new stdclass,
-);
-/* loop to test fwrite() with different invalid type of args */
-for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) {
- echo "-- Iteration $loop_counter --\n";
- var_dump( fwrite($invalid_args[$loop_counter - 1], 10) );
-}
-
// fwrite() on a file handle which is already closed
echo "-- Testing fwrite() with closed/unset file handle --\n";
fclose($file_handle);
-var_dump(fwrite($file_handle,"data"));
-
-// fwrite on a file handle which is unset
-$fp = fopen($filename, "w");
-unset($fp); //unset file handle
-var_dump( fwrite(@$fp,"data"));
+try {
+ var_dump(fwrite($file_handle,"data"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
@@ -69,52 +42,11 @@ echo "Done\n";
$filename = __DIR__."/fwrite_error.tmp";
unlink( $filename );
?>
---EXPECTF--
+--EXPECT--
*** Testing fwrite() : error conditions ***
--- Testing fwrite() with less than expected number of arguments --
-
-Warning: fwrite() expects at least 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
--- Testing fwrite() with more than expected number of arguments --
-
-Warning: fwrite() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
-- Testing fwrite() with invalid length arguments --
int(0)
int(0)
--- Testing fwrite() with invalid arguments --
--- Iteration 1 --
-
-Warning: fwrite() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: fwrite() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: fwrite() expects parameter 1 to be resource, float given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: fwrite() expects parameter 1 to be resource, array given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: fwrite() expects parameter 1 to be resource, object given in %s on line %d
-bool(false)
-- Testing fwrite() with closed/unset file handle --
-
-Warning: fwrite(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
-Warning: fwrite() expects parameter 1 to be resource, null given in %s on line %d
-bool(false)
+fwrite(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/get_current_user.phpt b/ext/standard/tests/file/get_current_user.phpt
index f23d2fabef..04938e3d6b 100644
--- a/ext/standard/tests/file/get_current_user.phpt
+++ b/ext/standard/tests/file/get_current_user.phpt
@@ -3,13 +3,10 @@ get_current_user() tests
--FILE--
<?php
-var_dump(get_current_user("blah"));
var_dump(get_current_user());
echo "Done\n";
?>
--EXPECTF--
-Warning: get_current_user() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
string(%d) %s
Done
diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt
index fd068b01ad..2ced6fd355 100644
--- a/ext/standard/tests/file/glob_variation-win32-mb.phpt
+++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt
@@ -46,12 +46,16 @@ $counter = 1;
using glob() */
foreach($patterns as $pattern) {
echo "\n-- Iteration $counter --\n";
- var_dump( glob($pattern) ); // default arguments
- var_dump( glob($pattern, GLOB_MARK) );
- var_dump( glob($pattern, GLOB_NOSORT) );
- var_dump( glob($pattern, GLOB_NOCHECK) );
- var_dump( glob($pattern, GLOB_NOESCAPE) );
- var_dump( glob($pattern, GLOB_ERR) );
+ try {
+ var_dump( glob($pattern) ); // default arguments
+ var_dump( glob($pattern, GLOB_MARK) );
+ var_dump( glob($pattern, GLOB_NOSORT) );
+ var_dump( glob($pattern, GLOB_NOCHECK) );
+ var_dump( glob($pattern, GLOB_NOESCAPE) );
+ var_dump( glob($pattern, GLOB_ERR) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
}
@@ -73,7 +77,11 @@ $counter = 1;
using glob() */
foreach($patterns as $pattern) {
echo "-- Iteration $counter --\n";
- var_dump( glob($pattern, GLOB_ONLYDIR) );
+ try {
+ var_dump( glob($pattern, GLOB_ONLYDIR) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
}
@@ -326,24 +334,7 @@ array(0) {
}
-- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32-mb.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
array(0) {
@@ -446,9 +437,7 @@ array(1) {
array(0) {
}
-- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %sglob_variation-win32-mb.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
array(0) {
}
diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt
index 9a1528bb1f..32d56e8762 100644
--- a/ext/standard/tests/file/glob_variation-win32.phpt
+++ b/ext/standard/tests/file/glob_variation-win32.phpt
@@ -45,12 +45,16 @@ $counter = 1;
using glob() */
foreach($patterns as $pattern) {
echo "\n-- Iteration $counter --\n";
- var_dump( glob($pattern) ); // default arguments
- var_dump( glob($pattern, GLOB_MARK) );
- var_dump( glob($pattern, GLOB_NOSORT) );
- var_dump( glob($pattern, GLOB_NOCHECK) );
- var_dump( glob($pattern, GLOB_NOESCAPE) );
- var_dump( glob($pattern, GLOB_ERR) );
+ try {
+ var_dump( glob($pattern) ); // default arguments
+ var_dump( glob($pattern, GLOB_MARK) );
+ var_dump( glob($pattern, GLOB_NOSORT) );
+ var_dump( glob($pattern, GLOB_NOCHECK) );
+ var_dump( glob($pattern, GLOB_NOESCAPE) );
+ var_dump( glob($pattern, GLOB_ERR) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
}
@@ -72,7 +76,11 @@ $counter = 1;
using glob() */
foreach($patterns as $pattern) {
echo "-- Iteration $counter --\n";
- var_dump( glob($pattern, GLOB_ONLYDIR) );
+ try {
+ var_dump( glob($pattern, GLOB_ONLYDIR) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
}
@@ -325,24 +333,7 @@ array(0) {
}
-- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given %sglob_variation-win32.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
array(0) {
@@ -445,9 +436,7 @@ array(1) {
array(0) {
}
-- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %sglob_variation-win32.php on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
array(0) {
}
diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt
index 056cf62bec..eb5aff0cf4 100644
--- a/ext/standard/tests/file/glob_variation.phpt
+++ b/ext/standard/tests/file/glob_variation.phpt
@@ -48,12 +48,16 @@ $counter = 1;
using glob() */
foreach($patterns as $pattern) {
echo "\n-- Iteration $counter --\n";
- var_dump( glob($pattern) ); // default arguments
- var_dump( glob($pattern, GLOB_MARK) );
- var_dump( glob($pattern, GLOB_NOSORT) );
- var_dump( glob($pattern, GLOB_NOCHECK) );
- var_dump( glob($pattern, GLOB_NOESCAPE) );
- var_dump( glob($pattern, GLOB_ERR) );
+ try {
+ var_dump( glob($pattern) ); // default arguments
+ var_dump( glob($pattern, GLOB_MARK) );
+ var_dump( glob($pattern, GLOB_NOSORT) );
+ var_dump( glob($pattern, GLOB_NOCHECK) );
+ var_dump( glob($pattern, GLOB_NOESCAPE) );
+ var_dump( glob($pattern, GLOB_ERR) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
}
@@ -75,7 +79,11 @@ $counter = 1;
using glob() */
foreach($patterns as $pattern) {
echo "-- Iteration $counter --\n";
- var_dump( glob($pattern, GLOB_ONLYDIR) );
+ try {
+ var_dump( glob($pattern, GLOB_ONLYDIR) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
}
@@ -328,24 +336,7 @@ array(0) {
}
-- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
array(0) {
@@ -448,9 +439,7 @@ array(1) {
array(0) {
}
-- Iteration 8 --
-
-Warning: glob() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+glob() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
array(0) {
}
diff --git a/ext/standard/tests/file/glob_variation3.phpt b/ext/standard/tests/file/glob_variation3.phpt
index 5db242825e..4bf008a9a7 100644
--- a/ext/standard/tests/file/glob_variation3.phpt
+++ b/ext/standard/tests/file/glob_variation3.phpt
@@ -15,7 +15,6 @@ var_dump(glob("$path/directly_not_exists"));
var_dump(empty(ini_get('open_basedir')));
?>
-==DONE==
--EXPECT--
array(0) {
}
@@ -30,4 +29,3 @@ array(0) {
array(0) {
}
bool(true)
-==DONE==
diff --git a/ext/standard/tests/file/glob_variation4.phpt b/ext/standard/tests/file/glob_variation4.phpt
index 6544c96944..b96f14fb38 100644
--- a/ext/standard/tests/file/glob_variation4.phpt
+++ b/ext/standard/tests/file/glob_variation4.phpt
@@ -15,7 +15,6 @@ var_dump(glob("$path/directly_not_exists"));
var_dump($path == ini_get('open_basedir'));
?>
-==DONE==
--EXPECT--
array(0) {
}
@@ -30,4 +29,3 @@ array(0) {
array(0) {
}
bool(true)
-==DONE==
diff --git a/ext/standard/tests/file/glob_variation5.phpt b/ext/standard/tests/file/glob_variation5.phpt
index 800305aabd..e03bc08d56 100644
--- a/ext/standard/tests/file/glob_variation5.phpt
+++ b/ext/standard/tests/file/glob_variation5.phpt
@@ -17,7 +17,6 @@ var_dump(glob("$path/directly_not_exists"));
var_dump('/tmp' == ini_get('open_basedir'));
?>
-==DONE==
--EXPECT--
bool(false)
bool(false)
@@ -26,4 +25,3 @@ bool(false)
bool(false)
bool(false)
bool(true)
-==DONE==
diff --git a/ext/standard/tests/file/glob_variation6.phpt b/ext/standard/tests/file/glob_variation6.phpt
index e0eaeb8c6e..553819326f 100644
--- a/ext/standard/tests/file/glob_variation6.phpt
+++ b/ext/standard/tests/file/glob_variation6.phpt
@@ -17,7 +17,6 @@ var_dump(glob("$path/directly_not_exists"));
var_dump('c:\\windows' == ini_get('open_basedir'));
?>
-==DONE==
--EXPECT--
array(0) {
}
@@ -32,4 +31,3 @@ array(0) {
array(0) {
}
bool(true)
-==DONE==
diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt
index 3f9d196e64..e82d9ae034 100644
--- a/ext/standard/tests/file/is_dir_variation3.phpt
+++ b/ext/standard/tests/file/is_dir_variation3.phpt
@@ -11,8 +11,6 @@ obscure_filename
/* Passing invalid arguments to is_dir() */
-$dir_handle = opendir( __DIR__ );
-
echo "*** Testing is_dir() with Invalid arguments: expected bool(false) ***\n";
$dirnames = array(
/* Invalid dirnames */
@@ -21,7 +19,6 @@ $dirnames = array(
FALSE,
NULL,
" ",
- $dir_handle,
/* scalars */
0,
@@ -32,7 +29,6 @@ $dirnames = array(
foreach($dirnames as $dirname) {
var_dump( is_dir($dirname) );
}
-closedir($dir_handle);
?>
--EXPECTF--
*** Testing is_dir() with Invalid arguments: expected bool(false) ***
@@ -41,8 +37,5 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-Warning: is_dir() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
bool(false)
bool(false)
diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt
index 543533f8ed..8d4838524e 100644
--- a/ext/standard/tests/file/is_dir_variation4.phpt
+++ b/ext/standard/tests/file/is_dir_variation4.phpt
@@ -38,7 +38,11 @@ $count = 1;
/* loop through to test each element the above array */
foreach($dirs_arr as $dir) {
echo "\n-- Iteration $count --\n";
- var_dump( is_dir($file_path."/".$dir ) );
+ try {
+ var_dump( is_dir($file_path."/".$dir ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count++;
}
@@ -77,13 +81,9 @@ bool(true)
bool(false)
-- Iteration 9 --
-
-Warning: is_dir() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_dir() expects parameter 1 to be a valid path, string given
-- Iteration 10 --
-
-Warning: is_dir() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_dir() expects parameter 1 to be a valid path, string given
*** Done ***
diff --git a/ext/standard/tests/file/is_executable_error.phpt b/ext/standard/tests/file/is_executable_error.phpt
index 99c218b514..ad90d64435 100644
--- a/ext/standard/tests/file/is_executable_error.phpt
+++ b/ext/standard/tests/file/is_executable_error.phpt
@@ -6,24 +6,11 @@ Test is_executable() function: error conditions
Description: Tells whether the filename is executable
*/
-echo "*** Testing is_executable(): error conditions ***\n";
-var_dump( is_executable() ); // args < expected no of arguments
-
-var_dump( is_executable(1, 2) ); // args > expected no. of arguments
-
echo "\n*** Testing is_exceutable() on non-existent directory ***\n";
var_dump( is_executable(__DIR__."/is_executable") );
echo "Done\n";
--EXPECTF--
-*** Testing is_executable(): error conditions ***
-
-Warning: is_executable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_executable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Testing is_exceutable() on non-existent directory ***
bool(false)
Done
diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt
index 1e8d8f5faf..5c8193b44d 100644
--- a/ext/standard/tests/file/is_executable_variation1.phpt
+++ b/ext/standard/tests/file/is_executable_variation1.phpt
@@ -51,7 +51,11 @@ $counter = 1;
is an executable file */
foreach($files_arr as $file) {
echo "-- Iteration $counter --\n";
- var_dump( is_executable($file) );
+ try {
+ var_dump( is_executable($file) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
clearstatcache();
}
@@ -76,13 +80,9 @@ bool(false)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
-
-Warning: is_executable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_executable() expects parameter 1 to be a valid path, string given
-- Iteration 7 --
-
-Warning: is_executable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_executable() expects parameter 1 to be a valid path, string given
-- Iteration 8 --
bool(false)
-- Iteration 9 --
diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt
index 1a71a5a005..92ad3320d3 100644
--- a/ext/standard/tests/file/is_executable_variation3.phpt
+++ b/ext/standard/tests/file/is_executable_variation3.phpt
@@ -29,7 +29,6 @@ $invalid_files = array(
FALSE,
NULL,
" ",
- @array(),
@$file_handle
);
/* loop through to test each element in the above array
@@ -52,8 +51,5 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-Warning: is_executable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
bool(false)
Done
diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt
index d18bef52f1..d33b01dfb3 100644
--- a/ext/standard/tests/file/is_file_variation3.phpt
+++ b/ext/standard/tests/file/is_file_variation3.phpt
@@ -9,7 +9,7 @@ obscure_filename
Returns TRUE if the filename exists and is a regular file
*/
-/* Testing is_file() with invalid arguments -int, float, bool, NULL, resource */
+/* Testing is_file() with invalid arguments -int, float, bool, NULL */
function flatten($variable) {
\ob_start();
@@ -31,10 +31,7 @@ foreach([
/* scalars */
1234,
- 0,
-
- /* resource */
- fopen(__FILE__, "r")
+ 0
] as $filename ) {
printf(
"%s: %d\n",
@@ -51,4 +48,3 @@ bool(false): 0
NULL: 0
int(1234): 0
int(0): 0
-resource(%d) of type (stream): 0
diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt
index 39a640e7eb..e67180c086 100644
--- a/ext/standard/tests/file/is_file_variation4.phpt
+++ b/ext/standard/tests/file/is_file_variation4.phpt
@@ -38,7 +38,11 @@ $count = 1;
/* loop through to test each element in the above array */
foreach($files_arr as $file) {
echo "- Iteration $count -\n";
- var_dump( is_file( $file_path."/".$file ) );
+ try {
+ var_dump( is_file( $file_path."/".$file ) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
clearstatcache();
$count++;
}
@@ -67,12 +71,8 @@ bool(false)
- Iteration 6 -
bool(false)
- Iteration 7 -
-
-Warning: is_file() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_file() expects parameter 1 to be a valid path, string given
- Iteration 8 -
-
-Warning: is_file() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_file() expects parameter 1 to be a valid path, string given
*** Done ***
diff --git a/ext/standard/tests/file/is_readable_error.phpt b/ext/standard/tests/file/is_readable_error.phpt
index ad6c2b8c62..1520eb4d20 100644
--- a/ext/standard/tests/file/is_readable_error.phpt
+++ b/ext/standard/tests/file/is_readable_error.phpt
@@ -6,24 +6,12 @@ Test is_readable() function: error conditions
Description: Tells whether the filename is readable
*/
-echo "*** Testing is_readable(): error conditions ***\n";
-var_dump( is_readable() ); // args < expected
-var_dump( is_readable(1, 2) ); // args > expected
-
echo "\n*** Testing is_readable() on non-existent file ***\n";
var_dump( is_readable(__DIR__."/is_readable.tmp") );
echo "Done\n";
?>
--EXPECTF--
-*** Testing is_readable(): error conditions ***
-
-Warning: is_readable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_readable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Testing is_readable() on non-existent file ***
bool(false)
Done
diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt
index 60729b5ac2..ab2e591ad5 100644
--- a/ext/standard/tests/file/is_readable_variation1.phpt
+++ b/ext/standard/tests/file/is_readable_variation1.phpt
@@ -50,7 +50,11 @@ $counter = 1;
is a writable file */
foreach($files_arr as $file) {
echo "-- Iteration $counter --\n";
- var_dump( is_readable($file) );
+ try {
+ var_dump( is_readable($file) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
clearstatcache();
}
@@ -77,17 +81,11 @@ bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
-
-Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_readable() expects parameter 1 to be a valid path, string given
-- Iteration 8 --
-
-Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_readable() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
-
-Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_readable() expects parameter 1 to be a valid path, string given
-- Iteration 10 --
bool(true)
-- Iteration 11 --
diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt
index c73a28520f..9a80792c00 100644
--- a/ext/standard/tests/file/is_readable_variation3.phpt
+++ b/ext/standard/tests/file/is_readable_variation3.phpt
@@ -26,7 +26,6 @@ $misc_files = array(
FALSE,
NULL,
" ",
- @array(),
@$file_handle
);
/* loop through to test each element in the above array
@@ -49,8 +48,5 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-Warning: is_readable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
bool(false)
Done
diff --git a/ext/standard/tests/file/is_uploaded_file_basic.phpt b/ext/standard/tests/file/is_uploaded_file_basic.phpt
index 1721935549..d053244a79 100644
--- a/ext/standard/tests/file/is_uploaded_file_basic.phpt
+++ b/ext/standard/tests/file/is_uploaded_file_basic.phpt
@@ -29,19 +29,9 @@ var_dump(is_uploaded_file('random_filename.txt'));
// not an uploaded file
var_dump(is_uploaded_file('__FILE__'));
-// Error cases
-var_dump(is_uploaded_file());
-var_dump(is_uploaded_file('a', 'b'));
-
?>
--EXPECTF--
bool(true)
bool(false)
bool(false)
bool(false)
-
-Warning: is_uploaded_file() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_uploaded_file() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
diff --git a/ext/standard/tests/file/is_writable_error.phpt b/ext/standard/tests/file/is_writable_error.phpt
index a9633f2284..e2a38412cd 100644
--- a/ext/standard/tests/file/is_writable_error.phpt
+++ b/ext/standard/tests/file/is_writable_error.phpt
@@ -8,14 +8,6 @@ Test is_writable() and its alias is_writeable() function: error conditions
is_writeable() is an alias of is_writable()
*/
-echo "*** Testing is_writable(): error conditions ***\n";
-var_dump( is_writable() ); // args < expected
-var_dump( is_writeable() );
-
-echo "\n*** Testing is_writeable(): error conditions ***\n";
-var_dump( is_writable(1, 2) ); // args > expected
-var_dump( is_writeable(1, 2) );
-
echo "\n*** Testing is_writable() on non-existent file ***\n";
var_dump( is_writable(__DIR__."/is_writable") );
var_dump( is_writeable(__DIR__."/is_writable") );
@@ -23,22 +15,6 @@ var_dump( is_writeable(__DIR__."/is_writable") );
echo "Done\n";
?>
--EXPECTF--
-*** Testing is_writable(): error conditions ***
-
-Warning: is_writable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_writeable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-*** Testing is_writeable(): error conditions ***
-
-Warning: is_writable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: is_writeable() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Testing is_writable() on non-existent file ***
bool(false)
bool(false)
diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt
index 6ce05f172e..45ef1524b6 100644
--- a/ext/standard/tests/file/is_writable_variation1.phpt
+++ b/ext/standard/tests/file/is_writable_variation1.phpt
@@ -50,8 +50,16 @@ $counter = 1;
is a writable file */
foreach($files_arr as $file) {
echo "-- Iteration $counter --\n";
- var_dump( is_writable($file) );
- var_dump( is_writeable($file) );
+ try {
+ var_dump( is_writable($file) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( is_writeable($file) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
clearstatcache();
}
@@ -84,26 +92,14 @@ bool(false)
bool(false)
bool(false)
-- Iteration 7 --
-
-Warning: is_writable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_writable() expects parameter 1 to be a valid path, string given
+is_writeable() expects parameter 1 to be a valid path, string given
-- Iteration 8 --
-
-Warning: is_writable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_writable() expects parameter 1 to be a valid path, string given
+is_writeable() expects parameter 1 to be a valid path, string given
-- Iteration 9 --
-
-Warning: is_writable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, string given in %s on line %d
-NULL
+is_writable() expects parameter 1 to be a valid path, string given
+is_writeable() expects parameter 1 to be a valid path, string given
-- Iteration 10 --
bool(true)
bool(true)
diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt
index e49270bcf4..c5843a5abf 100644
--- a/ext/standard/tests/file/is_writable_variation3.phpt
+++ b/ext/standard/tests/file/is_writable_variation3.phpt
@@ -27,7 +27,6 @@ $misc_files = array(
FALSE,
NULL,
" ",
- @array(),
@$file_handle
);
/* loop through to test each element in the above array
@@ -56,11 +55,5 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-Warning: is_writable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-
-Warning: is_writeable() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
bool(false)
bool(false)
diff --git a/ext/standard/tests/file/lchgrp_basic.phpt b/ext/standard/tests/file/lchgrp_basic.phpt
index fa97ce86ef..283d805a94 100644
--- a/ext/standard/tests/file/lchgrp_basic.phpt
+++ b/ext/standard/tests/file/lchgrp_basic.phpt
@@ -18,7 +18,6 @@ var_dump( lchgrp( $filename, $gid ) );
var_dump( filegroup( $symlink ) === $gid );
?>
-===DONE===
--CLEAN--
<?php
@@ -33,4 +32,3 @@ bool(true)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/lchown_basic.phpt b/ext/standard/tests/file/lchown_basic.phpt
index e38bbda1be..d6a6072792 100644
--- a/ext/standard/tests/file/lchown_basic.phpt
+++ b/ext/standard/tests/file/lchown_basic.phpt
@@ -25,7 +25,6 @@ var_dump( lchown( $filename, $uid ) );
var_dump( fileowner( $symlink ) === $uid );
?>
-===DONE===
--CLEAN--
<?php
@@ -41,4 +40,3 @@ bool(true)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/lchown_error.phpt b/ext/standard/tests/file/lchown_error.phpt
index dbd9a7bbe8..093c0c5b31 100644
--- a/ext/standard/tests/file/lchown_error.phpt
+++ b/ext/standard/tests/file/lchown_error.phpt
@@ -21,25 +21,13 @@ $filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown.txt';
touch( $filename );
$uid = posix_getuid();
-
-// Less than expected arguments
-var_dump( lchown( $filename ) );
-
-// More than expected arguments
-var_dump( lchown( $filename, $uid, 'foobar' ) );
-
// Non-existent filename
var_dump( lchown( 'foobar_lchown.txt', $uid ) );
-// Wrong argument types
-var_dump( lchown( new StdClass(), $uid ) );
-var_dump( lchown( array(), $uid ) );
-
// Bad user
var_dump( lchown( $filename, -5 ) );
?>
-===DONE===
--CLEAN--
<?php
@@ -50,21 +38,8 @@ unlink($filename);
--EXPECTF--
*** Testing lchown() : error functionality ***
-Warning: lchown() expects exactly 2 parameters, 1 given in %s on line %d
-bool(true)
-
-Warning: lchown() expects exactly 2 parameters, 3 given in %s on line %d
-bool(true)
-
Warning: lchown(): No such file or directory in %s on line %d
bool(false)
-Warning: lchown() expects parameter 1 to be a valid path, object given in %s on line %d
-bool(true)
-
-Warning: lchown() expects parameter 1 to be a valid path, array given in %s on line %d
-bool(true)
-
Warning: lchown(): %r(Operation not permitted|Invalid argument)%r in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/lstat_stat_error.phpt b/ext/standard/tests/file/lstat_stat_error.phpt
index 543e296ec2..06926df2a2 100644
--- a/ext/standard/tests/file/lstat_stat_error.phpt
+++ b/ext/standard/tests/file/lstat_stat_error.phpt
@@ -17,54 +17,28 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
echo "*** Testing lstat() for error conditions ***\n";
$file_path = __DIR__;
-var_dump( lstat() ); // args < expected
-var_dump( lstat(__FILE__, 2) ); // args > expected
var_dump( lstat("$file_path/temp.tmp") ); // non existing file
var_dump( lstat(22) ); // scalar argument
-$arr = array(__FILE__);
-var_dump( lstat($arr) ); // array argument
echo "\n*** Testing stat() for error conditions ***\n";
-var_dump( stat() ); // args < expected
-var_dump( stat(__FILE__, 2) ); // file, args > expected
-var_dump( stat(__DIR__, 2) ); //dir, args > expected
var_dump( stat("$file_path/temp.tmp") ); // non existing file
var_dump( stat("$file_path/temp/") ); // non existing dir
var_dump( stat(22) ); // scalar argument
-var_dump( stat($arr) ); // array argument
echo "Done\n";
?>
--EXPECTF--
*** Testing lstat() for error conditions ***
-Warning: lstat() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: lstat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: lstat(): Lstat failed for %s in %s on line %d
bool(false)
Warning: lstat(): Lstat failed for 22 in %s on line %d
bool(false)
-Warning: lstat() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-
*** Testing stat() for error conditions ***
-Warning: stat() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: stat(): stat failed for %s in %s on line %d
bool(false)
@@ -73,7 +47,4 @@ bool(false)
Warning: stat(): stat failed for 22 in %s on line %d
bool(false)
-
-Warning: stat() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/file/lstat_stat_variation3.phpt b/ext/standard/tests/file/lstat_stat_variation3.phpt
index 962f1df5b2..15fc5f0b53 100644
--- a/ext/standard/tests/file/lstat_stat_variation3.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation3.phpt
@@ -46,7 +46,6 @@ $keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12,
"rdev", "size", "atime", "mtime", "blksize", "blocks");
var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) );
?>
-===Done===
--CLEAN--
<?php
$file_path = __DIR__;
@@ -59,4 +58,3 @@ bool(true)
bool(true)
bool(true)
bool(true)
-===Done===
diff --git a/ext/standard/tests/file/mkdir_rmdir_error.phpt b/ext/standard/tests/file/mkdir_rmdir_error.phpt
index 17f908c3f6..be0b434c2c 100644
--- a/ext/standard/tests/file/mkdir_rmdir_error.phpt
+++ b/ext/standard/tests/file/mkdir_rmdir_error.phpt
@@ -9,48 +9,12 @@ Test mkdir() and rmdir() functions : error conditions
Description: Removes directory
*/
-echo "*** Testing mkdir(): error conditions ***\n";
-var_dump( mkdir() ); // args < expected
-var_dump( mkdir(1, 2, 3, 4, 5) ); // args > expected
-var_dump( mkdir("testdir", 0777, false, $context, "test") ); // args > expected
-
-echo "\n*** Testing rmdir(): error conditions ***\n";
-var_dump( rmdir() ); // args < expected
-var_dump( rmdir(1, 2, 3) ); // args > expected
-var_dump( rmdir("testdir", $context, "test") ); // args > expected
-
echo "\n*** Testing rmdir() on non-existent directory ***\n";
var_dump( rmdir("temp") );
echo "Done\n";
?>
--EXPECTF--
-*** Testing mkdir(): error conditions ***
-
-Warning: mkdir() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: mkdir() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: context in %s on line %d
-
-Warning: mkdir() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
-
-*** Testing rmdir(): error conditions ***
-
-Warning: rmdir() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: rmdir() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: context in %s on line %d
-
-Warning: rmdir() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
*** Testing rmdir() on non-existent directory ***
Warning: rmdir(temp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
index 22c055ddb5..8712d52604 100644
--- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
+++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
@@ -26,8 +26,16 @@ var_dump( mkdir("$file_path/mkdir_variation2/test/", 0777, true) );
var_dump( rmdir("$file_path/mkdir_variation2/") );
echo "\n*** Testing mkdir() and rmdir() for binary safe functionality ***\n";
-var_dump( mkdir("$file_path/temp".chr(0)."/") );
-var_dump( rmdir("$file_path/temp".chr(0)."/") );
+try {
+ var_dump( mkdir("$file_path/temp".chr(0)."/") );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( rmdir("$file_path/temp".chr(0)."/") );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n*** Testing mkdir() with miscelleneous input ***\n";
/* changing mode of mkdir to prevent creating sub-directory under it */
@@ -55,12 +63,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d
bool(false)
*** Testing mkdir() and rmdir() for binary safe functionality ***
-
-Warning: mkdir() expects parameter 1 to be a valid path, string given in %s on line %d
-bool(false)
-
-Warning: rmdir() expects parameter 1 to be a valid path, string given in %s on line %d
-bool(false)
+mkdir() expects parameter 1 to be a valid path, string given
+rmdir() expects parameter 1 to be a valid path, string given
*** Testing mkdir() with miscelleneous input ***
bool(true)
diff --git a/ext/standard/tests/file/mkdir_variation5-win32.phpt b/ext/standard/tests/file/mkdir_variation5-win32.phpt
index b805dee3be..e2eea07f52 100644
--- a/ext/standard/tests/file/mkdir_variation5-win32.phpt
+++ b/ext/standard/tests/file/mkdir_variation5-win32.phpt
@@ -68,7 +68,6 @@ foreach($dirs as $dir) {
rmdir($workDir);
?>
-===DONE===
--EXPECTF--
*** Testing mkdir() : variation ***
-- creating mkdirVar5.tmp\aSubDir --
@@ -102,4 +101,3 @@ Directory created
Directory created
-- creating /%s/mkdirVar5.tmp/aSubDir --
Directory created
-===DONE===
diff --git a/ext/standard/tests/file/mkdir_variation5.phpt b/ext/standard/tests/file/mkdir_variation5.phpt
index ea60edf42f..c8e8b8d3ea 100644
--- a/ext/standard/tests/file/mkdir_variation5.phpt
+++ b/ext/standard/tests/file/mkdir_variation5.phpt
@@ -63,7 +63,6 @@ foreach($dirs as $dir) {
rmdir($workDir);
?>
-===DONE===
--EXPECTF--
*** Testing mkdir() : variation ***
-- creating mkdirVar5.tmp/aSubDir --
@@ -95,4 +94,3 @@ Directory created
Directory created
-- creating %s//mkdirVar5.tmp//aSubDir --
Directory created
-===DONE===
diff --git a/ext/standard/tests/file/move_uploaded_file_basic.phpt b/ext/standard/tests/file/move_uploaded_file_basic.phpt
index c6cfdd3203..7af8748fe2 100644
--- a/ext/standard/tests/file/move_uploaded_file_basic.phpt
+++ b/ext/standard/tests/file/move_uploaded_file_basic.phpt
@@ -49,11 +49,6 @@ fclose($fd);
var_dump(move_uploaded_file($_FILES['file2']['tmp_name'], $destination4));
unlink($destination4);
-echo "Wrong parameters\n";
-var_dump(move_uploaded_file());
-var_dump(move_uploaded_file(1, 2, 3));
-
-
?>
--EXPECTF--
Valid move
@@ -66,10 +61,3 @@ Non-uploaded source file
bool(false)
Valid move to existing file
bool(true)
-Wrong parameters
-
-Warning: move_uploaded_file() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: move_uploaded_file() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
diff --git a/ext/standard/tests/file/parse_ini_file_error.phpt b/ext/standard/tests/file/parse_ini_file_error.phpt
index 29e022fb13..5c812d7b9a 100644
--- a/ext/standard/tests/file/parse_ini_file_error.phpt
+++ b/ext/standard/tests/file/parse_ini_file_error.phpt
@@ -10,10 +10,6 @@ Test parse_ini_file() function : error conditions
echo "*** Testing parse_ini_file() : error conditions ***\n";
-// Zero arguments
-echo "\n-- Testing parse_ini_file() function with Zero arguments --\n";
-var_dump( parse_ini_file() );
-
//Test parse_ini_file with one more than the expected number of arguments
echo "\n-- Testing parse_ini_file() function with more than expected no. of arguments --\n";
$filename = 'string_val';
@@ -30,11 +26,6 @@ echo "Done";
--EXPECTF--
*** Testing parse_ini_file() : error conditions ***
--- Testing parse_ini_file() function with Zero arguments --
-
-Warning: parse_ini_file() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-- Testing parse_ini_file() function with more than expected no. of arguments --
Warning: parse_ini_file(%s): failed to open stream: No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/parse_ini_file_variation1.phpt b/ext/standard/tests/file/parse_ini_file_variation1.phpt
index 666ea433b1..82465d9b17 100644
--- a/ext/standard/tests/file/parse_ini_file_variation1.phpt
+++ b/ext/standard/tests/file/parse_ini_file_variation1.phpt
@@ -30,7 +30,6 @@ var_dump($a);
unlink($output_file);
?>
-===DONE===
--EXPECT--
*** Testing parse_ini_file() : variation ***
array(2) {
@@ -65,4 +64,3 @@ array(2) {
string(9) "different"
}
}
-===DONE===
diff --git a/ext/standard/tests/file/parse_ini_file_variation2.phpt b/ext/standard/tests/file/parse_ini_file_variation2.phpt
index e7b9091737..2ba810ae2e 100644
--- a/ext/standard/tests/file/parse_ini_file_variation2.phpt
+++ b/ext/standard/tests/file/parse_ini_file_variation2.phpt
@@ -47,7 +47,6 @@ $a = parse_ini_file($output_file, true);
var_dump($a);
unlink($output_file);
?>
-===DONE===
--EXPECT--
*** Testing parse_ini_file() : variation ***
array(8) {
@@ -108,4 +107,3 @@ array(8) {
string(0) ""
}
}
-===DONE===
diff --git a/ext/standard/tests/file/parse_ini_file_variation3.phpt b/ext/standard/tests/file/parse_ini_file_variation3.phpt
index 96d44433f7..23b0ec4a8a 100644
--- a/ext/standard/tests/file/parse_ini_file_variation3.phpt
+++ b/ext/standard/tests/file/parse_ini_file_variation3.phpt
@@ -43,7 +43,6 @@ log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
-track_errors = Off
docref_root = "/phpmanual/"
docref_ext = .html
@@ -53,7 +52,6 @@ file_put_contents($output_file, $iniContent);
var_dump(parse_ini_file($iniFile));
?>
-===Done===
--CLEAN--
<?php
@@ -77,7 +75,7 @@ foreach($newdirs as $newdir) {
--EXPECTF--
*** Testing parse_ini_file() : variation ***
New include path is : %sparse_ini_file_variation3.dir1%sparse_ini_file_variation3.dir2%sparse_ini_file_variation3.dir3%S
-array(11) {
+array(10) {
["error_reporting"]=>
string(5) "32767"
["display_errors"]=>
@@ -94,11 +92,8 @@ array(11) {
string(0) ""
["report_memleaks"]=>
string(1) "1"
- ["track_errors"]=>
- string(0) ""
["docref_root"]=>
string(11) "/phpmanual/"
["docref_ext"]=>
string(5) ".html"
}
-===Done===
diff --git a/ext/standard/tests/file/pathinfo_variation3.phpt b/ext/standard/tests/file/pathinfo_variation3.phpt
index 014cc90e9a..251a20496f 100644
--- a/ext/standard/tests/file/pathinfo_variation3.phpt
+++ b/ext/standard/tests/file/pathinfo_variation3.phpt
@@ -32,7 +32,6 @@ var_dump(pathinfo($testfile, PATHINFO_DIRNAME|PATHINFO_BASENAME));
?>
-===DONE===
--EXPECTF--
*** Testing pathinfo() : usage variation ***
array(4) {
@@ -77,4 +76,3 @@ string(17) "/usr/include/arpa"
string(6) "inet.h"
string(17) "/usr/include/arpa"
string(17) "/usr/include/arpa"
-===DONE===
diff --git a/ext/standard/tests/file/pathinfo_variaton.phpt b/ext/standard/tests/file/pathinfo_variaton.phpt
index 421f378e01..a671c22fda 100644
--- a/ext/standard/tests/file/pathinfo_variaton.phpt
+++ b/ext/standard/tests/file/pathinfo_variaton.phpt
@@ -43,9 +43,6 @@ $paths = array (
"./array(1, 2)",
"array( array(), null)",
- /* pathname as object */
- $obj,
-
/* pathname as spaces */
" ",
' ',
@@ -93,7 +90,7 @@ echo "Done\n";
--EXPECTF--
*** Testing pathinfo() with miscelleneous input arguments ***
-Notice: Undefined variable: fp in %s on line %d
+Warning: Undefined variable: fp in %s on line %d
-- Iteration 1 --
array(3) {
["dirname"]=>
@@ -199,22 +196,6 @@ string(21) "array( array(), null)"
string(0) ""
string(21) "array( array(), null)"
-- Iteration 9 --
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: pathinfo() expects parameter 1 to be string, object given in %s on line %d
-NULL
--- Iteration 10 --
array(3) {
["dirname"]=>
string(1) "."
@@ -227,7 +208,7 @@ string(1) "."
string(1) " "
string(0) ""
string(1) " "
--- Iteration 11 --
+-- Iteration 10 --
array(3) {
["dirname"]=>
string(1) "."
@@ -240,7 +221,7 @@ string(1) "."
string(1) " "
string(0) ""
string(1) " "
--- Iteration 12 --
+-- Iteration 11 --
array(2) {
["basename"]=>
string(0) ""
@@ -251,7 +232,7 @@ string(0) ""
string(0) ""
string(0) ""
string(0) ""
--- Iteration 13 --
+-- Iteration 12 --
array(2) {
["basename"]=>
string(0) ""
@@ -262,7 +243,7 @@ string(0) ""
string(0) ""
string(0) ""
string(0) ""
--- Iteration 14 --
+-- Iteration 13 --
array(2) {
["basename"]=>
string(0) ""
@@ -273,7 +254,7 @@ string(0) ""
string(0) ""
string(0) ""
string(0) ""
--- Iteration 15 --
+-- Iteration 14 --
array(2) {
["basename"]=>
string(0) ""
@@ -284,7 +265,7 @@ string(0) ""
string(0) ""
string(0) ""
string(0) ""
--- Iteration 16 --
+-- Iteration 15 --
array(2) {
["basename"]=>
string(0) ""
@@ -295,7 +276,7 @@ string(0) ""
string(0) ""
string(0) ""
string(0) ""
--- Iteration 17 --
+-- Iteration 16 --
array(4) {
["dirname"]=>
string(1) "."
@@ -310,7 +291,7 @@ string(1) "."
string(11) "www.foo.com"
string(3) "com"
string(7) "www.foo"
--- Iteration 18 --
+-- Iteration 17 --
array(4) {
["dirname"]=>
string(17) "/var/html/testdir"
@@ -325,7 +306,7 @@ string(17) "/var/html/testdir"
string(12) "example.html"
string(4) "html"
string(7) "example"
--- Iteration 19 --
+-- Iteration 18 --
array(3) {
["dirname"]=>
string(12) "/testdir/foo"
@@ -338,7 +319,7 @@ string(12) "/testdir/foo"
string(4) "test"
string(0) ""
string(4) "test"
--- Iteration 20 --
+-- Iteration 19 --
array(4) {
["dirname"]=>
string(4) "/foo"
@@ -353,7 +334,7 @@ string(4) "/foo"
string(12) "symlink.link"
string(4) "link"
string(7) "symlink"
--- Iteration 21 --
+-- Iteration 20 --
array(3) {
["dirname"]=>
string(1) "."
@@ -366,7 +347,7 @@ string(1) "."
string(5) "12345"
string(0) ""
string(5) "12345"
--- Iteration 22 --
+-- Iteration 21 --
array(4) {
["dirname"]=>
string(1) "."
@@ -381,7 +362,7 @@ string(1) "."
string(15) "www.example.com"
string(3) "com"
string(11) "www.example"
--- Iteration 23 --
+-- Iteration 22 --
array(3) {
["dirname"]=>
string(12) "/testdir/foo"
@@ -394,7 +375,7 @@ string(12) "/testdir/foo"
string(4) "test"
string(0) ""
string(4) "test"
--- Iteration 24 --
+-- Iteration 23 --
array(4) {
["dirname"]=>
string(6) "../foo"
@@ -409,7 +390,7 @@ string(6) "../foo"
string(9) "test.link"
string(4) "link"
string(4) "test"
--- Iteration 25 --
+-- Iteration 24 --
array(4) {
["dirname"]=>
string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/test5/test6"
@@ -424,7 +405,7 @@ string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/tes
string(8) "test.tmp"
string(3) "tmp"
string(4) "test"
--- Iteration 26 --
+-- Iteration 25 --
array(4) {
["dirname"]=>
string(1) "."
diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt
index b0e86be65c..eebe6a7a00 100644
--- a/ext/standard/tests/file/popen_pclose_error.phpt
+++ b/ext/standard/tests/file/popen_pclose_error.phpt
@@ -16,14 +16,9 @@ if (strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN')
*/
$file_path = __DIR__;
echo "*** Testing for error conditions ***\n";
-var_dump( popen() ); // Zero Arguments
-var_dump( popen("abc.txt") ); // Single Argument
var_dump( popen("abc.txt", "rw") ); // Invalid mode Argument
-var_dump( pclose() );
$file_handle = fopen($file_path."/popen.tmp", "w");
-var_dump( pclose($file_handle, $file_handle) );
fclose($file_handle);
-var_dump( pclose(1) );
echo "\n--- Done ---";
?>
--CLEAN--
@@ -34,22 +29,7 @@ unlink($file_path."/popen.tmp");
--EXPECTF--
*** Testing for error conditions ***
-Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
Warning: popen(abc.txt,rw): %s on line %d
bool(false)
-Warning: pclose() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: pclose() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: pclose() expects parameter 1 to be resource, int given in %s on line %d
-bool(false)
-
--- Done ---
diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt
index 0dc1f7b82f..9e5c6e5702 100644
--- a/ext/standard/tests/file/readfile_error.phpt
+++ b/ext/standard/tests/file/readfile_error.phpt
@@ -9,17 +9,12 @@ Test readfile() function: error conditions
$context = stream_context_create();
echo "*** Test readfile(): error conditions ***\n";
-echo "-- Testing readfile() with unexpected no. of arguments --\n";
-var_dump( readfile() ); // args < expected
-var_dump( readfile(__FILE__, true, $context, 4) ); // args > expected
echo "\n-- Testing readfile() with invalid arguments --\n";
// invalid arguments
var_dump( readfile(NULL) ); // NULL as $filename
var_dump( readfile('') ); // empty string as $filename
var_dump( readfile(false) ); // boolean false as $filename
-var_dump( readfile(__FILE__, false, '') ); // empty string as $context
-var_dump( readfile(__FILE__, true, false) ); // boolean false as $context
echo "\n-- Testing readfile() with non-existent file --\n";
$non_existent_file = __DIR__."/non_existent_file.tmp";
@@ -29,13 +24,6 @@ echo "Done\n";
?>
--EXPECTF--
*** Test readfile(): error conditions ***
--- Testing readfile() with unexpected no. of arguments --
-
-Warning: readfile() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: readfile() expects at most 3 parameters, 4 given in %s on line %d
-bool(false)
-- Testing readfile() with invalid arguments --
@@ -48,12 +36,6 @@ bool(false)
Warning: readfile(): Filename cannot be empty in %s on line %d
bool(false)
-Warning: readfile() expects parameter 3 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: readfile() expects parameter 3 to be resource, bool given in %s on line %d
-bool(false)
-
-- Testing readfile() with non-existent file --
Warning: readfile(%s/non_existent_file.tmp): failed to open stream: %s in %s on line %d
diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt
index 5824a8fe15..88349e18d9 100644
--- a/ext/standard/tests/file/readfile_variation10-win32.phpt
+++ b/ext/standard/tests/file/readfile_variation10-win32.phpt
@@ -38,8 +38,12 @@ $names_arr = array(
);
foreach($names_arr as $key => $value) {
- echo "\n-- Filename: $key --\n";
- readfile($value);
+ echo "\n-- Filename: $key --\n";
+ try {
+ readfile($value);
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
};
?>
@@ -71,12 +75,10 @@ Warning: readfile(): Filename cannot be empty in %s on line %d
Warning: readfile( ): failed to open stream: Permission denied in %s on line %d
-- Filename: \0 --
-
-Warning: readfile() expects parameter 1 to be a valid path, string given in %s on line %d
+readfile() expects parameter 1 to be a valid path, string given
-- Filename: array() --
-
-Warning: readfile() expects parameter 1 to be a valid path, array given in %s on line %d
+readfile() expects parameter 1 to be a valid path, array given
-- Filename: /no/such/file/dir --
diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt
index e9655377a3..351b03d565 100644
--- a/ext/standard/tests/file/readfile_variation10.phpt
+++ b/ext/standard/tests/file/readfile_variation10.phpt
Binary files differ
diff --git a/ext/standard/tests/file/readfile_variation6.phpt b/ext/standard/tests/file/readfile_variation6.phpt
index 38e0f23958..7e751753ff 100644
--- a/ext/standard/tests/file/readfile_variation6.phpt
+++ b/ext/standard/tests/file/readfile_variation6.phpt
@@ -42,8 +42,6 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
*** Testing readfile() : variation ***
File in include path
-===DONE===
diff --git a/ext/standard/tests/file/readfile_variation7.phpt b/ext/standard/tests/file/readfile_variation7.phpt
index 955d77bd27..71f2d0beb5 100644
--- a/ext/standard/tests/file/readfile_variation7.phpt
+++ b/ext/standard/tests/file/readfile_variation7.phpt
@@ -42,8 +42,6 @@ function runtest() {
}
?>
-===DONE===
--EXPECT--
*** Testing readfile() : variation ***
File in script location
-===DONE===
diff --git a/ext/standard/tests/file/readlink_realpath_error.phpt b/ext/standard/tests/file/readlink_realpath_error.phpt
index e2afb8bb36..07880d1007 100644
--- a/ext/standard/tests/file/readlink_realpath_error.phpt
+++ b/ext/standard/tests/file/readlink_realpath_error.phpt
@@ -15,10 +15,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
Description: Returns canonicalized absolute pathname
*/
-echo "*** Testing readlink(): error conditions ***\n";
-var_dump( readlink() ); // args < expected
-var_dump( readlink(__FILE__, 2) ); // args > expected
-
echo "\n*** Testing readlink() on a non-existent link ***\n";
var_dump( readlink(__DIR__."/readlink_error.tmp") );
@@ -28,24 +24,12 @@ var_dump( readlink(__FILE__) );
echo "\n*** Testing readlink() on existing directory ***\n";
var_dump( readlink(__DIR__) );
-echo "*** Testing realpath(): error conditions ***\n";
-var_dump( realpath() ); // args < expected
-var_dump( realpath(1, 2) ); // args > expected
-
echo "\n*** Testing realpath() on a non-existent file ***\n";
var_dump( realpath(__DIR__."/realpath_error.tmp") );
echo "Done\n";
?>
--EXPECTF--
-*** Testing readlink(): error conditions ***
-
-Warning: readlink() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: readlink() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Testing readlink() on a non-existent link ***
Warning: readlink(): No such file or directory in %s on line %d
@@ -60,13 +44,6 @@ bool(false)
Warning: readlink(): Invalid argument in %s on line %d
bool(false)
-*** Testing realpath(): error conditions ***
-
-Warning: realpath() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: realpath() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
*** Testing realpath() on a non-existent file ***
%s
diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt
index d641f20f26..276f894432 100644
--- a/ext/standard/tests/file/readlink_variation1.phpt
+++ b/ext/standard/tests/file/readlink_variation1.phpt
@@ -12,7 +12,6 @@ obscure_filename
/* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */
$file_path = __DIR__;
-$file_handle = fopen($file_path."/readlink_variation2.tmp", "w");
echo "*** Testing Invalid file types ***\n";
$filenames = array(
@@ -22,7 +21,6 @@ $filenames = array(
TRUE,
FALSE,
NULL,
- $file_handle,
/* scalars */
1234,
@@ -34,7 +32,6 @@ foreach( $filenames as $filename ) {
var_dump( readlink($filename) );
clearstatcache();
}
-fclose($file_handle);
?>
--CLEAN--
<?php
@@ -59,9 +56,6 @@ bool(false)
Warning: readlink(): %s in %s on line %d
bool(false)
-Warning: readlink() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-
Warning: readlink(): %s in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/realpath_error-win32.phpt b/ext/standard/tests/file/realpath_error-win32.phpt
deleted file mode 100644
index 2fd221e45a..0000000000
--- a/ext/standard/tests/file/realpath_error-win32.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Test realpath() function: error conditions
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip only on Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype: string realpath ( string $path );
- Description: Returns canonicalized absolute pathname
-*/
-
-echo "*** Testing realpath() for error conditions ***\n";
-var_dump( realpath() ); // args < expected
-var_dump( realpath(1, 2) ); // args > expected
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing realpath() for error conditions ***
-
-Warning: realpath() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: realpath() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
diff --git a/ext/standard/tests/file/realpath_variation2.phpt b/ext/standard/tests/file/realpath_variation2.phpt
index 9b0393a5f8..142e8846da 100644
--- a/ext/standard/tests/file/realpath_variation2.phpt
+++ b/ext/standard/tests/file/realpath_variation2.phpt
@@ -35,7 +35,6 @@ foreach($paths as $path) {
};
?>
-===DONE===
--EXPECTF--
*** Testing realpath() : variation ***
@@ -71,4 +70,3 @@ bool(false)
--\tmp\--
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/rename_basic.phpt b/ext/standard/tests/file/rename_basic.phpt
index 49de9ac042..4313f061d6 100644
--- a/ext/standard/tests/file/rename_basic.phpt
+++ b/ext/standard/tests/file/rename_basic.phpt
@@ -31,7 +31,6 @@ $keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12,
var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) );
?>
-===Done===
--CLEAN--
<?php
unlink(__DIR__."/rename_basic_new.tmp");
@@ -42,4 +41,3 @@ bool(true)
bool(false)
bool(true)
bool(true)
-===Done===
diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt
index 965a0dac25..83a4a88b29 100644
--- a/ext/standard/tests/file/rename_variation13-win32.phpt
+++ b/ext/standard/tests/file/rename_variation13-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt
index 70ec37c7a6..3e35f179a8 100644
--- a/ext/standard/tests/file/rename_variation13.phpt
+++ b/ext/standard/tests/file/rename_variation13.phpt
@@ -32,8 +32,6 @@ $names_arr = array(
NULL,
"",
" ",
- "\0",
- array(),
/* prefix with path separator of a non existing directory*/
"/no/such/file/dir",
@@ -98,24 +96,6 @@ bool(true)
Warning: rename( ,%s/renameVar13/afile.tmp): No such file or directory in %s on line %d
bool(false)
--- testing '%s' --
-
-Warning: rename() %s in %s on line %d
-bool(false)
-
-Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d
-
-Warning: rename() expects parameter 1 to be a valid path, string given in %s on line %d
-bool(false)
--- testing 'Array' --
-
-Warning: rename() expects parameter 2 to be a valid path, array given in %s on line %d
-bool(false)
-
-Warning: file_exists() expects parameter 1 to be a valid path, array given in %s on line %d
-
-Warning: rename() expects parameter 1 to be a valid path, array given in %s on line %d
-bool(false)
-- testing '/no/such/file/dir' --
Warning: rename(%s/renameVar13/afile.tmp,/no/such/file/dir): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/rmdir_variation3-win32.phpt b/ext/standard/tests/file/rmdir_variation3-win32.phpt
index ac8c9dd368..ca7e88f589 100644
--- a/ext/standard/tests/file/rmdir_variation3-win32.phpt
+++ b/ext/standard/tests/file/rmdir_variation3-win32.phpt
@@ -71,7 +71,6 @@ foreach($dirs as $dir) {
rmdir($workDir);
?>
-===DONE===
--EXPECTF--
*** Testing rmdir() : variation ***
-- removing rmdirVar3.tmp\aSubDir --
@@ -105,4 +104,3 @@ Directory removed
Directory removed
-- removing /%s/rmdirVar3.tmp/aSubDir --
Directory removed
-===DONE===
diff --git a/ext/standard/tests/file/rmdir_variation3.phpt b/ext/standard/tests/file/rmdir_variation3.phpt
index 095cde0880..c0714144e5 100644
--- a/ext/standard/tests/file/rmdir_variation3.phpt
+++ b/ext/standard/tests/file/rmdir_variation3.phpt
@@ -61,7 +61,6 @@ foreach($dirs as $dir) {
rmdir($workDir);
?>
-===DONE===
--EXPECTF--
*** Testing rmdir() : variation ***
-- removing rmdirVar3.tmp/aSubDir --
@@ -93,4 +92,3 @@ Directory removed
Directory removed
-- removing %s//rmdirVar3.tmp//aSubDir --
Directory removed
-===DONE===
diff --git a/ext/standard/tests/file/stat_error-win32.phpt b/ext/standard/tests/file/stat_error-win32.phpt
index 735a17cb26..3d4e367739 100644
--- a/ext/standard/tests/file/stat_error-win32.phpt
+++ b/ext/standard/tests/file/stat_error-win32.phpt
@@ -17,29 +17,16 @@ $file_path = __DIR__;
$arr = array(__FILE__);
echo "\n*** Testing stat() for error conditions ***\n";
-var_dump( stat() ); // args < expected
-var_dump( stat(__FILE__, 2) ); // file, args > expected
-var_dump( stat(__DIR__, 2) ); //dir, args > expected
var_dump( stat("$file_path/temp.tmp") ); // non existing file
var_dump( stat("$file_path/temp/") ); // non existing dir
var_dump( stat(22) ); // scalar argument
-var_dump( stat($arr) ); // array argument
echo "Done\n";
?>
--EXPECTF--
*** Testing stat() for error conditions ***
-Warning: stat() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: stat(): stat failed for %s in %s on line %d
bool(false)
@@ -48,7 +35,4 @@ bool(false)
Warning: stat(): stat failed for 22 in %s on line %d
bool(false)
-
-Warning: stat() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/file/stream_002.phpt b/ext/standard/tests/file/stream_002.phpt
index b18dd85b31..84f3b78f06 100644
--- a/ext/standard/tests/file/stream_002.phpt
+++ b/ext/standard/tests/file/stream_002.phpt
@@ -15,8 +15,6 @@ var_dump(stream_socket_client(".", $a, $b));
var_dump($a, $b);
var_dump(stream_socket_client(1, $a, $b));
var_dump($a, $b);
-var_dump(stream_socket_client(array(), $a, $b));
-var_dump($a, $b);
echo "Done\n";
?>
@@ -45,9 +43,4 @@ Warning: stream_socket_client(): unable to connect to 1 (Failed to parse address
bool(false)
int(0)
string(27) "Failed to parse address "1""
-
-Warning: stream_socket_client() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-int(0)
-string(27) "Failed to parse address "1""
Done
diff --git a/ext/standard/tests/file/stream_rfc2397_001.phpt b/ext/standard/tests/file/stream_rfc2397_001.phpt
index d88e778623..3036620eb5 100644
--- a/ext/standard/tests/file/stream_rfc2397_001.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_001.phpt
@@ -15,8 +15,6 @@ unset($data);
var_dump(stream_get_contents($file));
?>
-===DONE===
--EXPECT--
string(11) "hello world"
string(11) "hello world"
-===DONE===
diff --git a/ext/standard/tests/file/stream_rfc2397_002.phpt b/ext/standard/tests/file/stream_rfc2397_002.phpt
index 1dce5adf6c..9ec21fb90a 100644
--- a/ext/standard/tests/file/stream_rfc2397_002.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_002.phpt
@@ -24,14 +24,14 @@ $streams = array(
foreach($streams as $stream)
{
$stream = fopen($stream, 'r');
- $meta = @stream_get_meta_data($stream);
- var_dump($meta);
- var_dump(isset($meta['foo']) ? $meta['foo'] : null);
+ if ($stream) {
+ $meta = stream_get_meta_data($stream);
+ var_dump($meta);
+ var_dump(isset($meta['foo']) ? $meta['foo'] : null);
+ }
}
?>
-===DONE===
-<?php exit(0); ?>
--EXPECTF--
array(7) {
["base64"]=>
@@ -52,8 +52,6 @@ array(7) {
NULL
Warning: fopen(data://): failed to open stream: rfc2397: no comma in URL in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
array(7) {
["base64"]=>
bool(true)
@@ -73,16 +71,10 @@ array(7) {
NULL
Warning: fopen(data://;base64): failed to open stream: rfc2397: no comma in URL in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
Warning: fopen(data://foo,): failed to open stream: rfc2397: illegal media type in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
Warning: fopen(data://foo=bar,): failed to open stream: rfc2397: illegal media type in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
array(8) {
["mediatype"]=>
string(10) "text/plain"
@@ -104,8 +96,6 @@ array(8) {
NULL
Warning: fopen(data://text/plain;foo,): failed to open stream: rfc2397: illegal parameter in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
array(9) {
["mediatype"]=>
string(10) "text/plain"
@@ -129,8 +119,6 @@ array(9) {
string(3) "bar"
Warning: fopen(data://text/plain;foo=bar;bla,): failed to open stream: rfc2397: illegal parameter in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
array(9) {
["mediatype"]=>
string(10) "text/plain"
@@ -154,8 +142,6 @@ array(9) {
string(3) "bar"
Warning: fopen(data://text/plain;foo=bar;bar=baz): failed to open stream: rfc2397: no comma in URL in %sstream_rfc2397_002.php on line %d
-NULL
-NULL
array(10) {
["mediatype"]=>
string(10) "text/plain"
@@ -179,4 +165,3 @@ array(10) {
string(34) "data://text/plain;foo=bar;bar=baz,"
}
string(3) "bar"
-===DONE===
diff --git a/ext/standard/tests/file/stream_rfc2397_003.phpt b/ext/standard/tests/file/stream_rfc2397_003.phpt
index 291b1301c5..1797d02ab5 100644
--- a/ext/standard/tests/file/stream_rfc2397_003.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_003.phpt
@@ -28,11 +28,8 @@ foreach($streams as $original => $stream)
}
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
string(12) "A brief note"
string(40) "select_vcount,fcol_from_fieldtable/local"
string(13) "foobar foobar"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/stream_rfc2397_004.phpt b/ext/standard/tests/file/stream_rfc2397_004.phpt
index 4c13a5f9cd..239a12e3bf 100644
--- a/ext/standard/tests/file/stream_rfc2397_004.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_004.phpt
@@ -20,8 +20,6 @@ foreach($streams as $stream)
}
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
string(5) ";test"
string(4) "test"
@@ -29,4 +27,3 @@ string(4) "test"
bool(false)
string(5) "Hello"
string(3) "a,b"
-===DONE===
diff --git a/ext/standard/tests/file/stream_rfc2397_005.phpt b/ext/standard/tests/file/stream_rfc2397_005.phpt
index ab03f399f3..fb1cb85a07 100644
--- a/ext/standard/tests/file/stream_rfc2397_005.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_005.phpt
@@ -23,8 +23,6 @@ foreach($streams as $stream)
}
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
string(12) "A brief note"
string(40) "select_vcount,fcol_from_fieldtable/local"
@@ -35,4 +33,3 @@ string(4) "test"
bool(false)
string(5) "Hello"
string(3) "a,b"
-===DONE===
diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt
index f6616a0c88..bc959bb3a9 100644
--- a/ext/standard/tests/file/stream_rfc2397_006.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_006.phpt
@@ -14,22 +14,20 @@ $streams = array(
foreach($streams as $stream)
{
- var_dump(file_get_contents($stream));
+ try {
+ var_dump(file_get_contents($stream));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
?>
-===DONE===
-<?php exit(0); ?>
--EXPECTF--
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d
-NULL
-
-Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d
-NULL
+file_get_contents() expects parameter 1 to be a valid path, string given
+file_get_contents() expects parameter 1 to be a valid path, string given
Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhcg==): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d
bool(false)
Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/stream_rfc2397_007.phpt b/ext/standard/tests/file/stream_rfc2397_007.phpt
index 447b0246ae..a1558980c9 100644
--- a/ext/standard/tests/file/stream_rfc2397_007.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_007.phpt
@@ -79,8 +79,6 @@ foreach($streams as $stream)
}
?>
-===DONE===
-<?php exit(0); ?>
--EXPECT--
===data:,012345===
int(0)
@@ -142,4 +140,3 @@ bool(false)
int(-1)
bool(false)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/stream_supports_lock.phpt b/ext/standard/tests/file/stream_supports_lock.phpt
index 38a84dd7c2..0d2f04b72d 100644
--- a/ext/standard/tests/file/stream_supports_lock.phpt
+++ b/ext/standard/tests/file/stream_supports_lock.phpt
@@ -26,7 +26,11 @@ fclose($fp);
$sock = stream_context_create();
var_dump($sock);
-var_dump(stream_supports_lock($sock));
+try {
+ var_dump(stream_supports_lock($sock));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
@@ -40,7 +44,5 @@ bool(false)
resource(%d) of type (stream)
bool(false)
resource(%d) of type (stream-context)
-
-Warning: stream_supports_lock(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+stream_supports_lock(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
index ddee40ecdd..6ee0f8aca7 100644
--- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
+++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
@@ -33,11 +33,6 @@ fclose($fp);
$linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp";
echo "*** Testing symlink() for error conditions ***\n";
-//zero arguments
-var_dump( symlink() );
-
-//more than expected
-var_dump( symlink($filename, $linkname, true) );
//invalid arguments
var_dump( symlink(NULL, $linkname) ); // NULL as filename
@@ -48,11 +43,6 @@ var_dump( symlink($filename, '') ); // '' as linkname
var_dump( symlink($filename, false) ); // false as linkname
echo "\n*** Testing linkinfo() for error conditions ***\n";
-//zero arguments
-var_dump( linkinfo() );
-
-//more than expected
-var_dump( linkinfo($linkname, true) );
//invalid arguments
var_dump( linkinfo(NULL) ); // NULL as linkname
@@ -69,12 +59,6 @@ unlink(__DIR__."/symlink_link_linkinfo_is_link_error1.tmp");
--EXPECTF--
*** Testing symlink() for error conditions ***
-Warning: symlink() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: symlink() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
Warning: symlink(): %s in %s on line %d
bool(false)
@@ -95,12 +79,6 @@ bool(false)
*** Testing linkinfo() for error conditions ***
-Warning: linkinfo() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: linkinfo() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Warning: linkinfo(): %s in %s on line %d
int(-1)
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
index 7e22741aa8..287ac4eb5f 100644
--- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
+++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
@@ -30,11 +30,6 @@ fclose($fp);
$linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error2.tmp";
echo "*** Testing link() for error conditions ***\n";
-//zero arguments
-var_dump( link() );
-
-//more than expected
-var_dump( link($filename, $linkname, false) );
//invalid arguments
var_dump( link(NULL, $linkname) ); // NULL as filename
@@ -46,11 +41,6 @@ var_dump( link($filename, '') ); // '' as linkname
var_dump( link($filename, false) ); // false as linkname
echo "\n*** Testing is_link() for error conditions ***\n";
-//zero arguments
-var_dump( is_link() );
-
-//more than expected
-var_dump( is_link($linkname, "/") );
//invalid arguments
var_dump( is_link(NULL) ); // NULL as linkname
@@ -68,12 +58,6 @@ unlink(__DIR__."/symlink_link_linkinfo_is_link_error2.tmp");
--EXPECTF--
*** Testing link() for error conditions ***
-Warning: link() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: link() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
Warning: link(): No such file or directory in %s on line %d
bool(false)
@@ -96,12 +80,6 @@ Warning: link(): No such file or directory in %s on line %d
bool(false)
*** Testing is_link() for error conditions ***
-
-Warning: is_link() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_link() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
bool(false)
bool(false)
bool(false)
diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt
index bade05ac87..33965b4f26 100644
--- a/ext/standard/tests/file/tempnam_variation3-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt
@@ -61,7 +61,12 @@ $res_arr = array(
for( $i=0; $i<count($names_arr); $i++ ) {
echo "-- Iteration $i --\n";
- $file_name = tempnam($file_path, $names_arr[$i]);
+ try {
+ $file_name = tempnam($file_path, $names_arr[$i]);
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ continue;
+ }
/* creating the files in existing dir */
if (file_exists($file_name) && !$res_arr[$i]) {
@@ -105,14 +110,9 @@ Notice: tempnam(): file created in the system's temporary directory in %stempnam
Failed, not created in the correct directory %s vs %s
0
-- Iteration 6 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, string given in %stempnam_variation3-win32.php on line 54
-Failed, not created in the correct directory %s vs %sext\standard\tests\file\tempnamVar3
-0
+tempnam() expects parameter 2 to be a valid path, string given
-- Iteration 7 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
-OK
+tempnam() expects parameter 2 to be a valid path, array given
-- Iteration 8 --
OK
-- Iteration 9 --
diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt
index 55db89cc72..78ef3bbaca 100644
--- a/ext/standard/tests/file/tempnam_variation3.phpt
+++ b/ext/standard/tests/file/tempnam_variation3.phpt
@@ -39,7 +39,12 @@ $names_arr = array(
for( $i=0; $i<count($names_arr); $i++ ) {
echo "-- Iteration $i --\n";
- $file_name = tempnam("$file_path", $names_arr[$i]);
+ try {
+ $file_name = tempnam("$file_path", $names_arr[$i]);
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ continue;
+ }
/* creating the files in existing dir */
if( file_exists($file_name) ) {
@@ -101,17 +106,9 @@ File name is => %s/%s
File permissions are => 100600
File created in => directory specified
-- Iteration 6 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, string given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 2 to be a valid path, string given
-- Iteration 7 --
-
-Warning: tempnam() expects parameter 2 to be a valid path, array given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 2 to be a valid path, array given
-- Iteration 8 --
File name is => %s/dir%s
File permissions are => 100600
diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt
index 9ad75f8ed5..bfc23a9541 100644
--- a/ext/standard/tests/file/tempnam_variation7-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt
@@ -36,7 +36,12 @@ $names_arr = array(
for( $i=0; $i<count($names_arr); $i++ ) {
echo "-- Iteration $i --\n";
- $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+ try {
+ $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ continue;
+ }
if( file_exists($file_name) ){
@@ -95,17 +100,9 @@ File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- Iteration 6 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, string given in %stempnam_variation7-win32.php on line %d
--- File is not created --
-
-Warning: unlink(): %r(Invalid argument|No such file or directory)%r in %s on line %d
+tempnam() expects parameter 1 to be a valid path, string given
-- Iteration 7 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %r(Invalid argument|No such file or directory)%r in %s on line %d
+tempnam() expects parameter 1 to be a valid path, array given
-- Iteration 8 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt
index 289fe82375..a385fe43b6 100644
--- a/ext/standard/tests/file/tempnam_variation7.phpt
+++ b/ext/standard/tests/file/tempnam_variation7.phpt
@@ -37,7 +37,12 @@ $names_arr = array(
for( $i=0; $i<count($names_arr); $i++ ) {
echo "-- Iteration $i --\n";
- $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+ try {
+ $file_name = tempnam($names_arr[$i], "tempnam_variation3.tmp");
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ continue;
+ }
if( file_exists($file_name) ){
@@ -100,17 +105,9 @@ File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 6 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, string given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 1 to be a valid path, string given
-- Iteration 7 --
-
-Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d
--- File is not created --
-
-Warning: unlink(): %s in %s on line %d
+tempnam() expects parameter 1 to be a valid path, array given
-- Iteration 8 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt
index e0b06d3960..0474b34af2 100644
--- a/ext/standard/tests/file/touch.phpt
+++ b/ext/standard/tests/file/touch.phpt
@@ -13,7 +13,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
// output to linux. This could be a php.net bug on windows or a windows querk.
$filename = __DIR__."/touch.dat";
-var_dump(touch());
var_dump(touch($filename));
var_dump(filemtime($filename));
@unlink($filename);
@@ -39,8 +38,6 @@ var_dump(touch("/no/such/file/or/directory"));
echo "Done\n";
?>
--EXPECTF--
-Warning: touch() expects at least 1 parameter, 0 given in %s on line %d
-NULL
bool(true)
int(%d)
bool(true)
diff --git a/ext/standard/tests/file/touch_error.phpt b/ext/standard/tests/file/touch_error.phpt
index 0520055a90..9a4bd01e13 100644
--- a/ext/standard/tests/file/touch_error.phpt
+++ b/ext/standard/tests/file/touch_error.phpt
@@ -5,17 +5,9 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
--FILE--
<?php
-var_dump(touch());
-var_dump(touch(1, 2, 3, 4));
var_dump(touch("/no/such/file/or/directory"));
?>
--EXPECTF--
-Warning: touch() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: touch() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
Warning: touch(): Unable to create file /no/such/file/or/directory because No such file or directory in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/touch_variation5-win32.phpt b/ext/standard/tests/file/touch_variation5-win32.phpt
index 5761824ef3..02cc4cfb4e 100644
--- a/ext/standard/tests/file/touch_variation5-win32.phpt
+++ b/ext/standard/tests/file/touch_variation5-win32.phpt
@@ -150,7 +150,6 @@ function get_atime($path) {
?>
-===DONE===
--EXPECTF--
*** Testing touch() : variation ***
@@ -226,4 +225,3 @@ PASSED: %s/touchVar5.tmp/aSubDirOrFile/ - touched
PASSED: touchVar5.tmp//aSubDirOrFile - touched
--- testing %s//touchVar5.tmp//aSubDirOrFile ---
PASSED: %s//touchVar5.tmp//aSubDirOrFile - touched
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation5.phpt b/ext/standard/tests/file/touch_variation5.phpt
index 7eb4aaa7e0..a42e509809 100644
--- a/ext/standard/tests/file/touch_variation5.phpt
+++ b/ext/standard/tests/file/touch_variation5.phpt
@@ -150,7 +150,6 @@ function get_atime($path) {
?>
-===DONE===
--EXPECTF--
*** Testing touch() : variation ***
@@ -226,4 +225,3 @@ PASSED: /%s/touchVar5.tmp/aSubDirOrFile/ - touched
PASSED: touchVar5.tmp//aSubDirOrFile - touched
--- testing /%s//touchVar5.tmp//aSubDirOrFile ---
PASSED: /%s//touchVar5.tmp//aSubDirOrFile - touched
-===DONE===
diff --git a/ext/standard/tests/file/touch_variation6-win32.phpt b/ext/standard/tests/file/touch_variation6-win32.phpt
index 197078db3b..d03671fff8 100644
--- a/ext/standard/tests/file/touch_variation6-win32.phpt
+++ b/ext/standard/tests/file/touch_variation6-win32.phpt
@@ -156,7 +156,6 @@ function get_atime($path) {
?>
-===DONE===
--EXPECTF--
*** Testing touch() : variation ***
@@ -238,4 +237,3 @@ PASSED: touchVar5.tmp\\aSubDirOrFile - touched
PASSED: %s\\touchVar5.tmp\\aSubDirOrFile - touched
--- testing /%s/touchVar5.tmp/aSubDirOrFile ---
PASSED: /%s/touchVar5.tmp/aSubDirOrFile - touched
-===DONE===
diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt
index a208e5675b..833c083b19 100644
--- a/ext/standard/tests/file/unlink_error-win32-mb.phpt
+++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt
@@ -25,13 +25,6 @@ $context = stream_context_create();
echo "*** Testing unlink() : error conditions ***\n";
-echo "-- Testing unlink() on unexpected no. of arguments --\n";
-// arg < expected
-var_dump( unlink() );
-// args > expected
-var_dump( unlink($filename, $context, true) );
-var_dump( file_exists($filename) ); // expected: true
-
echo "\n-- Testing unlink() on invalid arguments --\n";
// invalid arguments
var_dump( unlink('') ); // $filename as empty string
@@ -43,9 +36,6 @@ var_dump( file_exists(NULL) ); // confirm file doesnt exist
var_dump( unlink(false) ); // $filename as boolean false
var_dump( file_exists(false) ); // confirm file doesnt exist
-var_dump( unlink($filename, '') ); // $context as empty string
-var_dump( unlink($filename, false) ); // $context as boolean false
-
echo "\n-- Testing unlink() on non-existent file --\n";
var_dump( unlink(__DIR__."/non_existent_file.tmp") );
@@ -68,14 +58,6 @@ rmdir(__DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™");
?>
--EXPECTF--
*** Testing unlink() : error conditions ***
--- Testing unlink() on unexpected no. of arguments --
-
-Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-bool(true)
-- Testing unlink() on invalid arguments --
@@ -91,12 +73,6 @@ Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
-Warning: unlink() expects parameter 2 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: unlink() expects parameter 2 to be resource, bool given in %s on line %d
-bool(false)
-
-- Testing unlink() on non-existent file --
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt
index d62c715a94..535b3d0adf 100644
--- a/ext/standard/tests/file/unlink_error-win32.phpt
+++ b/ext/standard/tests/file/unlink_error-win32.phpt
@@ -23,13 +23,6 @@ $context = stream_context_create();
echo "*** Testing unlink() : error conditions ***\n";
-echo "-- Testing unlink() on unexpected no. of arguments --\n";
-// arg < expected
-var_dump( unlink() );
-// args > expected
-var_dump( unlink($filename, $context, true) );
-var_dump( file_exists($filename) ); // expected: true
-
echo "\n-- Testing unlink() on invalid arguments --\n";
// invalid arguments
var_dump( unlink('') ); // $filename as empty string
@@ -41,9 +34,6 @@ var_dump( file_exists(NULL) ); // confirm file doesnt exist
var_dump( unlink(false) ); // $filename as boolean false
var_dump( file_exists(false) ); // confirm file doesnt exist
-var_dump( unlink($filename, '') ); // $context as empty string
-var_dump( unlink($filename, false) ); // $context as boolean false
-
echo "\n-- Testing unlink() on non-existent file --\n";
var_dump( unlink(__DIR__."/non_existent_file.tmp") );
@@ -65,14 +55,6 @@ rmdir(__DIR__."/unlink_error");
?>
--EXPECTF--
*** Testing unlink() : error conditions ***
--- Testing unlink() on unexpected no. of arguments --
-
-Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-bool(true)
-- Testing unlink() on invalid arguments --
@@ -88,12 +70,6 @@ Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
-Warning: unlink() expects parameter 2 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: unlink() expects parameter 2 to be resource, bool given in %s on line %d
-bool(false)
-
-- Testing unlink() on non-existent file --
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt
index 61aac03dd3..df5b5b9755 100644
--- a/ext/standard/tests/file/unlink_error.phpt
+++ b/ext/standard/tests/file/unlink_error.phpt
@@ -23,13 +23,6 @@ $context = stream_context_create();
echo "*** Testing unlink() : error conditions ***\n";
-echo "-- Testing unlink() on unexpected no. of arguments --\n";
-// arg < expected
-var_dump( unlink() );
-// args > expected
-var_dump( unlink($filename, $context, true) );
-var_dump( file_exists($filename) ); // expected true
-
echo "\n-- Testing unlink() on invalid arguments --\n";
// invalid arguments
var_dump( unlink('') ); // $filename as empty string
@@ -41,10 +34,6 @@ var_dump( file_exists(NULL) ); // confirm file doesnt exist
var_dump( unlink(false) ); // $filename as boolean false
var_dump( file_exists(false) ); // confirm file doesnt exist
-var_dump( unlink($filename, '') ); // $context as empty string
-var_dump( unlink($filename, false) ); // $context as boolean false
-
-
echo "\n-- Testing unlink() on non-existent file --\n";
var_dump( unlink(__DIR__."/non_existent_file.tmp") );
@@ -65,14 +54,6 @@ rmdir(__DIR__."/unlink_error");
?>
--EXPECTF--
*** Testing unlink() : error conditions ***
--- Testing unlink() on unexpected no. of arguments --
-
-Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-bool(true)
-- Testing unlink() on invalid arguments --
@@ -88,12 +69,6 @@ Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
-Warning: unlink() expects parameter 2 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: unlink() expects parameter 2 to be resource, bool given in %s on line %d
-bool(false)
-
-- Testing unlink() on non-existent file --
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/unlink_variation10.phpt b/ext/standard/tests/file/unlink_variation10.phpt
index 585b8f87fb..3a56a73a5a 100644
--- a/ext/standard/tests/file/unlink_variation10.phpt
+++ b/ext/standard/tests/file/unlink_variation10.phpt
@@ -80,7 +80,6 @@ function test_link($linkedDir, $toLinkTo, $tounlink, $softlink) {
?>
-===DONE===
--EXPECTF--
*** Testing unlink() : variation ***
-- unlinking soft link unlinkVar10.tmp/subDir.tmp --
@@ -103,4 +102,3 @@ directory unlinked
--- try to unlink a directory ---
Warning: unlink(unlinkVar10.tmp/linkme.tmp): %s in %s on line %d
-===DONE===
diff --git a/ext/standard/tests/file/unlink_variation6.phpt b/ext/standard/tests/file/unlink_variation6.phpt
index 64c009bf91..ff66cd2195 100644
--- a/ext/standard/tests/file/unlink_variation6.phpt
+++ b/ext/standard/tests/file/unlink_variation6.phpt
@@ -32,10 +32,8 @@ function f_exists($file) {
}
}
?>
-===DONE===
--EXPECT--
*** Testing unlink() : variation: contexts and relative files ***
subdir/testfile.txt exists
bool(true)
subdir/testfile.txt doesn't exist
-===DONE===
diff --git a/ext/standard/tests/file/unlink_variation8-win32.phpt b/ext/standard/tests/file/unlink_variation8-win32.phpt
index 9ee6b49d2a..efd24a22cb 100644
--- a/ext/standard/tests/file/unlink_variation8-win32.phpt
+++ b/ext/standard/tests/file/unlink_variation8-win32.phpt
@@ -76,7 +76,6 @@ function test_realfile($file, $tounlink) {
}
}
?>
-===DONE===
--EXPECTF--
*** Testing unlink() : variation ***
-- removing unlinkVar8.tmp/file.tmp --
@@ -110,4 +109,3 @@ Warning: unlink(%s/unlinkVar8.tmp/file.tmp/): No such file or directory in %s on
file removed
-- removing %s//unlinkVar8.tmp//file.tmp --
file removed
-===DONE===
diff --git a/ext/standard/tests/file/unlink_variation8.phpt b/ext/standard/tests/file/unlink_variation8.phpt
index ab074c7849..ee2540dd69 100644
--- a/ext/standard/tests/file/unlink_variation8.phpt
+++ b/ext/standard/tests/file/unlink_variation8.phpt
@@ -107,7 +107,6 @@ function test_link($linkedfile, $toLinkTo, $tounlink, $softlink) {
?>
-===DONE===
--EXPECTF--
*** Testing unlink() : variation ***
-- removing unlinkVar8.tmp/file.tmp --
@@ -203,4 +202,3 @@ file removed
file unlinked
-- unlinking hard link /%s//unlinkVar8.tmp//file.tmp --
file unlinked
-===DONE===
diff --git a/ext/standard/tests/file/unlink_variation9-win32.phpt b/ext/standard/tests/file/unlink_variation9-win32.phpt
index 2331c9edc8..3c9d5e4a14 100644
--- a/ext/standard/tests/file/unlink_variation9-win32.phpt
+++ b/ext/standard/tests/file/unlink_variation9-win32.phpt
@@ -78,7 +78,6 @@ foreach($files as $fileToUnlink) {
rmdir($workDir);
?>
-===DONE===
--EXPECTF--
*** Testing unlink() : variation ***
-- removing unlinkVar9.tmp\file.tmp --
@@ -114,4 +113,3 @@ file removed
file removed
-- removing /%s/unlinkVar9.tmp/file.tmp --
file removed
-===DONE===
diff --git a/ext/standard/tests/file/userstreams_002.phpt b/ext/standard/tests/file/userstreams_002.phpt
index 81f463ddd2..3068c93b46 100644
--- a/ext/standard/tests/file/userstreams_002.phpt
+++ b/ext/standard/tests/file/userstreams_002.phpt
@@ -22,7 +22,11 @@ function test($name, $fd, $return_value) {
$data['wrapper_data']->return_value = $return_value;
$r = array($fd);
$w = $e = null;
- var_dump(stream_select($r, $w, $e, 0) !== false);
+ try {
+ var_dump(stream_select($r, $w, $e, 0) !== false);
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
var_dump(stream_wrapper_register('test', 'test_wrapper'));
@@ -64,14 +68,12 @@ bool(false)
------ return value not a stream resource: -------
-Warning: stream_select(): supplied argument is not a valid stream resource in %s
-
Warning: stream_select(): test_wrapper::stream_cast must return a stream resource in %s
Warning: stream_select(): cannot represent a stream of type user-space as a select()able descriptor in %s
Warning: stream_select(): No stream arrays were passed in %s
-bool(false)
+stream_select(): supplied argument is not a valid stream resource
------ return value is stream itself: -------
diff --git a/ext/standard/tests/file/userstreams_006.phpt b/ext/standard/tests/file/userstreams_006.phpt
index c434f4cc62..3269ccce3e 100644
--- a/ext/standard/tests/file/userstreams_006.phpt
+++ b/ext/standard/tests/file/userstreams_006.phpt
@@ -32,6 +32,5 @@ bool(true)
option: 3, 2, 50
int(-1)
int(8192)
-size: 42
-size: 28
+size: 70
int(70)
diff --git a/ext/standard/tests/file/windows_mb_path/bug54028.phpt b/ext/standard/tests/file/windows_mb_path/bug54028.phpt
index 7b304c70f4..9c11be61f4 100644
--- a/ext/standard/tests/file/windows_mb_path/bug54028.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug54028.phpt
@@ -43,7 +43,6 @@ foreach ($dirs as $d) {
rmdir($prefix);
?>
-===DONE===
--EXPECT--
Returned (a)
Encoding: ASCII
@@ -66,4 +65,3 @@ Encoding: UTF-8
Returned (王)
Encoding: UTF-8
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt b/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt
index 81be60e640..87e7c162b0 100644
--- a/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt
@@ -40,7 +40,6 @@ foreach ($dirs as $d) {
rmdir($prefix);
?>
-===DONE===
--EXPECTF--
bool(true)
string(%d) "%sa"
@@ -63,4 +62,3 @@ bool(true)
bool(true)
string(%d) "%s汚れã¦æŽ˜ã‚‹"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug54977.phpt b/ext/standard/tests/file/windows_mb_path/bug54977.phpt
index 173aed480f..b8749576ae 100644
--- a/ext/standard/tests/file/windows_mb_path/bug54977.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug54977.phpt
@@ -39,7 +39,6 @@ foreach ($paths as $d) {
rmdir($prefix);
?>
-===DONE===
--EXPECT--
testBug54977
windows_mb_path
@@ -49,4 +48,3 @@ windows_mb_path
汚れã¦æŽ˜ã‚‹.test
王
王.test
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug61315.phpt b/ext/standard/tests/file/windows_mb_path/bug61315.phpt
index 1e97636175..8729aafe09 100644
--- a/ext/standard/tests/file/windows_mb_path/bug61315.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug61315.phpt
@@ -44,7 +44,6 @@ rmdir($d1);
rmdir($prefix);
?>
-===DONE===
--EXPECTF--
Active code page: 65001
getting basename of %s\ソフト
@@ -60,4 +59,3 @@ string(%d) "%s\フォルダ"
Active code page: %d
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug64506.phpt b/ext/standard/tests/file/windows_mb_path/bug64506.phpt
index 44d5c6f5f7..fa9653fbd2 100644
--- a/ext/standard/tests/file/windows_mb_path/bug64506.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug64506.phpt
@@ -35,7 +35,6 @@ get_basename_with_cp($fnw, 65001);
var_dump(unlink($fnw));
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\Å¡.txt"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug64699.phpt b/ext/standard/tests/file/windows_mb_path/bug64699.phpt
index db488c15ed..8b6859176f 100644
--- a/ext/standard/tests/file/windows_mb_path/bug64699.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug64699.phpt
@@ -48,7 +48,6 @@ rmdir($prefix);
set_active_cp($old_cp);
?>
-===DONE===
--EXPECTF--
Active code page: 65001
filetype()[dir ] == is_dir()[dir ] -> OK: .
@@ -60,4 +59,3 @@ filetype()[dir ] == is_dir()[dir ] -> OK: ゾ
filetype()[dir ] == is_dir()[dir ] -> OK: 多国語
filetype()[dir ] == is_dir()[dir ] -> OK: 表
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug70903.phpt b/ext/standard/tests/file/windows_mb_path/bug70903.phpt
index 8d529484be..48cbf524c9 100644
--- a/ext/standard/tests/file/windows_mb_path/bug70903.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug70903.phpt
@@ -37,7 +37,6 @@ rmdir($d0);
rmdir($prefix);
?>
-===DONE===
--EXPECTF--
Active code page: 65001
getting basename of %s\ı
@@ -46,4 +45,3 @@ bool(true)
string(%d) "%s\ı"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug71509.phpt b/ext/standard/tests/file/windows_mb_path/bug71509.phpt
index ed094c6b7a..377b5d7e2a 100644
--- a/ext/standard/tests/file/windows_mb_path/bug71509.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug71509.phpt
@@ -37,8 +37,6 @@ var_dump(file_exists($outputfile_zip));
remove_data("bug71509");
?>
-===DONE===
--EXPECT--
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug74923.phpt b/ext/standard/tests/file/windows_mb_path/bug74923.phpt
index 210a49732f..544a7110ee 100644
--- a/ext/standard/tests/file/windows_mb_path/bug74923.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug74923.phpt
@@ -19,8 +19,6 @@ $s = '\\\\hello.com' . str_repeat('\\', 260);
var_dump($s, @stat($s));
?>
-===DONE===
--EXPECTF--
string(271) "%s"
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt
index a56fecbbe3..c841aff194 100644
--- a/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt
@@ -67,7 +67,6 @@ foreach ($obj as $file) {
rmdir($d0);
rmdir($prefix);
?>
-===DONE===
--EXPECTF--
string(4) "òåñò"
bool(true)
@@ -75,4 +74,3 @@ string(%d) "%sbug75063-cp1251%eòåñò"
string(8) "code.php"
string(8) "test.txt"
string(8) "òàñò.txt"
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt
index beaf690dea..49a5229cf6 100644
--- a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt
+++ b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt
@@ -52,7 +52,6 @@ print(shell_exec(getenv('TEST_PHP_EXECUTABLE') . " -nf code.php"));
chdir($old_cwd);
?>
-===DONE===
--CLEAN--
<?php
$dir_basename = "теÑÑ‚";
@@ -76,4 +75,3 @@ string(%d) "%sbug75063-utf8%eтеÑÑ‚"
string(8) "code.php"
string(8) "test.txt"
string(12) "таÑÑ‚.txt"
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/recursive_it.phpt b/ext/standard/tests/file/windows_mb_path/recursive_it.phpt
index b42f796ee3..538aa0ad21 100644
--- a/ext/standard/tests/file/windows_mb_path/recursive_it.phpt
+++ b/ext/standard/tests/file/windows_mb_path/recursive_it.phpt
@@ -57,8 +57,6 @@ do {
} while (__DIR__ != $dir);*/
?>
-==DONE==
--EXPECTF--
string(%d) "%shello.txt"
bool(false)
-==DONE==
diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt
index 9390b3755f..39a6d30c77 100644
--- a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_big5");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(%d) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt
index ad16770381..b0caf3b73f 100644
--- a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_big5");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s´ú¸Õ¦h¦r¸`¸ô®|5\´ú¸Õ¦h¦r¸`¸ô®|4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt
index 088c46d7b6..5cc2c736ec 100644
--- a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt
@@ -42,7 +42,6 @@ var_dump(unlink($fn));
remove_data("file_big5");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -55,4 +54,3 @@ bool(true)
string(%d) "%s測試多字節路徑25"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt
index f738b9f5be..4a6dd19864 100644
--- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_big5");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(%d) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt
index 45d87d1cbe..418e33f927 100644
--- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_big5");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\測試多字節路徑5\測試多字節路徑4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt
index 07f48eb218..e9294ababd 100644
--- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt
@@ -39,7 +39,6 @@ var_dump(unlink($fn));
remove_data("file_big5");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ bool(true)
string(%d) "%s\測試多字節路徑25"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt
index d7b093281e..6de73c02a8 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1250");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt
index 2c629e18ac..9276dcfc2d 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1250");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\Å¡Ä‘Äćž_Å ÄČĆŽ42\Å¡Ä‘Äćž_Å ÄČĆŽ4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt
index 77a5bf6a08..82255919ab 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp1250");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(23) "Å¡Ä‘Äćž_Å ÄČĆŽ33"
bool(true)
string(%d) "%s\Å¡Ä‘Äćž_Å ÄČĆŽ33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt
index f88cb70ac6..d359158564 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1250");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt
index eca9479978..1d29fe7f98 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1250");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\ÃrvíztűrÅ‘ tükörfúrógép42\ÃrvíztűrÅ‘ tükörfúrógép4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt
index 910db7b04c..d5230c3782 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp1250");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(33) "ÃrvíztűrÅ‘ tükörfúrógép33"
bool(true)
string(%d) "%s\ÃrvíztűrÅ‘ tükörfúrógép33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt
index 1688d75a02..aeedc2c875 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt
@@ -36,9 +36,7 @@ if ($f) {
remove_data("file_cp1251");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(35) "opened an utf8 filename for reading"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt
index 049800a0aa..05eb269daa 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1251");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\ïðèâåò3\ïðèâåò4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt
index 7d3290d99e..06bc8d2d87 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt
@@ -41,7 +41,6 @@ var_dump(unlink($fn));
remove_data("file_cp1251");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -54,4 +53,3 @@ bool(true)
string(%d) "%s\ïðèâåò7"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt
index 27ba191d0d..dc870e829d 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt
@@ -33,9 +33,7 @@ if ($f) {
remove_data("file_cp1251");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(35) "opened an utf8 filename for reading"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt
index a6baa4b9c1..5cabf45641 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1251");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\привет3\привет4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt
index c46bc48645..b5192dcf84 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt
@@ -38,7 +38,6 @@ var_dump(unlink($fn));
remove_data("file_cp1251");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\привет7"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt
index c4aa6f831c..9694e54ffd 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt
@@ -36,9 +36,7 @@ if ($f) {
remove_data("file_cp1251");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(35) "opened an utf8 filename for reading"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt
index 9265f8ec0b..7416b0752d 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1251");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\привет3\привет4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt
index 71ecc73bc9..3788ef2411 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt
@@ -41,7 +41,6 @@ var_dump(unlink($fn));
remove_data("file_cp1251");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -54,4 +53,3 @@ bool(true)
string(%d) "%s\привет7"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt
index 2ebb63a688..402102e7ee 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt
@@ -33,10 +33,8 @@ system("dir /b " . $fn);
remove_data("file");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\gefäß"
bool(true)
bool(true)
gefäß
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt
index dc673c260b..8a601bf666 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1252");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(%d) "hallo
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt
index eff0c923e8..e328576394 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1252");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\tschüß3\tschüß4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt
index d0e39c0513..dc042a0475 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt
@@ -38,7 +38,6 @@ var_dump(unlink($fn));
remove_data("dir_cp1252");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\tschüß7"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt
index c3b3edb7ee..264558a657 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt
@@ -33,9 +33,7 @@ if ($f) {
remove_data("file2_cp1252");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(4) "hola"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt
index 2e97e78460..e35b2c5508 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir2_cp1252");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\Voláçao3\Voláçao4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt
index c6a135f567..1945fc54be 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt
@@ -38,7 +38,6 @@ var_dump(unlink($fn));
remove_data("dir2_cp1252");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\Voláçao7"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt
index 07cf3c8e6c..08ab2aa7bb 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_cp1253");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt
index 9f03a9115c..b799fec4db 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1253");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\äéáäñïìÞ äïêéìÞò42\äéáäñïìÞ äïêéìÞò4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt
index 1ab6f658c0..c1ea99e32b 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt
@@ -40,7 +40,6 @@ get_basename_with_cp($fn, 1253);
remove_data("dir_cp1253");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ string(%d) "äéáäñïìÞ äïêéìÞò33"
bool(true)
string(%d) "%s\äéáäñïìÞ äïêéìÞò33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt
index 64ad358b5c..675bdd12c4 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1253");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt
index a178ea574a..01b489af9c 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1253");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\διαδÏομή δοκιμής42\διαδÏομή δοκιμής4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt
index a46a8854ce..8210704b3f 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp1253");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(33) "διαδÏομή δοκιμής33"
bool(true)
string(%d) "%s\διαδÏομή δοκιμής33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt
index 9d92267b01..1ceefc759e 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_cp1254");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt
index 8f79a2982b..9bb34e5316 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1254");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\çokbaytlý iþleri42\çokbaytlý iþleri4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt
index d924f87edd..4de9478b32 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt
@@ -40,7 +40,6 @@ get_basename_with_cp($fn, 1254);
remove_data("dir_cp1254");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ string(%d) "çokbaytlý iþleri33"
bool(true)
string(%d) "%s\çokbaytlý iþleri33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt
index da264f9e3e..531aab848a 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt
@@ -34,10 +34,8 @@ system("dir /b \"" . $fn . "\"");
remove_data("file_cp1254");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\çokbaytlý iþleri"
bool(true)
bool(true)
çokbaytlý iþleri
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt
index b79e0f466f..39308b3368 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1254");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt
index 2966eebab4..c905c99b35 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1254");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\çokbaytlı işleri42\çokbaytlı işleri4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt
index a8b1a9a67f..1f0c7816ec 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp1254");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(%d) "çokbaytlı işleri33"
bool(true)
string(%d) "%s\çokbaytlı işleri33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt
index a08dfc3e30..a1dcf7c90c 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt
@@ -31,10 +31,8 @@ system("dir /b \"" . $fn . "\"");
remove_data("file_cp1254");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\çokbaytlı işleri"
bool(true)
bool(true)
çokbaytlı işleri
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt
index db96aa08d6..26388620a1 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_cp1255");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt
index 4da386eaa4..f80047f07f 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1255");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\ëììéí îøåáéí42\ëììéí îøåáéí4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt
index e5b6f4cf77..4b7ac57968 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt
@@ -40,7 +40,6 @@ get_basename_with_cp($fn, 1255);
remove_data("dir_cp1255");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ string(%d) "ëììéí îøåáéí33"
bool(true)
string(%d) "%s\ëììéí îøåáéí33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt
index b8937a2f9e..c9517a18e3 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1255");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt
index dc47630450..cf5be0bc21 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1255");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%s) "%s\×›×œ×œ×™× ×ž×¨×•×‘×™×42\×›×œ×œ×™× ×ž×¨×•×‘×™×4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt
index 109d2dbd64..363d1b02b5 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp1255");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(%s) "×›×œ×œ×™× ×ž×¨×•×‘×™×33"
bool(true)
string(%d) "%s\×›×œ×œ×™× ×ž×¨×•×‘×™×33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt
index 5ac99b2fd3..35ad1def2e 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_cp1256");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt
index ec95e582d9..ec27dbdaaa 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1256");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ42\ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt
index fd7303f1e7..b277fc208b 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt
@@ -40,7 +40,6 @@ get_basename_with_cp($fn, 1256);
remove_data("dir_cp1256");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ string(%d) "ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ33"
bool(true)
string(%d) "%s\ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ33"
Active code page: %s
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt
index 25e1118fcb..306414e5ca 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp1256");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt
index f660c5e906..5d544a52d0 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp1256");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\مسار متعدد البايت اختبار42\مسار متعدد البايت اختبار4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt
index e8a14ca9a4..38ae6a4754 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp1256");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(47) "مسار متعدد البايت اختبار33"
bool(true)
string(%d) "%s\مسار متعدد البايت اختبار33"
Active code page: %s
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt
index 8a52ab0a1f..7beae3a6bb 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt
@@ -46,7 +46,6 @@ foreach ($names as $name) {
}
?>
-===DONE===
--EXPECTF--
Active code page: %d
getting basename of %sà»ç¹á¿éÁ·Õè·´Êͺ1.txt
@@ -111,4 +110,3 @@ bool(true)
string(%d) "%sà»ç¹á¿éÁ·Õè·´Êͺ8 10.txt"
Active code page: %d
string(6) "hello8"
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt
index 2e6df976a4..84c8c55983 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt
@@ -34,10 +34,8 @@ system("dir /b " . $fn);
remove_data("file_cp874");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\à»ç¹á¿éÁ·Õè·´Êͺ11"
bool(true)
bool(true)
à»ç¹á¿éÁ·Õè·´Êͺ11
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt
index 3ac3035b4c..009fcf16a5 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt
@@ -43,7 +43,6 @@ foreach ($names as $name) {
}
?>
-===DONE===
--EXPECTF--
Active code page: %d
getting basename of %sเป็นà¹à¸Ÿà¹‰à¸¡à¸—ี่ทดสอบ1.txt
@@ -108,4 +107,3 @@ bool(true)
string(%d) "%sเป็นà¹à¸Ÿà¹‰à¸¡à¸—ี่ทดสอบ8 10.txt"
Active code page: %d
string(6) "hello8"
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt
index 1bc8fca100..97d0b24192 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt
@@ -31,10 +31,8 @@ system("dir /b " . $fn);
remove_data("file_cp874");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\เป็นà¹à¸Ÿà¹‰à¸¡à¸—ี่ทดสอบ11"
bool(true)
bool(true)
เป็นà¹à¸Ÿà¹‰à¸¡à¸—ี่ทดสอบ11
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt
index 12c38eae69..f56aa7231e 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_cp932");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt
index 9163f87b33..086e24483d 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp932");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX42\ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt
index 149c0fe595..51420195e8 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt
@@ -40,7 +40,6 @@ get_basename_with_cp($fn, 932);
remove_data("dir_cp932");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ string(%d) "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX33"
bool(true)
string(%d) "%s\ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt
index a6fd814203..b2c1f6d408 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt
@@ -34,10 +34,8 @@ system("dir /b " . $fn);
remove_data("file_cp932");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX77"
bool(true)
bool(true)
ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX77
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt
index b845e313b3..40cef63621 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp932");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt
index 80a49dd28b..5c150a3318 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp932");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス42\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt
index 1d7764236a..2c1adc9e0a 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_cp932");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(38) "テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス33"
bool(true)
string(%d) "%s\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt
index b29631ad5c..9b65cd6905 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt
@@ -36,10 +36,8 @@ if ($f) {
remove_data("file_cp936");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(%d) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt
index d7ee04bf9e..74c9da9398 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt
@@ -39,7 +39,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp936");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -51,4 +50,3 @@ bool(true)
string(%d) "%s\œyÔ‡¶à×ֹ·½5\œyÔ‡¶à×ֹ·½4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt
index eef4e4915e..d079666467 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt
@@ -42,7 +42,6 @@ var_dump(unlink($fn));
remove_data("file_cp936");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -55,4 +54,3 @@ bool(true)
string(%d) "%s\œyÔ‡¶à×ֹ·½25"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt
index 52b164fdb2..1be1f57f5f 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_cp936");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(%d) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt
index 1a22b13ea6..a4c3588cc6 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_cp936");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\測試多字節路徑5\測試多字節路徑4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt
index b4fe8415c2..9d6ba06c21 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt
@@ -39,7 +39,6 @@ var_dump(unlink($fn));
remove_data("file_cp936");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -52,4 +51,3 @@ bool(true)
string(%d) "%s\測試多字節路徑25"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt
index 394ab17011..ced4230178 100644
--- a/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt
@@ -37,11 +37,9 @@ chdir($oldcwd);
remove_data("dir_mb");
?>
-===DONE===
--EXPECTF--
Active code page: 65001
bool(true)
string(%d) "%s\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス42"
bool(true)
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt
index 0c8f70919f..a8d4e99a69 100644
--- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_eucjp");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt
index 634c676385..1e53da44fb 100644
--- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_eucjp");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス42\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt
index 4b3c631837..dfd7de5273 100644
--- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_eucjp");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(38) "テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス33"
bool(true)
string(%d) "%s\テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt
index b1576e827a..796abf9867 100644
--- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt
@@ -33,10 +33,8 @@ if ($f) {
remove_data("file_kartuli");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
string(37) "reading file wihh multibyte filename
"
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt
index 73ae71a6ba..ae3fbbf8a3 100644
--- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt
@@ -36,7 +36,6 @@ var_dump(rmdir($subpath));
remove_data("dir_kartuli");
?>
-===DONE===
--EXPECTF--
bool(true)
bool(true)
@@ -48,4 +47,3 @@ bool(true)
string(%d) "%s\ქáƒáƒ áƒ—ველები42\ქáƒáƒ áƒ—ველები4"
Active code page: %d
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt
index 8aa7b2378c..04b4dc0aa3 100644
--- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt
@@ -37,7 +37,6 @@ get_basename_with_cp($fn, 65001);
remove_data("dir_kartuli");
?>
-===DONE===
--EXPECTF--
resource(%d) of type (stream)
int(25)
@@ -49,4 +48,3 @@ string(32) "ქáƒáƒ áƒ—ველები33"
bool(true)
string(%d) "%s\ქáƒáƒ áƒ—ველები33"
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt
index 211124ad21..44614a5f26 100644
--- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt
@@ -31,10 +31,8 @@ system("dir /b " . $fn);
remove_data("file_kartuli");
?>
-===DONE===
--EXPECTF--
string(%d) "%s\ქáƒáƒ áƒ—ველები55"
bool(true)
bool(true)
ქáƒáƒ áƒ—ველები55
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt
index 181ba33ca1..b88424471f 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt
@@ -37,11 +37,9 @@ for ($i = 0; $i < $how_many; $i++) {
var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s));
?>
-===DONE===
--EXPECTF--
%d%d%d%d
%s\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
bool(true)
bool(true)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt
index 48f30dbccd..ae3e1635a5 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt
@@ -44,7 +44,6 @@ for ($i = 0; $i < $how_many; $i++) {
var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s));
?>
-===DONE===
--EXPECTF--
%d%d%d%d
%s\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
@@ -52,4 +51,3 @@ bool(true)
bool(true)
string(5) "hello"
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt
index 3437656eec..2e39fa8d5c 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt
@@ -50,7 +50,6 @@ for ($i = 0; $i < $how_many; $i++) {
var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s));
?>
-===DONE===
--EXPECTF--
%d%d%d%d
%s\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxü\
@@ -61,4 +60,3 @@ bool(true)
int(5)
string(5) "hello"
bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt
index d572206c5d..6acdddd4c2 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt
@@ -34,11 +34,9 @@ var_dump(unlink($dest_file));
var_dump(rmdir($dest_dir));
?>
-===DONE===
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt
index 6dd1e21afb..72d78b3b60 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt
@@ -24,8 +24,6 @@ if ($fp = fopen($testFile, "r")) {
unlink($testFile);
?>
-===DONE===
--EXPECT--
Generating a file with a path length of 259 characters...
Opening file... OK
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
index 7a83c1e4f9..b98e087560 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
@@ -44,7 +44,6 @@ do {
} while ($p != $base);
?>
-===DONE===
--EXPECTF--
string(%d) "%s\dev\http\tproj\app\cache\dev_old\annotations\72\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b.doctrinecache.data"
bool(true)
@@ -62,4 +61,3 @@ bool(true)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt
index 287dbf192e..c3cceb6d1a 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt
@@ -54,7 +54,6 @@ if ($newstart) {
}
?>
-===DONE===
--EXPECTF--
string(251) "%s"
string(1884) "%s"
@@ -62,4 +61,3 @@ bool(true)
bool(true)
int(5)
string(5) "hello"
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt
index d64316b3af..62db0c8c65 100644
--- a/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt
@@ -54,7 +54,6 @@ set_active_cp($old_cp);
remove_data("mb_names");
?>
-===DONE===
--EXPECTF--
Active code page: 65001
filename: . : filetype: dir
@@ -76,4 +75,3 @@ filename: テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス42 : filetype: dir
filename: 測試多字節路徑 : filetype: file
filename: 測試多字節路徑5 : filetype: dir
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt
index acd9323c5c..771d82b1bb 100644
--- a/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt
@@ -55,7 +55,6 @@ set_active_cp($old_cp);
remove_data("file2_mb");
?>
-===DONE===
--EXPECTF--
Active code page: 65001
bool(true)
@@ -66,4 +65,3 @@ string(27) "測試多字節路徑17.txt"
bool(true)
bool(true)
Active code page: %d
-===DONE===
diff --git a/ext/standard/tests/filters/001.phpt b/ext/standard/tests/filters/001.phpt
index fbfdda2385..53d9fc2b50 100644
--- a/ext/standard/tests/filters/001.phpt
+++ b/ext/standard/tests/filters/001.phpt
@@ -7,8 +7,6 @@ var_dump(stream_filter_register("", ""));
var_dump(stream_filter_register("test", ""));
var_dump(stream_filter_register("", "test"));
var_dump(stream_filter_register("------", "nonexistentclass"));
-var_dump(stream_filter_register(array(), "aa"));
-var_dump(stream_filter_register("", array()));
echo "Done\n";
?>
@@ -22,10 +20,4 @@ bool(false)
Warning: stream_filter_register(): Filter name cannot be empty in %s on line %d
bool(false)
bool(true)
-
-Warning: stream_filter_register() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: stream_filter_register() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/filters/php_user_filter_01.phpt b/ext/standard/tests/filters/php_user_filter_01.phpt
index ff5a51f5be..fb47177f4c 100644
--- a/ext/standard/tests/filters/php_user_filter_01.phpt
+++ b/ext/standard/tests/filters/php_user_filter_01.phpt
@@ -14,4 +14,4 @@ class bar extends php_user_filter {
}
?>
--EXPECTF--
-Warning: Declaration of bar::filter($in, $out, &$consumed) should be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
+Fatal error: Declaration of bar::filter($in, $out, &$consumed) must be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
diff --git a/ext/standard/tests/filters/php_user_filter_02.phpt b/ext/standard/tests/filters/php_user_filter_02.phpt
index bdd73c01a8..fd0822153b 100644
--- a/ext/standard/tests/filters/php_user_filter_02.phpt
+++ b/ext/standard/tests/filters/php_user_filter_02.phpt
@@ -9,4 +9,4 @@ class foo extends php_user_filter {
}
?>
--EXPECTF--
-Warning: Declaration of foo::filter($in, $out, $consumed, $closing) should be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
+Fatal error: Declaration of foo::filter($in, $out, $consumed, $closing) must be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
diff --git a/ext/standard/tests/filters/php_user_filter_03.phpt b/ext/standard/tests/filters/php_user_filter_03.phpt
index 867b74eb89..a89637d4cc 100644
--- a/ext/standard/tests/filters/php_user_filter_03.phpt
+++ b/ext/standard/tests/filters/php_user_filter_03.phpt
@@ -9,4 +9,4 @@ class foo extends php_user_filter {
}
?>
--EXPECTF--
-Warning: Declaration of foo::onCreate($var) should be compatible with php_user_filter::onCreate() in %s on line %d
+Fatal error: Declaration of foo::onCreate($var) must be compatible with php_user_filter::onCreate() in %s on line %d
diff --git a/ext/standard/tests/filters/stream_filter_remove_basic.phpt b/ext/standard/tests/filters/stream_filter_remove_basic.phpt
index a264a0e4f6..65fc021c13 100644
--- a/ext/standard/tests/filters/stream_filter_remove_basic.phpt
+++ b/ext/standard/tests/filters/stream_filter_remove_basic.phpt
@@ -31,7 +31,6 @@ fpassthru( $fp );
fclose( $fp );
?>
-===DONE===
--CLEAN--
<?php
@@ -44,4 +43,3 @@ unlink( $file );
bool(true)
Grfgvat gur ebg13 svygre juvpu fuvsgf fbzr guvatf nebhaq.
add some more un-filtered foobar
-===DONE===
diff --git a/ext/standard/tests/filters/stream_filter_remove_error.phpt b/ext/standard/tests/filters/stream_filter_remove_error.phpt
index 9513319f57..f9d26837c8 100644
--- a/ext/standard/tests/filters/stream_filter_remove_error.phpt
+++ b/ext/standard/tests/filters/stream_filter_remove_error.phpt
@@ -20,16 +20,6 @@ $filter = stream_filter_append( $fp, "string.rot13", STREAM_FILTER_WRITE );
echo "*** Testing stream_filter_remove() : error conditions ***\n";
-echo "\n-- Testing stream_filter_remove() function with Zero arguments --\n";
-var_dump( stream_filter_remove() );
-
-echo "\n-- Testing stream_filter_remove() function with more than expected no. of arguments --\n";
-$arg = 'bogus arg';
-var_dump( stream_filter_remove( $filter, $arg ) );
-
-echo "\n-- Testing stream_filter_remove() function with unexisting stream filter --\n";
-var_dump( stream_filter_remove( "fakefilter" ) );
-
echo "\n-- Testing stream_filter_remove() function with bad resource --\n";
var_dump( stream_filter_remove( $fp ) );
@@ -41,7 +31,6 @@ var_dump( stream_filter_remove( $filter ) );
fclose( $fp );
?>
-===DONE===
--CLEAN--
<?php
@@ -52,21 +41,6 @@ unlink( $file );
--EXPECTF--
*** Testing stream_filter_remove() : error conditions ***
--- Testing stream_filter_remove() function with Zero arguments --
-
-Warning: stream_filter_remove() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing stream_filter_remove() function with more than expected no. of arguments --
-
-Warning: stream_filter_remove() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
--- Testing stream_filter_remove() function with unexisting stream filter --
-
-Warning: stream_filter_remove() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-- Testing stream_filter_remove() function with bad resource --
Warning: stream_filter_remove(): Invalid resource given, not a stream filter in %s on line %d
@@ -77,4 +51,3 @@ bool(true)
Warning: stream_filter_remove(): Invalid resource given, not a stream filter in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/filters/strip_tags_filter.phpt b/ext/standard/tests/filters/strip_tags_filter.phpt
deleted file mode 100644
index f353e79a9a..0000000000
--- a/ext/standard/tests/filters/strip_tags_filter.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-string.strip_tags filter
---FILE--
-<?php
-$fp = fopen('php://output', 'w');
-stream_filter_append($fp, 'string.strip_tags');
-fwrite($fp, "test <b>bold</b> <i>italic</i> test\n");
-fclose($fp);
-
-$fp = fopen('php://output', 'w');
-stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, "<b>");
-fwrite($fp, "test <b>bold</b> <i>italic</i> test\n");
-fclose($fp);
-
-$fp = fopen('php://output', 'w');
-stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, ["b"]);
-fwrite($fp, "test <b>bold</b> <i>italic</i> test\n");
-fclose($fp);
-
-?>
---EXPECTF--
-Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d
-test bold italic test
-
-Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d
-test <b>bold</b> italic test
-
-Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d
-test <b>bold</b> italic test
diff --git a/ext/standard/tests/general_functions/010.phpt b/ext/standard/tests/general_functions/010.phpt
index 51132c6a15..99971616d2 100644
--- a/ext/standard/tests/general_functions/010.phpt
+++ b/ext/standard/tests/general_functions/010.phpt
@@ -3,24 +3,19 @@ register_shutdown_function() & __call
--FILE--
<?php
class test {
- function _foo() {
- throw new Exception('test');
- }
- function __call($name=null, $args=null) {
- return test::_foo();
- }
+ function _foo() {
+ throw new Exception('test');
+ }
+ function __call($name=null, $args=null) {
+ return test::_foo();
+ }
}
-try {
- var_dump(register_shutdown_function(array("test","__call")));
-} catch (Error $e) {
- echo "\nException: " . $e->getMessage() . "\n";
-}
+var_dump(register_shutdown_function(array("test","__call")));
echo "Done\n";
?>
--EXPECTF--
-Exception: Non-static method test::__call() cannot be called statically
+Warning: register_shutdown_function(): Invalid shutdown callback 'test::__call' passed in %s on line %d
+bool(false)
Done
-
-Fatal error: Non-static method test::__call() cannot be called statically in %s on line %d
diff --git a/ext/standard/tests/general_functions/bug25038.phpt b/ext/standard/tests/general_functions/bug25038.phpt
index 52fe032056..5bd549fd0f 100644
--- a/ext/standard/tests/general_functions/bug25038.phpt
+++ b/ext/standard/tests/general_functions/bug25038.phpt
@@ -25,8 +25,6 @@ catch (Exception $e)
}
?>
-===DONE===
--EXPECT--
This is an exception from bar(first try).
This is an exception from bar(second try).
-===DONE===
diff --git a/ext/standard/tests/general_functions/bug32647.phpt b/ext/standard/tests/general_functions/bug32647.phpt
index c6ff94833d..92fa547820 100644
--- a/ext/standard/tests/general_functions/bug32647.phpt
+++ b/ext/standard/tests/general_functions/bug32647.phpt
@@ -30,11 +30,11 @@ register_shutdown_function(array($obj,'barfoo')); // Valid
?>
--EXPECTF--
-Notice: Undefined variable: obj in %s on line %d
+Warning: Undefined variable: obj in %s on line %d
Warning: register_shutdown_function(): Invalid shutdown callback 'Array' passed in %s on line %d
-Notice: Undefined variable: obj in %s on line %d
+Warning: Undefined variable: obj in %s on line %d
Warning: register_shutdown_function(): Invalid shutdown callback 'Array' passed in %s on line %d
@@ -46,13 +46,8 @@ Warning: register_shutdown_function(): Invalid shutdown callback 'Array' passed
Warning: register_shutdown_function(): Invalid shutdown callback 'bar' passed in %s on line %d
-Deprecated: Non-static method bar::barfoo() should not be called statically in %sbug32647.php on line %d
+Warning: register_shutdown_function(): Invalid shutdown callback 'bar::barfoo' passed in %sbug32647.php on line %d
Warning: register_shutdown_function(): Invalid shutdown callback 'bar::foobar' passed in %sbug32647.php on line %d
foo!
-
-Deprecated: Non-static method bar::barfoo() should not be called statically in Unknown on line 0
-
-Deprecated: Non-static method bar::barfoo() should not be called statically in Unknown on line 0
-bar!
bar!
diff --git a/ext/standard/tests/general_functions/bug36011.phpt b/ext/standard/tests/general_functions/bug36011.phpt
index 00530bf846..63e0015437 100644
--- a/ext/standard/tests/general_functions/bug36011.phpt
+++ b/ext/standard/tests/general_functions/bug36011.phpt
@@ -36,11 +36,9 @@ $a->whee5();
TestClass::whee5();
?>
-===DONE===
--EXPECT--
TestClass::test()
TestClass::test()
TestClass::test()
TestClass::test()
TestClass::test()
-===DONE===
diff --git a/ext/standard/tests/general_functions/bug40398.phpt b/ext/standard/tests/general_functions/bug40398.phpt
index e92be5bedc..b187c64efe 100644
--- a/ext/standard/tests/general_functions/bug40398.phpt
+++ b/ext/standard/tests/general_functions/bug40398.phpt
@@ -73,7 +73,6 @@ new Derived_5('5');
new Derived_6('6');
?>
-===DONE===
--EXPECT--
Base::__construct(1)
Base::__construct(2)
@@ -81,4 +80,3 @@ Base::__construct(3)
Base::__construct(4)
Base::__construct(5)
Base::__construct(6)
-===DONE===
diff --git a/ext/standard/tests/general_functions/bug41970.phpt b/ext/standard/tests/general_functions/bug41970.phpt
index 6f05137afc..f43bf64380 100644
--- a/ext/standard/tests/general_functions/bug41970.phpt
+++ b/ext/standard/tests/general_functions/bug41970.phpt
@@ -6,22 +6,26 @@ Bug #41970 (call_user_func_*() leaks on failure)
$a = array(4,3,2);
var_dump(call_user_func_array("sort", array($a)));
-var_dump(call_user_func_array("strlen", array($a)));
+try {
+ var_dump(call_user_func_array("strlen", array($a)));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(call_user_func("sort", $a));
-var_dump(call_user_func("strlen", $a));
+try {
+ var_dump(call_user_func("strlen", $a));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
--EXPECTF--
-Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 5
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line %d
bool(true)
+strlen() expects parameter 1 to be string, array given
-Warning: strlen() expects parameter 1 to be string, array given in %sbug41970.php on line 6
-NULL
-
-Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 7
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line %d
bool(true)
-
-Warning: strlen() expects parameter 1 to be string, array given in %sbug41970.php on line 8
-NULL
+strlen() expects parameter 1 to be string, array given
Done
diff --git a/ext/standard/tests/general_functions/bug46587.phpt b/ext/standard/tests/general_functions/bug46587.phpt
index becbde9648..ee59feb444 100644
--- a/ext/standard/tests/general_functions/bug46587.phpt
+++ b/ext/standard/tests/general_functions/bug46587.phpt
@@ -4,13 +4,15 @@ Bug #46587 (mt_rand() does not check that max is greater than min).
<?php
var_dump(mt_rand(3,8));
-var_dump(mt_rand(8,3));
+try {
+ var_dump(mt_rand(8,3));
+} catch (ValueError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done.\n";
?>
--EXPECTF--
int(%d)
-
-Warning: mt_rand(): max(3) is smaller than min(8) in %s on line %d
-bool(false)
+max (3) is smaller than min (8)
Done.
diff --git a/ext/standard/tests/general_functions/bug47857.phpt b/ext/standard/tests/general_functions/bug47857.phpt
index d19eca7248..c06673bc34 100644
--- a/ext/standard/tests/general_functions/bug47857.phpt
+++ b/ext/standard/tests/general_functions/bug47857.phpt
@@ -8,18 +8,20 @@ class foo {
}
}
var_dump(is_callable(array('foo','bar')));
-foo::bar();
+try {
+ foo::bar();
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(is_callable(array('Exception','getMessage')));
-Exception::getMessage();
+try {
+ Exception::getMessage();
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-bool(true)
-
-Deprecated: Non-static method foo::bar() should not be called statically in %sbug47857.php on line %d
-ok
+--EXPECT--
+bool(false)
+Non-static method foo::bar() cannot be called statically
bool(false)
-
-Fatal error: Uncaught Error: Non-static method Exception::getMessage() cannot be called statically in %sbug47857.php:%d
-Stack trace:
-#0 {main}
- thrown in %sbug47857.php on line %d
+Non-static method Exception::getMessage() cannot be called statically
diff --git a/ext/standard/tests/general_functions/bug60723.phpt b/ext/standard/tests/general_functions/bug60723.phpt
index 504de7afbf..93381d246c 100644
--- a/ext/standard/tests/general_functions/bug60723.phpt
+++ b/ext/standard/tests/general_functions/bug60723.phpt
@@ -14,6 +14,6 @@ readfile($log);
unlink($log);
?>
--EXPECTF--
-Notice: Undefined variable: aa in %sbug60723.php on line %d
-[%s ASIA/Chongqing] PHP Notice: Undefined variable: aa in %sbug60723.php on line %d
+Warning: Undefined variable: aa in %s on line %d
+[%s ASIA/Chongqing] PHP Warning: Undefined variable: aa in %s on line %d
[%s ASIA/Chongqing] dummy
diff --git a/ext/standard/tests/general_functions/bug67498.phpt b/ext/standard/tests/general_functions/bug67498.phpt
index 5b5951b0f8..dd1ef11ef5 100644
--- a/ext/standard/tests/general_functions/bug67498.phpt
+++ b/ext/standard/tests/general_functions/bug67498.phpt
@@ -6,10 +6,8 @@ $PHP_SELF = 1;
phpinfo(INFO_VARIABLES);
?>
-==DONE==
--EXPECTF--
phpinfo()
PHP Variables
%A
-==DONE==
diff --git a/ext/standard/tests/general_functions/bug70018.phpt b/ext/standard/tests/general_functions/bug70018.phpt
index f7aefcc03f..77df0417a6 100644
--- a/ext/standard/tests/general_functions/bug70018.phpt
+++ b/ext/standard/tests/general_functions/bug70018.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug #70018 (exec does not strip all whitespace)
---SKIPIF--
-<?php
-if ("cli" != php_sapi_name()) {
- die("skip.. CLI only test");
-}
-?>
--FILE--
<?php
$output = array();
diff --git a/ext/standard/tests/general_functions/bug76643.phpt b/ext/standard/tests/general_functions/bug76643.phpt
index 47b5345860..07f789f464 100644
--- a/ext/standard/tests/general_functions/bug76643.phpt
+++ b/ext/standard/tests/general_functions/bug76643.phpt
@@ -6,7 +6,5 @@ $_SERVER = 'foo';
output_add_rewrite_var('bar', 'baz');
?>
<form action="http://example.com/"></form>
-===DONE===
--EXPECT--
<form action="http://example.com/"></form>
-===DONE===
diff --git a/ext/standard/tests/general_functions/call_user_func_return.phpt b/ext/standard/tests/general_functions/call_user_func_return.phpt
index cb0f6998dc..1457ae2e36 100644
--- a/ext/standard/tests/general_functions/call_user_func_return.phpt
+++ b/ext/standard/tests/general_functions/call_user_func_return.phpt
@@ -31,7 +31,6 @@ test('test1');
test('test2');
?>
-===DONE===
--EXPECTF--
Direct Call
string(5) "test1" refcount(%d)
@@ -41,4 +40,3 @@ Direct Call
string(5) "test2" refcount(%d)
User Func
string(5) "test2" refcount(%d)
-===DONE===
diff --git a/ext/standard/tests/general_functions/callbacks_001.phpt b/ext/standard/tests/general_functions/callbacks_001.phpt
index a58f19d932..827f5c0182 100644
--- a/ext/standard/tests/general_functions/callbacks_001.phpt
+++ b/ext/standard/tests/general_functions/callbacks_001.phpt
@@ -69,7 +69,11 @@ class P extends O {
$this->call(array('parent', 'who'));
$this->call(array('P', 'parent::who'));
$this->call(array($this, 'O::who'));
- $this->call(array($this, 'B::who'));
+ try {
+ $this->call(array($this, 'B::who'));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
}
}
@@ -79,7 +83,6 @@ $o = new P;
$o->test();
?>
-===DONE===
--EXPECTF--
parent|who
B
@@ -103,6 +106,4 @@ O
$this|O::who
O
$this|B::who
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'P' is not a subclass of 'B' in %s on line %d
-===DONE===
+call_user_func() expects parameter 1 to be a valid callback, class 'P' is not a subclass of 'B'
diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt
index 22130c524a..0d44035e0e 100644
--- a/ext/standard/tests/general_functions/callbacks_002.phpt
+++ b/ext/standard/tests/general_functions/callbacks_002.phpt
@@ -3,14 +3,24 @@ call_user_func(): Wrong parameters
--FILE--
<?php
-call_user_func(array('Foo', 'bar'));
-call_user_func(array(NULL, 'bar'));
-call_user_func(array('stdclass', NULL));
+try {
+ call_user_func(array('Foo', 'bar'));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ call_user_func(array(NULL, 'bar'));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ call_user_func(array('stdclass', NULL));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
--EXPECTF--
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found
+call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
+call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method
diff --git a/ext/standard/tests/general_functions/debug_zval_dump_v.phpt b/ext/standard/tests/general_functions/debug_zval_dump_v.phpt
index 6cb413dc26..d622089cff 100644
--- a/ext/standard/tests/general_functions/debug_zval_dump_v.phpt
+++ b/ext/standard/tests/general_functions/debug_zval_dump_v.phpt
@@ -147,7 +147,7 @@ int(10)
-- Value of $ref_first_var --
-Notice: Undefined variable: ref_first_var in %s on line %d
+Warning: Undefined variable: ref_first_var in %s on line %d
NULL
-- Value of $first_var --
@@ -166,7 +166,7 @@ int(10)
-- Value of $var_3: (after unsetting var_3) --
-Notice: Undefined variable: var_3 in %s on line %d
+Warning: Undefined variable: var_3 in %s on line %d
NULL
-- Value of $var_2: --
@@ -177,7 +177,7 @@ int(10)
-- Value of $var_1: (after unsetting variable_1) --
-Notice: Undefined variable: var_1 in %s on line %d
+Warning: Undefined variable: var_1 in %s on line %d
NULL
-- Value of $var_2: --
diff --git a/ext/standard/tests/general_functions/error_clear_last.phpt b/ext/standard/tests/general_functions/error_clear_last.phpt
index 675affb625..2cfd17793a 100644
--- a/ext/standard/tests/general_functions/error_clear_last.phpt
+++ b/ext/standard/tests/general_functions/error_clear_last.phpt
@@ -20,7 +20,7 @@ NULL
NULL
array(4) {
["type"]=>
- int(8)
+ int(2)
["message"]=>
string(21) "Undefined variable: b"
["file"]=>
diff --git a/ext/standard/tests/general_functions/error_get_last.phpt b/ext/standard/tests/general_functions/error_get_last.phpt
index 71f068f104..a4cae412b5 100644
--- a/ext/standard/tests/general_functions/error_get_last.phpt
+++ b/ext/standard/tests/general_functions/error_get_last.phpt
@@ -4,7 +4,11 @@ error_get_last() tests
<?php
var_dump(error_get_last());
-var_dump(error_get_last(true));
+try {
+ var_dump(error_get_last(true));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(error_get_last());
$a = $b;
@@ -15,29 +19,18 @@ echo "Done\n";
?>
--EXPECTF--
NULL
-
-Warning: error_get_last() expects exactly 0 parameters, 1 given in %s on line %d
+error_get_last() expects exactly 0 parameters, 1 given
NULL
-array(4) {
- ["type"]=>
- int(2)
- ["message"]=>
- string(54) "error_get_last() expects exactly 0 parameters, 1 given"
- ["file"]=>
- string(%i) "%s"
- ["line"]=>
- int(4)
-}
-Notice: Undefined variable: b in %s on line %d
+Warning: Undefined variable: b in %s on line %d
array(4) {
["type"]=>
- int(8)
+ int(2)
["message"]=>
string(21) "Undefined variable: b"
["file"]=>
- string(%i) "%s"
+ string(%d) "%s"
["line"]=>
- int(7)
+ int(11)
}
Done
diff --git a/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt b/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt
index cbb3f6fcc4..b6bc828a87 100644
--- a/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt
+++ b/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt
@@ -7,4 +7,8 @@ escapeshellarg("hello\0world");
?>
===DONE===
--EXPECTF--
-Fatal error: escapeshellarg(): Input string contains NULL bytes in %s on line %d
+Fatal error: Uncaught TypeError: Input string contains NULL bytes in %s:%d
+Stack trace:
+#0 %s(%d): escapeshellarg('hello\x00world')
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt
index aa264cce37..1a3eadbb80 100644
--- a/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt
+++ b/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt
@@ -74,7 +74,6 @@ foreach($inputs as $input) {
$iterator++;
};
?>
-===Done===
--EXPECT--
*** Testing escapeshellarg() : usage variations ***
@@ -137,4 +136,3 @@ string(2) """"
-- Iteration 20 --
string(2) """"
-===Done===
diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt
index 6f3b6a9f32..ba56db69ea 100644
--- a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt
+++ b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt
@@ -74,7 +74,6 @@ foreach($inputs as $input) {
$iterator++;
};
?>
-===Done===
--EXPECT--
*** Testing escapeshellarg() : usage variations ***
@@ -137,4 +136,3 @@ string(2) "''"
-- Iteration 20 --
string(2) "''"
-===Done===
diff --git a/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt b/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt
index 0a4d7eacff..7ce31fb8dd 100644
--- a/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt
+++ b/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt
@@ -7,4 +7,8 @@ escapeshellcmd("hello\0world");
?>
===DONE===
--EXPECTF--
-Fatal error: escapeshellcmd(): Input string contains NULL bytes in %s on line %d
+Fatal error: Uncaught TypeError: Input string contains NULL bytes in %s:%d
+Stack trace:
+#0 %s(%d): escapeshellcmd('hello\x00world')
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/general_functions/floatval.phpt b/ext/standard/tests/general_functions/floatval.phpt
index a01e01dbf1..f6f354509a 100644
--- a/ext/standard/tests/general_functions/floatval.phpt
+++ b/ext/standard/tests/general_functions/floatval.phpt
@@ -91,18 +91,6 @@ foreach ($not_float_types as $type ) {
var_dump( doubleval($type) );
}
-
-
-
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( floatval() );
-var_dump( doubleval() );
-
-//arguments more than expected
-var_dump( floatval(TRUE, FALSE) );
-var_dump( doubleval(TRUE, FALSE) );
-
echo "\nDone\n";
@@ -194,18 +182,4 @@ float(1)
float(0)
float(0)
-*** Testing error conditions ***
-
-Warning: floatval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: doubleval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: floatval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: doubleval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
Done
diff --git a/ext/standard/tests/general_functions/floatval_basic.phpt b/ext/standard/tests/general_functions/floatval_basic.phpt
index 8ad628b4f0..dc1c547731 100644
--- a/ext/standard/tests/general_functions/floatval_basic.phpt
+++ b/ext/standard/tests/general_functions/floatval_basic.phpt
@@ -50,7 +50,6 @@ foreach ($valid_floats as $key => $value ) {
}
?>
-===DONE===
--EXPECT--
*** Testing floatval() with valid float values ***
@@ -169,4 +168,3 @@ float(5000000)
-- Iteration : -.5e+7 --
float(-5000000)
-===DONE===
diff --git a/ext/standard/tests/general_functions/floatval_variation1.phpt b/ext/standard/tests/general_functions/floatval_variation1.phpt
index 2b49cd195b..098c4ad252 100644
--- a/ext/standard/tests/general_functions/floatval_variation1.phpt
+++ b/ext/standard/tests/general_functions/floatval_variation1.phpt
@@ -50,7 +50,6 @@ foreach ($not_float_types as $key => $type ) {
var_dump( doubleval($type) );
}
?>
-===DONE===
--EXPECTF--
Notice: A non well formed numeric value encountered in %s on line %d
@@ -155,4 +154,3 @@ float(0)
-- Iteration : null --
float(0)
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_defined_constants_basic.phpt b/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
index 1d9ca4a277..2aee70e6d0 100644
--- a/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
+++ b/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
@@ -28,7 +28,6 @@ if ($n2 == $n1 + 1 && array_key_exists("USER_CONSTANT", $arr2)) {
}
?>
-===DONE===
--EXPECT--
*** Testing get_defined_constants() : basic functionality ***
string(5) "array"
@@ -36,4 +35,3 @@ string(5) "array"
array(0) {
}
TEST PASSED
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_defined_vars_basic.phpt b/ext/standard/tests/general_functions/get_defined_vars_basic.phpt
index 6e9494509a..7f2b7a180e 100644
--- a/ext/standard/tests/general_functions/get_defined_vars_basic.phpt
+++ b/ext/standard/tests/general_functions/get_defined_vars_basic.phpt
@@ -63,7 +63,6 @@ if (count($vars) == 0) {
f1();
?>
-===DONE===
--EXPECT--
Simple testcase for get_defined_vars() function
@@ -149,4 +148,3 @@ array(9) {
["b1"]=>
bool(true)
}
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt b/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
index 33d4af03d2..cb4b84c99d 100644
--- a/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
+++ b/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt
@@ -14,10 +14,12 @@ $result = get_extension_funcs("standard");
var_dump(gettype($result));
var_dump(in_array("cos", $result));
+// Unknown extension
+var_dump(get_extension_funcs("foo"));
+
?>
-===DONE===
--EXPECT--
Simple testcase for get_extension_funcs() function
string(5) "array"
bool(true)
-===DONE===
+bool(false)
diff --git a/ext/standard/tests/general_functions/get_extension_funcs_error.phpt b/ext/standard/tests/general_functions/get_extension_funcs_error.phpt
deleted file mode 100644
index 44bd822d12..0000000000
--- a/ext/standard/tests/general_functions/get_extension_funcs_error.phpt
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-Test get_extension_funcs() function : error conditions
---FILE--
-<?php
-/* Prototype : array get_extension_funcs ( string $module_name )
- * Description: Returns an array with the names of the functions of a module.
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing get_extension_funcs() : error conditions ***\n";
-
-echo "\n-- Too few arguments --\n";
-var_dump(get_extension_funcs());
-
-$extra_arg = 1;
-echo "\n-- Too many arguments --\n";
-var_dump(get_extension_funcs("standard", $extra_arg));
-
-echo "\n-- Invalid extension name --\n";
-var_dump(get_extension_funcs("foo"));
-
-?>
-===DONE===
---EXPECTF--
-*** Testing get_extension_funcs() : error conditions ***
-
--- Too few arguments --
-
-Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Too many arguments --
-
-Warning: get_extension_funcs() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Invalid extension name --
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_include_path_basic.phpt b/ext/standard/tests/general_functions/get_include_path_basic.phpt
index 2017bf697a..809faf694d 100644
--- a/ext/standard/tests/general_functions/get_include_path_basic.phpt
+++ b/ext/standard/tests/general_functions/get_include_path_basic.phpt
@@ -19,19 +19,8 @@ if (ini_get("include_path") == get_include_path()) {
echo "FAILED\n";
}
-echo "\nError cases:\n";
-var_dump(get_include_path(TRUE));
-
-
?>
-===DONE===
--EXPECTF--
*** Testing get_include_path()
string(1) "."
PASSED
-
-Error cases:
-
-Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_included_files.phpt b/ext/standard/tests/general_functions/get_included_files.phpt
index df41ec8513..d81c72e3ea 100644
--- a/ext/standard/tests/general_functions/get_included_files.phpt
+++ b/ext/standard/tests/general_functions/get_included_files.phpt
@@ -22,11 +22,7 @@ include(__DIR__."/get_included_files_inc2.inc");
echo "\n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n";
var_dump(get_included_files());
-echo "\n-- Error cases --\n";
-var_dump(get_included_files(true));
-
?>
-===DONE===
--EXPECTF--
*** Testing get_included_files()
@@ -55,9 +51,3 @@ array(4) {
[3]=>
string(%d) "%sget_included_files_inc3.inc"
}
-
--- Error cases --
-
-Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt b/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt
index c72a88de13..3be43caecb 100644
--- a/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt
+++ b/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt
@@ -13,11 +13,9 @@ echo "Get loaded extensions\n";
var_dump(get_loaded_extensions());
?>
-===DONE===
--EXPECTF--
*** Testing get_loaded_extensions() : basic functionality ***
Get loaded extensions
array(%d) {
%a
}
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_resource_type_basic.phpt b/ext/standard/tests/general_functions/get_resource_type_basic.phpt
index 58a49e713f..dcad549c7b 100644
--- a/ext/standard/tests/general_functions/get_resource_type_basic.phpt
+++ b/ext/standard/tests/general_functions/get_resource_type_basic.phpt
@@ -13,8 +13,6 @@ $res = fopen(__FILE__, "r");
var_dump(get_resource_type($res));
?>
-===DONE===
--EXPECT--
*** Testing get_resource_type() : basic functionality ***
string(6) "stream"
-===DONE===
diff --git a/ext/standard/tests/general_functions/getrusage.phpt b/ext/standard/tests/general_functions/getrusage.phpt
index 4caca88e1b..8ec131809f 100644
--- a/ext/standard/tests/general_functions/getrusage.phpt
+++ b/ext/standard/tests/general_functions/getrusage.phpt
@@ -8,16 +8,12 @@ getrusage() tests
var_dump(gettype(getrusage()));
var_dump(gettype(getrusage(1)));
var_dump(gettype(getrusage(-1)));
-var_dump(getrusage(array()));
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
string(5) "array"
string(5) "array"
string(5) "array"
-
-Warning: getrusage() expects parameter 1 to be int, array given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/general_functions/getrusage_basic.phpt b/ext/standard/tests/general_functions/getrusage_basic.phpt
index a2b03ee07a..7aaacd51a0 100644
--- a/ext/standard/tests/general_functions/getrusage_basic.phpt
+++ b/ext/standard/tests/general_functions/getrusage_basic.phpt
@@ -22,9 +22,7 @@ if (!is_array($dat)) {
echo "User time used (seconds) " . $dat["ru_utime.tv_sec"] . "\n";
echo "User time used (microseconds) " . $dat["ru_utime.tv_usec"] . "\n";
?>
-===DONE===
--EXPECTF--
Simple testcase for getrusage() function
User time used (seconds) %d
User time used (microseconds) %d
-===DONE===
diff --git a/ext/standard/tests/general_functions/getservbyport_variation1.phpt b/ext/standard/tests/general_functions/getservbyport_variation1.phpt
index a876ac1fea..f387161bf4 100644
--- a/ext/standard/tests/general_functions/getservbyport_variation1.phpt
+++ b/ext/standard/tests/general_functions/getservbyport_variation1.phpt
@@ -12,29 +12,13 @@ Simone Gentili (sensorario@gmail.com)
var_dump(getservbyport( -1, "tcp" ));
var_dump(getservbyport( 80, "ppp" ));
var_dump(getservbyport( null, null));
- var_dump(getservbyport( array(), array()));
- var_dump(getservbyport( array(80), array("tcp")));
- var_dump(getservbyport( array(2, 3), array("one"=>1, "two"=>2)));
var_dump(getservbyport( 2, 2));
var_dump(getservbyport( "80", "tcp"));
- var_dump(getservbyport( new stdClass(), new stdClass()));
?>
--EXPECTF--
bool(false)
bool(false)
bool(false)
-
-Warning: getservbyport() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: getservbyport() expects parameter 1 to be int, array given in %s on line %d
-NULL
-
-Warning: getservbyport() expects parameter 1 to be int, array given in %s on line %d
-NULL
bool(false)
string(%d) "%s"
-
-Warning: getservbyport() expects parameter 1 to be int, object given in %s on line %d
-NULL
diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt
index f8ff6c4460..fac0327ad5 100644
--- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt
@@ -846,7 +846,7 @@ string(6) "object"
-- Setting type of data to string --
-- Iteration 1 --
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
@@ -855,7 +855,7 @@ bool(true)
string(14) "another string"
string(6) "string"
-- Iteration 3 --
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
diff --git a/ext/standard/tests/general_functions/gettype_settype_error.phpt b/ext/standard/tests/general_functions/gettype_settype_error.phpt
index 325e91e47f..e204c64d4c 100644
--- a/ext/standard/tests/general_functions/gettype_settype_error.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_error.phpt
@@ -13,19 +13,7 @@ Test gettype() & settype() functions : error conditions
echo "**** Testing gettype() and settype() functions ****\n";
-echo "\n*** Testing gettype(): error conditions ***\n";
-//Zero arguments
-var_dump( gettype() );
-// args more than expected
-var_dump( gettype( "1", "2" ) );
-
echo "\n*** Testing settype(): error conditions ***\n";
-//Zero arguments
-var_dump( settype() );
-
-// args more than expected
-$var = 10.5;
-var_dump( settype( $var, $var, "int" ) );
// passing an invalid type to set
var_dump( settype( $var, "unknown" ) );
@@ -35,22 +23,8 @@ echo "Done\n";
--EXPECTF--
**** Testing gettype() and settype() functions ****
-*** Testing gettype(): error conditions ***
-
-Warning: gettype() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: gettype() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
*** Testing settype(): error conditions ***
-Warning: settype() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: settype() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
Warning: settype(): Invalid type in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation1.phpt b/ext/standard/tests/general_functions/gettype_settype_variation1.phpt
index 7fb8789ff3..eb43b85f30 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation1.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation1.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -149,10 +145,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
/* test conversion to null type */
@@ -180,9 +172,6 @@ foreach ($var_values as $var) {
echo "Done\n";
?>
--EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
*** Testing gettype() & settype() functions : usage variations ***
-- Setting type of data to null --
@@ -576,14 +565,4 @@ string(6) "object"
bool(true)
NULL
string(4) "NULL"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-NULL
-string(4) "NULL"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-NULL
-string(4) "NULL"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
index d44c04e5dd..5e49821f2c 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
@@ -42,10 +42,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -153,10 +149,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
// test conversion to these types
@@ -189,9 +181,6 @@ foreach ($types as $type) {
echo "Done\n";
?>
--EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
*** Testing settype() & gettype() : usage variations ***
-- Setting type of data to integer --
@@ -588,16 +577,6 @@ string(6) "object"
bool(true)
int(1)
string(7) "integer"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-int(0)
-string(7) "integer"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-int(0)
-string(7) "integer"
-- Setting type of data to int --
-- Iteration 1 --
@@ -993,14 +972,4 @@ string(6) "object"
bool(true)
int(1)
string(7) "integer"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-int(0)
-string(7) "integer"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-int(0)
-string(7) "integer"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt
index 71b03461eb..f17b261437 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -149,10 +145,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
// test conversion to these types
@@ -185,9 +177,6 @@ foreach ($types as $type) {
echo "Done\n";
?>
--EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
*** Testing settype() & gettype() : usage variations ***
-- Setting type of data to float --
@@ -584,16 +573,6 @@ string(6) "object"
bool(true)
float(1)
string(6) "double"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-float(0)
-string(6) "double"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-float(0)
-string(6) "double"
-- Setting type of data to double --
-- Iteration 1 --
@@ -989,14 +968,4 @@ string(6) "object"
bool(true)
float(1)
string(6) "double"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-float(0)
-string(6) "double"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-float(0)
-string(6) "double"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation4.phpt b/ext/standard/tests/general_functions/gettype_settype_variation4.phpt
index a14cb73dbb..00da4bf4bb 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation4.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation4.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -160,10 +156,6 @@ $var_values = array (
new point(0, 0),
new class_with_no_member,
- /* undefined/unset vars */
- $unset_var,
- $undef_var,
-
/* binary strings */
b"0",
b'0',
@@ -210,9 +202,6 @@ foreach ($types as $type) {
echo "Done\n";
?>
--EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
*** Testing settype() & gettype() : usage variations ***
-- Setting type of data to boolean --
@@ -632,24 +621,24 @@ bool(true)
bool(true)
string(7) "boolean"
-- Iteration 84 --
-string(4) "NULL"
+string(6) "string"
bool(true)
bool(false)
string(7) "boolean"
-- Iteration 85 --
-string(4) "NULL"
+string(6) "string"
bool(true)
bool(false)
string(7) "boolean"
-- Iteration 86 --
string(6) "string"
bool(true)
-bool(false)
+bool(true)
string(7) "boolean"
-- Iteration 87 --
string(6) "string"
bool(true)
-bool(false)
+bool(true)
string(7) "boolean"
-- Iteration 88 --
string(6) "string"
@@ -696,16 +685,6 @@ string(6) "string"
bool(true)
bool(true)
string(7) "boolean"
--- Iteration 97 --
-string(6) "string"
-bool(true)
-bool(true)
-string(7) "boolean"
--- Iteration 98 --
-string(6) "string"
-bool(true)
-bool(true)
-string(7) "boolean"
-- Setting type of data to bool --
-- Iteration 1 --
@@ -1124,24 +1103,24 @@ bool(true)
bool(true)
string(7) "boolean"
-- Iteration 84 --
-string(4) "NULL"
+string(6) "string"
bool(true)
bool(false)
string(7) "boolean"
-- Iteration 85 --
-string(4) "NULL"
+string(6) "string"
bool(true)
bool(false)
string(7) "boolean"
-- Iteration 86 --
string(6) "string"
bool(true)
-bool(false)
+bool(true)
string(7) "boolean"
-- Iteration 87 --
string(6) "string"
bool(true)
-bool(false)
+bool(true)
string(7) "boolean"
-- Iteration 88 --
string(6) "string"
@@ -1188,14 +1167,4 @@ string(6) "string"
bool(true)
bool(true)
string(7) "boolean"
--- Iteration 97 --
-string(6) "string"
-bool(true)
-bool(true)
-string(7) "boolean"
--- Iteration 98 --
-string(6) "string"
-bool(true)
-bool(true)
-string(7) "boolean"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation5.phpt b/ext/standard/tests/general_functions/gettype_settype_variation5.phpt
index c5e2640f9c..6437baa10b 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation5.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation5.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -149,10 +145,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
/* test conversion to resource type */
@@ -179,10 +171,7 @@ foreach ($var_values as $var) {
echo "Done\n";
?>
---EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
+--EXPECTF--
*** Testing gettype() & settype() functions : usage variations ***
-- Setting type of data to resource --
@@ -699,16 +688,4 @@ object(point)#3 (2) {
int(0)
}
string(6) "object"
--- Iteration 79 --
-string(4) "NULL"
-2: settype(): Cannot convert to resource type
-bool(false)
-NULL
-string(4) "NULL"
--- Iteration 80 --
-string(4) "NULL"
-2: settype(): Cannot convert to resource type
-bool(false)
-NULL
-string(4) "NULL"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation6.phpt b/ext/standard/tests/general_functions/gettype_settype_variation6.phpt
index 27beaa0744..7c5ea5efb6 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation6.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation6.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -149,10 +145,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
/* test conversion to array type */
@@ -181,10 +173,7 @@ foreach ($var_values as $var) {
echo "Done\n";
?>
---EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
+--EXPECTF--
*** Testing gettype() & settype() functions : usage variations ***
-- Setting type of data to array --
@@ -831,16 +820,4 @@ array(2) {
int(0)
}
string(5) "array"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-array(0) {
-}
-string(5) "array"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-array(0) {
-}
-string(5) "array"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation7.phpt b/ext/standard/tests/general_functions/gettype_settype_variation7.phpt
index dae20a1856..b282cbdab1 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation7.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation7.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -149,10 +145,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
/* test conversion to object type */
@@ -179,10 +171,7 @@ foreach ($var_values as $var) {
echo "Done\n";
?>
---EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
+--EXPECTF--
*** Testing gettype() & settype() functions : usage variations ***
-- Setting type of data to object --
@@ -829,16 +818,4 @@ object(point)#3 (2) {
int(0)
}
string(6) "object"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-object(stdClass)#4 (0) {
-}
-string(6) "object"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-object(stdClass)#4 (0) {
-}
-string(6) "object"
Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation8.phpt b/ext/standard/tests/general_functions/gettype_settype_variation8.phpt
index 97f550e446..7ddfe54ab6 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation8.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation8.phpt
@@ -38,10 +38,6 @@ set_error_handler("foo");
$var1 = "another string";
$var2 = array(2,3,4);
-// a variable which is unset
-$unset_var = 10.5;
-unset( $unset_var );
-
class point
{
var $x;
@@ -149,10 +145,6 @@ $var_values = array (
new point(NULL, NULL),
new point(2.5, 40.5),
new point(0, 0),
-
- /* undefined/unset vars */
- $unset_var,
- $undef_var
);
/* test conversion to string type */
@@ -179,10 +171,7 @@ foreach ($var_values as $var) {
echo "Done\n";
?>
---EXPECT--
-8: Undefined variable: unset_var
-8: Undefined variable: undef_var
-
+--EXPECTF--
*** Testing gettype() & settype() functions : usage variations ***
-- Setting type of data to string --
@@ -399,31 +388,31 @@ string(12) "@$%#$%^$%^&^"
string(6) "string"
-- Iteration 43 --
string(5) "array"
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
-- Iteration 44 --
string(5) "array"
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
-- Iteration 45 --
string(5) "array"
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
-- Iteration 46 --
string(5) "array"
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
-- Iteration 47 --
string(5) "array"
-8: Array to string conversion
+2: Array to string conversion
bool(true)
string(5) "Array"
string(6) "string"
@@ -582,14 +571,4 @@ string(6) "object"
bool(true)
string(11) "ObjectPoint"
string(6) "string"
--- Iteration 79 --
-string(4) "NULL"
-bool(true)
-string(0) ""
-string(6) "string"
--- Iteration 80 --
-string(4) "NULL"
-bool(true)
-string(0) ""
-string(6) "string"
Done
diff --git a/ext/standard/tests/general_functions/head.phpt b/ext/standard/tests/general_functions/head.phpt
index 059c56b258..f8d4c28338 100644
--- a/ext/standard/tests/general_functions/head.phpt
+++ b/ext/standard/tests/general_functions/head.phpt
@@ -1,11 +1,5 @@
--TEST--
header() and friends
---SKIPIF--
-<?php
-if (php_sapi_name() != "cli") {
- die("skip this test is for CLI");
-}
-?>
--FILE--
<?php
diff --git a/ext/standard/tests/general_functions/include_path.phpt b/ext/standard/tests/general_functions/include_path.phpt
index 23c5bc45aa..ffadbc280c 100644
--- a/ext/standard/tests/general_functions/include_path.phpt
+++ b/ext/standard/tests/general_functions/include_path.phpt
@@ -6,14 +6,9 @@ include_path=.
<?php
var_dump(get_include_path());
-var_dump(get_include_path("var"));
var_dump(restore_include_path());
-var_dump(restore_include_path(""));
-
-var_dump(set_include_path());
-var_dump(get_include_path());
var_dump(set_include_path("var"));
var_dump(get_include_path());
@@ -32,9 +27,6 @@ var_dump(get_include_path());
var_dump(restore_include_path());
var_dump(get_include_path());
-var_dump(set_include_path(array()));
-var_dump(get_include_path());
-
var_dump(restore_include_path());
var_dump(get_include_path());
@@ -44,21 +36,9 @@ echo "Done\n";
--EXPECTF--
string(1) "."
-Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Deprecated: Function restore_include_path() is deprecated in %s on line %d
-NULL
-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
-
-Warning: restore_include_path() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: set_include_path() expects exactly 1 parameter, 0 given in %s on line %d
NULL
string(1) "."
-string(1) "."
string(3) "var"
Deprecated: Function restore_include_path() is deprecated in %s on line %d
@@ -77,10 +57,6 @@ Deprecated: Function restore_include_path() is deprecated in %s on line %d
NULL
string(1) "."
-Warning: set_include_path() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-string(1) "."
-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
NULL
string(1) "."
diff --git a/ext/standard/tests/general_functions/intval.phpt b/ext/standard/tests/general_functions/intval.phpt
index 1650b91c6f..c56bdd7b94 100644
--- a/ext/standard/tests/general_functions/intval.phpt
+++ b/ext/standard/tests/general_functions/intval.phpt
@@ -146,13 +146,6 @@ foreach ($not_int_types as $type ) {
var_dump( intval($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( intval() );
-
-//arguments more than expected
-var_dump( intval(TRUE, FALSE, TRUE) );
-
echo "\n--- Done ---\n";
@@ -295,12 +288,4 @@ int(0)
int(0)
int(0)
-*** Testing error conditions ***
-
-Warning: intval() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: intval() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
--- Done ---
diff --git a/ext/standard/tests/general_functions/intval_variation1.phpt b/ext/standard/tests/general_functions/intval_variation1.phpt
index e76d7083d4..470fa03630 100644
--- a/ext/standard/tests/general_functions/intval_variation1.phpt
+++ b/ext/standard/tests/general_functions/intval_variation1.phpt
@@ -11,8 +11,8 @@ Test intval() function : usage variation
echo "*** Testing intval() : usage variation ***\n";
// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ if (error_reporting() & $err_no) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
@@ -108,7 +108,6 @@ foreach($inputs as $key =>$value) {
};
?>
-===DONE===
--EXPECTF--
*** Testing intval() : usage variation ***
@@ -200,4 +199,3 @@ int(0)
--unset var--
int(0)
-===DONE===
diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt
index 66e5b64934..200ecbd6ac 100644
--- a/ext/standard/tests/general_functions/is_array.phpt
+++ b/ext/standard/tests/general_functions/is_array.phpt
@@ -98,13 +98,6 @@ foreach ($varient_arrays as $type ) {
var_dump( is_array ($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_array() );
-
-//arguments more than expected
-var_dump( is_array ($fp, $fp) );
-
echo "Done\n";
/* close resources */
fclose($fp);
@@ -202,12 +195,4 @@ bool(false)
bool(false)
-- Iteration 29 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_array() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_array() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt
index 34d5e0ef6c..7c8d693a1b 100644
--- a/ext/standard/tests/general_functions/is_bool.phpt
+++ b/ext/standard/tests/general_functions/is_bool.phpt
@@ -127,13 +127,6 @@ foreach ($not_bool_types as $type ) {
var_dump( is_bool($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_bool() );
-
-//arguments more than expected
-var_dump( is_bool(TRUE, FALSE) );
-
echo "Done\n";
// close resources
@@ -283,12 +276,4 @@ bool(false)
bool(false)
-- Iteration 65 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_bool() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_bool() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_callable_basic1.phpt b/ext/standard/tests/general_functions/is_callable_basic1.phpt
index aa4c9aee23..50eb710e90 100644
--- a/ext/standard/tests/general_functions/is_callable_basic1.phpt
+++ b/ext/standard/tests/general_functions/is_callable_basic1.phpt
@@ -60,7 +60,6 @@ $defined_functions = array (
check_iscallable($defined_functions);
?>
-===DONE===
--EXPECT--
*** Testing is_callable() on defined functions ***
-- Iteration 1 --
@@ -103,4 +102,3 @@ Hello_World
bool(true)
bool(true)
Hello_World
-===DONE===
diff --git a/ext/standard/tests/general_functions/is_callable_basic2.phpt b/ext/standard/tests/general_functions/is_callable_basic2.phpt
index 7657875311..e744350cdb 100644
--- a/ext/standard/tests/general_functions/is_callable_basic2.phpt
+++ b/ext/standard/tests/general_functions/is_callable_basic2.phpt
@@ -124,7 +124,6 @@ foreach($objects as $object) {
}
?>
-===DONE===
--EXPECT--
*** Testing is_callable() on objects ***
@@ -207,12 +206,12 @@ object_class::func
bool(false)
object_class::func
-- Innerloop iteration 10 of Outerloop iteration 1 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 2 ---
-- Innerloop iteration 1 of Outerloop iteration 2 --
@@ -288,12 +287,12 @@ no_member_class::func
bool(false)
no_member_class::func
-- Innerloop iteration 10 of Outerloop iteration 2 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 3 ---
-- Innerloop iteration 1 of Outerloop iteration 3 --
@@ -369,12 +368,12 @@ contains_object_class::func
bool(true)
contains_object_class::func
-- Innerloop iteration 10 of Outerloop iteration 3 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 4 ---
-- Innerloop iteration 1 of Outerloop iteration 4 --
@@ -450,12 +449,12 @@ contains_object_class::func
bool(true)
contains_object_class::func
-- Innerloop iteration 10 of Outerloop iteration 4 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 5 ---
-- Innerloop iteration 1 of Outerloop iteration 5 --
@@ -531,12 +530,12 @@ object_class::func
bool(false)
object_class::func
-- Innerloop iteration 10 of Outerloop iteration 5 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 6 ---
-- Innerloop iteration 1 of Outerloop iteration 6 --
@@ -612,12 +611,12 @@ no_member_class::func
bool(false)
no_member_class::func
-- Innerloop iteration 10 of Outerloop iteration 6 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 7 ---
-- Innerloop iteration 1 of Outerloop iteration 7 --
@@ -693,12 +692,12 @@ object_class::func
bool(false)
object_class::func
-- Innerloop iteration 10 of Outerloop iteration 7 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
--- Outerloop iteration 8 ---
-- Innerloop iteration 1 of Outerloop iteration 8 --
@@ -774,11 +773,10 @@ Array
bool(false)
Array
-- Innerloop iteration 10 of Outerloop iteration 8 --
+bool(false)
bool(true)
-bool(true)
-bool(true)
+bool(false)
bool(true)
object_class::foo1
-bool(true)
+bool(false)
object_class::foo1
-===DONE===
diff --git a/ext/standard/tests/general_functions/is_callable_variation1.phpt b/ext/standard/tests/general_functions/is_callable_variation1.phpt
index 022c5a4549..4bb7f28a16 100644
--- a/ext/standard/tests/general_functions/is_callable_variation1.phpt
+++ b/ext/standard/tests/general_functions/is_callable_variation1.phpt
@@ -59,7 +59,6 @@ $undef_functions = array (
check_iscallable($undef_functions);
?>
-===DONE===
--EXPECT--
*** Testing is_callable() on undefined functions ***
-- Iteration 1 --
@@ -206,4 +205,3 @@ bool(true)
bool(false)
bool(false)
"echo()"
-===DONE===
diff --git a/ext/standard/tests/general_functions/is_callable_variation2.phpt b/ext/standard/tests/general_functions/is_callable_variation2.phpt
index af562d4ef1..2c53939545 100644
--- a/ext/standard/tests/general_functions/is_callable_variation2.phpt
+++ b/ext/standard/tests/general_functions/is_callable_variation2.phpt
@@ -57,7 +57,6 @@ check_iscallable($variants);
fclose($file_handle);
?>
-===DONE===
--EXPECTF--
*** Testing is_callable() on invalid function names ***
-- Iteration 1 --
@@ -148,4 +147,3 @@ Resource id #%d
bool(false)
bool(false)
Resource id #%d
-===DONE===
diff --git a/ext/standard/tests/general_functions/is_countable_with_variables.phpt b/ext/standard/tests/general_functions/is_countable_with_variables.phpt
index 700077ef17..0cb18769d6 100644
--- a/ext/standard/tests/general_functions/is_countable_with_variables.phpt
+++ b/ext/standard/tests/general_functions/is_countable_with_variables.phpt
@@ -7,7 +7,6 @@ Gabriel Caruso (carusogabriel34@gmail.com)
var_dump(is_countable([1, 2, 3]));
var_dump(is_countable((array) 1));
var_dump(is_countable((object) ['foo', 'bar', 'baz']));
-var_dump(is_countable());
$foo = ['', []];
@@ -24,9 +23,6 @@ if (!is_countable($bar)) {
bool(true)
bool(true)
bool(false)
-
-Warning: is_countable() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
int(2)
Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
diff --git a/ext/standard/tests/general_functions/is_float.phpt b/ext/standard/tests/general_functions/is_float.phpt
index 6d4ada6701..76cfa80565 100644
--- a/ext/standard/tests/general_functions/is_float.phpt
+++ b/ext/standard/tests/general_functions/is_float.phpt
@@ -127,17 +127,6 @@ foreach ($not_floats as $value ) {
var_dump( @is_real($value) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_float() );
-var_dump( is_double() );
-var_dump( is_real() );
-
-//arguments more than expected
-var_dump( is_float( $floats[0], $floats[1]) );
-var_dump( is_double( $floats[0], $floats[1]) );
-var_dump( is_real( $floats[0], $floats[1]) );
-
echo "Done\n";
// close the resources used
@@ -417,28 +406,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_float() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Deprecated: Function is_real() is deprecated in %s on line %d
-
-Warning: is_real() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_float() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Deprecated: Function is_real() is deprecated in %s on line %d
-
-Warning: is_real() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_float_64bit.phpt b/ext/standard/tests/general_functions/is_float_64bit.phpt
index be5843a7d5..dc6df0f109 100644
--- a/ext/standard/tests/general_functions/is_float_64bit.phpt
+++ b/ext/standard/tests/general_functions/is_float_64bit.phpt
@@ -129,17 +129,6 @@ foreach ($not_floats as $value ) {
var_dump( @is_real($value) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_float() );
-var_dump( is_double() );
-var_dump( is_real() );
-
-//arguments more than expected
-var_dump( is_float( $floats[0], $floats[1]) );
-var_dump( is_double( $floats[0], $floats[1]) );
-var_dump( is_real( $floats[0], $floats[1]) );
-
echo "Done\n";
?>
--EXPECTF--
@@ -414,28 +403,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_float() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Deprecated: Function is_real() is deprecated in %s on line %d
-
-Warning: is_real() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_float() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_double() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Deprecated: Function is_real() is deprecated in %s on line %d
-
-Warning: is_real() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt
index 4cfbf653be..25e6c2564e 100644
--- a/ext/standard/tests/general_functions/is_int.phpt
+++ b/ext/standard/tests/general_functions/is_int.phpt
@@ -132,17 +132,6 @@ foreach ($not_int_types as $type ) {
var_dump( is_long($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_int() );
-var_dump( is_integer() );
-var_dump( is_long() );
-
-//arguments more than expected
-var_dump( is_int(TRUE, FALSE) );
-var_dump( is_integer(TRUE, FALSE) );
-var_dump( is_long(TRUE, FALSE) );
-
echo "Done\n";
// close the resources
@@ -442,24 +431,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_int() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_int() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt
index dabc7be705..e5c6ce77e0 100644
--- a/ext/standard/tests/general_functions/is_int_64bit.phpt
+++ b/ext/standard/tests/general_functions/is_int_64bit.phpt
@@ -134,17 +134,6 @@ foreach ($not_int_types as $type ) {
var_dump( is_long($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_int() );
-var_dump( is_integer() );
-var_dump( is_long() );
-
-//arguments more than expected
-var_dump( is_int(TRUE, FALSE) );
-var_dump( is_integer(TRUE, FALSE) );
-var_dump( is_long(TRUE, FALSE) );
-
echo "Done\n";
?>
--EXPECTF--
@@ -439,24 +428,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_int() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_int() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_integer() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: is_long() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt
index 9082f5fcd1..4fc325c744 100644
--- a/ext/standard/tests/general_functions/is_null.phpt
+++ b/ext/standard/tests/general_functions/is_null.phpt
@@ -127,13 +127,6 @@ foreach ($not_null_types as $type ) {
var_dump( is_null($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_null() );
-
-//arguments more than expected
-var_dump( is_null(NULL, null) );
-
echo "Done\n";
// close the resources used
@@ -285,12 +278,4 @@ bool(false)
bool(false)
-- Iteration 59 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_null() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_null() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt
index c23e5e3b8c..491aa5d15b 100644
--- a/ext/standard/tests/general_functions/is_numeric.phpt
+++ b/ext/standard/tests/general_functions/is_numeric.phpt
@@ -145,13 +145,6 @@ foreach ($not_numerics as $type ) {
var_dump( is_numeric($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_numeric() );
-
-//arguments more than expected
-var_dump( is_numeric("10", "20") );
-
echo "Done\n";
// close the resources used
@@ -373,12 +366,4 @@ bool(false)
bool(false)
-- Iteration 29 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_numeric() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_numeric() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt
index 96c515bf65..dd0e7689fd 100644
--- a/ext/standard/tests/general_functions/is_object.phpt
+++ b/ext/standard/tests/general_functions/is_object.phpt
@@ -138,13 +138,6 @@ foreach ($not_objects as $type ) {
var_dump( is_object($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_object() );
-
-//arguments more than expected
-var_dump( is_object($myClass_object, $myClass_object) );
-
echo "Done\n";
// close the resources used
@@ -216,12 +209,4 @@ bool(false)
bool(false)
-- Iteration 19 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_object() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_object() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/is_resource_basic.phpt b/ext/standard/tests/general_functions/is_resource_basic.phpt
index 75f4e4a8d8..f8e9ff6369 100644
--- a/ext/standard/tests/general_functions/is_resource_basic.phpt
+++ b/ext/standard/tests/general_functions/is_resource_basic.phpt
@@ -68,7 +68,6 @@ if (is_resource($res)) {
?>
-===DONE===
--EXPECTF--
*** Testing is_resource() : basic functionality ***
@@ -89,4 +88,3 @@ Resource type..after file open is_resource() returns TRUE
Resource type..var_dump after file close returns
resource(%d) of type (Unknown)
Resource type..after file close is_resource() returns FALSE
-===DONE===
diff --git a/ext/standard/tests/general_functions/is_scalar.phpt b/ext/standard/tests/general_functions/is_scalar.phpt
index 53620178c4..f7ef3f5317 100644
--- a/ext/standard/tests/general_functions/is_scalar.phpt
+++ b/ext/standard/tests/general_functions/is_scalar.phpt
@@ -105,14 +105,6 @@ foreach( $variation_array as $value ) {
var_dump( is_scalar($value) );
}
-echo "\n*** Testing error conditions ***\n";
-// Zero arguments
-var_dump( is_scalar() );
-
-// Arguments more than expected
-var_dump( is_scalar( $scalar_variables[2], $scalar_variables[2]) );
-var_dump( is_scalar( new stdclass, new stdclass) );
-
echo "Done\n";
// close the resources used
@@ -226,15 +218,4 @@ bool(false)
bool(false)
-- Iteration 18 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_scalar() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: is_scalar() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: is_scalar() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt
index ea2fb36a24..a062cc17e1 100644
--- a/ext/standard/tests/general_functions/is_string.phpt
+++ b/ext/standard/tests/general_functions/is_string.phpt
@@ -140,13 +140,6 @@ foreach ($not_strings as $type ) {
var_dump( is_string($type) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( is_string() );
-
-//arguments more than expected
-var_dump( is_string("string", "test") );
-
echo "Done\n";
// close the resources used
@@ -292,12 +285,4 @@ bool(false)
bool(false)
-- Iteration 45 --
bool(false)
-
-*** Testing error conditions ***
-
-Warning: is_string() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: is_string() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/general_functions/isset_basic1.phpt b/ext/standard/tests/general_functions/isset_basic1.phpt
index bdaf1eb46d..7990810467 100644
--- a/ext/standard/tests/general_functions/isset_basic1.phpt
+++ b/ext/standard/tests/general_functions/isset_basic1.phpt
@@ -40,7 +40,6 @@ echo "Null test: " . (isset($n) ? "YES": "NO") . "\n";
echo "Object test: " . (isset($obj) ? "YES": "NO") . "\n";
echo "Resource test: " . (isset($res) ? "YES": "NO") . "\n";
?>
-===DONE===
--EXPECT--
*** Testing isset() : basic functionality ***
Integer test: YES
@@ -63,4 +62,3 @@ Boolean test: NO
Null test: NO
Object test: NO
Resource test: NO
-===DONE===
diff --git a/ext/standard/tests/general_functions/isset_basic2.phpt b/ext/standard/tests/general_functions/isset_basic2.phpt
index 925b19a2c0..586203d4ee 100644
--- a/ext/standard/tests/general_functions/isset_basic2.phpt
+++ b/ext/standard/tests/general_functions/isset_basic2.phpt
@@ -38,7 +38,6 @@ var_dump(isset($var[1]));
var_dump(isset($var, $var[1]));
?>
-===DONE===
--EXPECT--
*** Testing isset() : basic functionality ***
Test multiple scalar variables in a group
@@ -57,4 +56,3 @@ bool(false)
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/general_functions/ob_get_flush_basic.phpt b/ext/standard/tests/general_functions/ob_get_flush_basic.phpt
index 1c62340970..b724b3c91c 100644
--- a/ext/standard/tests/general_functions/ob_get_flush_basic.phpt
+++ b/ext/standard/tests/general_functions/ob_get_flush_basic.phpt
@@ -27,7 +27,6 @@ $string = ob_get_flush();
var_dump($string)
?>
-===DONE===
--EXPECT--
*** Testing ob_get_flush() : basic functionality ***
testing ob_get_flush() with some
@@ -39,4 +38,3 @@ Newlines too
array(0) {
}
string(0) ""
-===DONE===
diff --git a/ext/standard/tests/general_functions/ob_get_flush_error.phpt b/ext/standard/tests/general_functions/ob_get_flush_error.phpt
index 0664043eba..d070c50c60 100644
--- a/ext/standard/tests/general_functions/ob_get_flush_error.phpt
+++ b/ext/standard/tests/general_functions/ob_get_flush_error.phpt
@@ -12,21 +12,12 @@ output_buffering=0
echo "*** Testing ob_get_flush() : error conditions ***\n";
-// One extra argument
-$extra_arg = 10;
-var_dump( ob_get_flush( $extra_arg ) );
-
// No ob_start() executed
var_dump( ob_get_flush() );
?>
-===DONE===
--EXPECTF--
*** Testing ob_get_flush() : error conditions ***
-Warning: ob_get_flush() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
Notice: ob_get_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/general_functions/ob_get_length_basic.phpt b/ext/standard/tests/general_functions/ob_get_length_basic.phpt
index b3470bec55..12e0a72026 100644
--- a/ext/standard/tests/general_functions/ob_get_length_basic.phpt
+++ b/ext/standard/tests/general_functions/ob_get_length_basic.phpt
@@ -31,11 +31,7 @@ dump_string_length( ' lsf' );
dump_string_length( '' );
dump_string_length( null );
-// Extra argument
-var_dump( ob_get_length( 'foobar' ) );
-
?>
-===DONE===
--EXPECTF--
*** Testing ob_get_length() : basic functionality ***
bool(false)
@@ -45,7 +41,3 @@ int(1)
int(15)
int(0)
int(0)
-
-Warning: ob_get_length() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/ob_start_closures.phpt b/ext/standard/tests/general_functions/ob_start_closures.phpt
index ba730961bd..c4b5fcc50d 100644
--- a/ext/standard/tests/general_functions/ob_start_closures.phpt
+++ b/ext/standard/tests/general_functions/ob_start_closures.phpt
@@ -27,7 +27,6 @@ ob_end_flush();
echo $str1, $str2;
?>
-===DONE===
--EXPECT--
*** Testing ob_start() : closures as output handlers ***
Output (1): Output (2): Test
@@ -36,4 +35,3 @@ Test
With newlines
Output (2): Test
With newlines
-===DONE===
diff --git a/ext/standard/tests/general_functions/parse_ini_file.phpt b/ext/standard/tests/general_functions/parse_ini_file.phpt
index 368d262a6e..201bb481fc 100644
--- a/ext/standard/tests/general_functions/parse_ini_file.phpt
+++ b/ext/standard/tests/general_functions/parse_ini_file.phpt
@@ -8,8 +8,6 @@ parse_ini_file() multiple calls
$filename = __DIR__."/parse_ini_file.dat";
@unlink($filename); /* Make sure the file really does not exist! */
-var_dump(parse_ini_file());
-var_dump(parse_ini_file(1,1,1,1));
var_dump(parse_ini_file($filename));
var_dump(parse_ini_file($filename, true));
@@ -121,16 +119,10 @@ var_dump(parse_ini_file($filename, true));
echo "Done\n";
?>
--EXPECTF--
-Warning: parse_ini_file() expects at least 1 parameter, 0 given in %sparse_ini_file.php on line 6
+Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line %d
bool(false)
-Warning: parse_ini_file() expects at most 3 parameters, 4 given in %sparse_ini_file.php on line 7
-bool(false)
-
-Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line 8
-bool(false)
-
-Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line 9
+Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line %d
bool(false)
array(1) {
["test"]=>
@@ -138,11 +130,11 @@ array(1) {
}
Warning: syntax error, unexpected '='%sparse_ini_file.dat on line 2
- in %sparse_ini_file.php on line 20
+ in %sparse_ini_file.php on line %d
bool(false)
Warning: syntax error, unexpected '='%sparse_ini_file.dat on line 2
- in %sparse_ini_file.php on line 26
+ in %sparse_ini_file.php on line %d
bool(false)
array(1) {
["test"]=>
diff --git a/ext/standard/tests/general_functions/parse_ini_string_002.phpt b/ext/standard/tests/general_functions/parse_ini_string_002.phpt
index 106cd0c842..384398cdb2 100644
--- a/ext/standard/tests/general_functions/parse_ini_string_002.phpt
+++ b/ext/standard/tests/general_functions/parse_ini_string_002.phpt
@@ -3,9 +3,6 @@ parse_ini_string() multiple calls
--FILE--
<?php
-var_dump(parse_ini_string());
-var_dump(parse_ini_string(1,1,1,1));
-
$ini = "
test =
";
@@ -87,11 +84,6 @@ var_dump(parse_ini_string($ini, true));
echo "Done\n";
?>
--EXPECTF--
-Warning: parse_ini_string() expects at least 1 parameter, 0 given in %s
-bool(false)
-
-Warning: parse_ini_string() expects at most 3 parameters, 4 given in %s
-bool(false)
array(1) {
["test"]=>
string(0) ""
diff --git a/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt b/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt
index 8362fb84d1..359e9c3446 100644
--- a/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt
+++ b/ext/standard/tests/general_functions/parse_ini_string_bug76068.phpt
@@ -16,7 +16,6 @@ $s = parse_ini_string("[foo]\nbar=42|>baz",true, \INI_SCANNER_TYPED);
var_dump($s);
?>
-==DONE==
--EXPECT--
array(1) {
["foo"]=>
@@ -46,4 +45,3 @@ array(1) {
string(2) "42"
}
}
-==DONE==
diff --git a/ext/standard/tests/general_functions/php_uname_basic.phpt b/ext/standard/tests/general_functions/php_uname_basic.phpt
index 629318d725..b4fb78e6ea 100644
--- a/ext/standard/tests/general_functions/php_uname_basic.phpt
+++ b/ext/standard/tests/general_functions/php_uname_basic.phpt
@@ -20,7 +20,6 @@ var_dump(php_uname('v'));
var_dump(php_uname('m'));
?>
-===DONE===
--EXPECTF--
*** Testing php_uname() - basic test
string(%d) "%s"
@@ -32,4 +31,3 @@ string(%d) "%s"
string(%d) "%s"
string(%d) "%s"
string(%d) "%s"
-===DONE===
diff --git a/ext/standard/tests/general_functions/php_uname_error.phpt b/ext/standard/tests/general_functions/php_uname_error.phpt
index 392e1c930e..23859a33ac 100644
--- a/ext/standard/tests/general_functions/php_uname_error.phpt
+++ b/ext/standard/tests/general_functions/php_uname_error.phpt
@@ -8,49 +8,13 @@ Test php_uname() function - error conditions - pass function incorrect argument
echo "*** Testing php_uname() - error test\n";
-echo "\n-- Testing php_uname() function with more than expected no. of arguments --\n";
-var_dump( php_uname('a', true) );
-
echo "\n-- Testing php_uname() function with invalid mode --\n";
// am invalid mode should result in same o/p as mode 'a'
var_dump( php_uname('z') == php_uname('z') );
-class barClass {
-}
-
-$fp = fopen(__FILE__, "r");
-
-echo "\n-- Testing php_uname() function with invalid argument types --\n";
-var_dump(php_uname(array()));
-var_dump(php_uname(array('color' => 'red', 'item' => 'pen')));
-var_dump(php_uname(new barClass()));
-var_dump(php_uname($fp));
-
-fclose($fp);
?>
-===DONE===
--EXPECTF--
*** Testing php_uname() - error test
--- Testing php_uname() function with more than expected no. of arguments --
-
-Warning: php_uname() expects at most 1 parameter, 2 given in %s on line %d
-NULL
-
-- Testing php_uname() function with invalid mode --
bool(true)
-
--- Testing php_uname() function with invalid argument types --
-
-Warning: php_uname() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: php_uname() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: php_uname() expects parameter 1 to be string, object given in %s on line %d
-NULL
-
-Warning: php_uname() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/phpcredits.phpt b/ext/standard/tests/general_functions/phpcredits.phpt
index 044232570e..dfcddc61f3 100644
--- a/ext/standard/tests/general_functions/phpcredits.phpt
+++ b/ext/standard/tests/general_functions/phpcredits.phpt
@@ -4,7 +4,6 @@ phpcredits()
<?php
var_dump(phpcredits());
-var_dump(phpcredits(array()));
echo "--\n";
var_dump(phpcredits(0));
@@ -40,9 +39,6 @@ PHP Quality Assurance Team
%wWebsites and Infrastructure team%w
%a
bool(true)
-
-Warning: phpcredits() expects parameter 1 to be int, array given in %sphpcredits.php on line 4
-NULL
--
PHP Credits
bool(true)
diff --git a/ext/standard/tests/general_functions/phpcredits2.phpt b/ext/standard/tests/general_functions/phpcredits2.phpt
index 9966f23a96..6aa023e919 100644
--- a/ext/standard/tests/general_functions/phpcredits2.phpt
+++ b/ext/standard/tests/general_functions/phpcredits2.phpt
@@ -6,7 +6,6 @@ dummy=x
<?php
var_dump(phpcredits());
-var_dump(phpcredits(array()));
echo "--\n";
var_dump(phpcredits(0));
@@ -18,9 +17,6 @@ var_dump(phpcredits(CREDITS_GROUP));
--EXPECTF--
<!DOCTYPE %a>%s</html>
bool(true)
-
-Warning: phpcredits() expects parameter 1 to be int, array given in %sphpcredits2.php on line 4
-NULL
--
<h1>PHP Credits</h1>
bool(true)
diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt
index a805876aab..5f4d99ffba 100644
--- a/ext/standard/tests/general_functions/phpinfo.phpt
+++ b/ext/standard/tests/general_functions/phpinfo.phpt
@@ -5,9 +5,6 @@ phpinfo()
var_dump(phpinfo());
echo "--\n";
-var_dump(phpinfo(array()));
-
-echo "--\n";
var_dump(phpinfo(0));
echo "--\n";
@@ -62,10 +59,6 @@ PHP License
%A
bool(true)
--
-
-Warning: phpinfo() expects parameter 1 to be int, array given in %sphpinfo.php on line 5
-NULL
---
phpinfo()
bool(true)
--
diff --git a/ext/standard/tests/general_functions/phpinfo2.phpt b/ext/standard/tests/general_functions/phpinfo2.phpt
index f422f923d9..5a36aa9d28 100644
--- a/ext/standard/tests/general_functions/phpinfo2.phpt
+++ b/ext/standard/tests/general_functions/phpinfo2.phpt
@@ -7,9 +7,6 @@ dummy=x
var_dump(phpinfo());
echo "--\n";
-var_dump(phpinfo(array()));
-
-echo "--\n";
var_dump(phpinfo(0));
echo "--\n";
@@ -20,10 +17,6 @@ var_dump(phpinfo(INFO_LICENSE));
<!DOCTYPE %s>
%a</html>bool(true)
--
-
-Warning: phpinfo() expects parameter 1 to be int, array given in %sphpinfo2.php on line 5
-NULL
---
<!DOCTYPE %s>
%a</html>bool(true)
--
diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt
index bcf5231144..cdb9f338a8 100644
--- a/ext/standard/tests/general_functions/print_r.phpt
+++ b/ext/standard/tests/general_functions/print_r.phpt
@@ -271,24 +271,6 @@ $misc_values = array (
/* calling check_printr() to display miscelleneous data using print_r() */
check_printr($misc_values);
-/* checking print_r() on functions */
-echo "\n*** Testing print_r() on anonymous functions ***\n";
-$newfunc = create_function('$a,$b', 'return "$a * $b = " . ($a * $b);');
-echo "New anonymous function: $newfunc\n";
-print_r( $newfunc(2, 3) );
-/* creating anonymous function dynamically */
-print_r( create_function('$a', 'return "$a * $a = " . ($a * $b);') );
-
-echo "\n\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump( print_r() );
-
-//passing more than required no. of arguments
-var_dump( print_r(123, true, "abc") );
-
-// check when second arg is given other than boolean TRUE
-var_dump( print_r ($value, "string") );
-
/* closing resource handle used */
closedir($dir_handle);
@@ -1714,23 +1696,4 @@ Array
-- Iteration 4 --
-
-*** Testing print_r() on anonymous functions ***
-
-Deprecated: Function create_function() is deprecated in %s on line %d
-New anonymous function:
-2 * 3 = 6
-Deprecated: Function create_function() is deprecated in %s on line %d
-
-
-*** Testing error conditions ***
-
-Warning: print_r() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: print_r() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: value in %s on line %d
-string(0) ""
Done
diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt
index 8584f08758..71f2b5d64c 100644
--- a/ext/standard/tests/general_functions/print_r_64bit.phpt
+++ b/ext/standard/tests/general_functions/print_r_64bit.phpt
@@ -275,24 +275,6 @@ $misc_values = array (
/* calling check_printr() to display miscelleneous data using print_r() */
check_printr($misc_values);
-/* checking print_r() on functions */
-echo "\n*** Testing print_r() on anonymous functions ***\n";
-$newfunc = create_function('$a,$b', 'return "$a * $b = " . ($a * $b);');
-echo "New anonymous function: $newfunc\n";
-print_r( $newfunc(2, 3) );
-/* creating anonymous function dynamically */
-print_r( create_function('$a', 'return "$a * $a = " . ($a * $b);') );
-
-echo "\n\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump( print_r() );
-
-//passing more than required no. of arguments
-var_dump( print_r(123, true, "abc") );
-
-// check when second arg is given other than boolean TRUE
-var_dump( print_r ($value, "string") );
-
/* closing resource handle used */
closedir($dir_handle);
@@ -1718,23 +1700,4 @@ Array
-- Iteration 4 --
-
-*** Testing print_r() on anonymous functions ***
-
-Deprecated: Function create_function() is deprecated in %s on line %d
-New anonymous function:
-2 * 3 = 6
-Deprecated: Function create_function() is deprecated in %s on line %d
-
-
-*** Testing error conditions ***
-
-Warning: print_r() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: print_r() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-
-Notice: Undefined variable: value in %s on line %d
-string(0) ""
Done
diff --git a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt
index 87a4545501..37f8e17af2 100644
--- a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt
+++ b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt
@@ -8,10 +8,6 @@ if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
die('skip: Only for Windows');
}
-if (PHP_SAPI != 'cli') {
- die('skip: Only for CLI');
-}
-
if (getenv('SKIP_SLOW_TESTS')) {
doe('skip: Slow test');
}
diff --git a/ext/standard/tests/general_functions/proc_open-mb0.phpt b/ext/standard/tests/general_functions/proc_open-mb0.phpt
index 4ff38267ad..672a8cd357 100644
--- a/ext/standard/tests/general_functions/proc_open-mb0.phpt
+++ b/ext/standard/tests/general_functions/proc_open-mb0.phpt
@@ -2,7 +2,6 @@
proc_open with bypass_shell subprocess parameter passing
--SKIPIF--
<?php
-if (php_sapi_name() != "cli") die('skip CLI only test');
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
--FILE--
@@ -39,7 +38,6 @@ proc_close($p);
echo $out;
?>
-==DONE==
--EXPECTF--
array(4) {
[0]=>
@@ -51,4 +49,3 @@ array(4) {
[3]=>
string(14) "карамба"
}
-==DONE==
diff --git a/ext/standard/tests/general_functions/proc_open-mb1.phpt b/ext/standard/tests/general_functions/proc_open-mb1.phpt
index e7a7a4cbfc..af46346fbb 100644
--- a/ext/standard/tests/general_functions/proc_open-mb1.phpt
+++ b/ext/standard/tests/general_functions/proc_open-mb1.phpt
@@ -2,7 +2,6 @@
proc_open without bypass_shell subprocess parameter passing
--SKIPIF--
<?php
-if (php_sapi_name() != "cli") die('skip CLI only test');
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
--FILE--
@@ -36,7 +35,6 @@ proc_close($p);
echo $out;
?>
-==DONE==
--EXPECTF--
array(4) {
[0]=>
@@ -48,4 +46,3 @@ array(4) {
[3]=>
string(14) "карамба"
}
-==DONE==
diff --git a/ext/standard/tests/general_functions/putenv.phpt b/ext/standard/tests/general_functions/putenv.phpt
index ab2c1b41f7..c1f4f98eeb 100644
--- a/ext/standard/tests/general_functions/putenv.phpt
+++ b/ext/standard/tests/general_functions/putenv.phpt
@@ -15,8 +15,17 @@ var_dump(getenv($var_name));
var_dump(putenv($var_name));
var_dump(getenv($var_name));
-var_dump(putenv("=123"));
-var_dump(putenv(""));
+try {
+ putenv("=123");
+} catch (ValueError $exception) {
+ echo $exception->getMessage() . "\n";
+}
+
+try {
+ putenv("");
+} catch (ValueError $exception) {
+ echo $exception->getMessage() . "\n";
+}
echo "Done\n";
?>
@@ -28,10 +37,6 @@ bool(true)
string(0) ""
bool(true)
bool(false)
-
-Warning: putenv(): Invalid parameter syntax in %s on line %d
-bool(false)
-
-Warning: putenv(): Invalid parameter syntax in %s on line %d
-bool(false)
+Invalid parameter syntax
+Invalid parameter syntax
Done
diff --git a/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt b/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt
index 69c455d076..9a92bef794 100644
--- a/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt
+++ b/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt
@@ -34,7 +34,6 @@ var_dump(putenv('FOO=°¡a°¡°¡°¡'), getenv("FOO"));
var_dump(putenv('FOO=°¡a°¡°¡°¡°¡'), getenv("FOO"));
?>
-===DONE===
--EXPECT--
bool(true)
string(2) "°¡"
@@ -58,4 +57,3 @@ bool(true)
string(9) "°¡a°¡°¡°¡"
bool(true)
string(11) "°¡a°¡°¡°¡°¡"
-===DONE===
diff --git a/ext/standard/tests/general_functions/putenv_bug75574_utf8.phpt b/ext/standard/tests/general_functions/putenv_bug75574_utf8.phpt
index ea8a0ab119..edf4c72f44 100644
--- a/ext/standard/tests/general_functions/putenv_bug75574_utf8.phpt
+++ b/ext/standard/tests/general_functions/putenv_bug75574_utf8.phpt
@@ -23,7 +23,6 @@ var_dump(putenv('FOO=å•Šaå•Šå•Šå•Š'), getenv("FOO"));
var_dump(putenv('FOO=å•Šaå•Šå•Šå•Šå•Š'), getenv("FOO"));
?>
-===DONE===
--EXPECT--
bool(true)
string(3) "å•Š"
@@ -47,4 +46,3 @@ bool(true)
string(13) "å•Šaå•Šå•Šå•Š"
bool(true)
string(16) "å•Šaå•Šå•Šå•Šå•Š"
-===DONE===
diff --git a/ext/standard/tests/general_functions/rand.phpt b/ext/standard/tests/general_functions/rand.phpt
index e6639a71c7..73dec4eb75 100644
--- a/ext/standard/tests/general_functions/rand.phpt
+++ b/ext/standard/tests/general_functions/rand.phpt
@@ -4,60 +4,36 @@ rand() and mt_rand() tests
<?php
var_dump(mt_rand());
-var_dump(mt_rand(-1));
var_dump(mt_rand(-1,1));
var_dump(mt_rand(0,3));
var_dump(rand());
-var_dump(rand(-1));
var_dump(rand(-1,1));
var_dump(rand(0,3));
var_dump(srand());
var_dump(srand(-1));
-var_dump(srand(array()));
var_dump(mt_srand());
var_dump(mt_srand(-1));
-var_dump(mt_srand(array()));
var_dump(getrandmax());
-var_dump(getrandmax(1));
var_dump(mt_getrandmax());
-var_dump(mt_getrandmax(1));
echo "Done\n";
?>
--EXPECTF--
int(%d)
-
-Warning: mt_rand() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
int(%i)
int(%d)
int(%d)
-
-Warning: rand() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
int(%i)
int(%d)
NULL
NULL
-
-Warning: srand() expects parameter 1 to be int, array given in %s on line %d
-NULL
-NULL
NULL
-
-Warning: mt_srand() expects parameter 1 to be int, array given in %s on line %d
NULL
int(%d)
-
-Warning: getrandmax() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
int(%d)
-
-Warning: mt_getrandmax() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/general_functions/register_tick_function_error.phpt b/ext/standard/tests/general_functions/register_tick_function_error.phpt
new file mode 100644
index 0000000000..b71f1ea5d5
--- /dev/null
+++ b/ext/standard/tests/general_functions/register_tick_function_error.phpt
@@ -0,0 +1,14 @@
+--TEST--
+register_tick_function only accepts a valid callback as parameter
+--FILE--
+<?php
+declare(ticks=1);
+
+try {
+ register_tick_function("a");
+} catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+}
+?>
+--EXPECT--
+Invalid tick callback 'a' passed
diff --git a/ext/standard/tests/general_functions/sleep_basic.phpt b/ext/standard/tests/general_functions/sleep_basic.phpt
index 0ef0e7c213..3c7bcdfc09 100644
--- a/ext/standard/tests/general_functions/sleep_basic.phpt
+++ b/ext/standard/tests/general_functions/sleep_basic.phpt
@@ -20,7 +20,7 @@ set_time_limit(20);
$time_start = microtime(true);
// Sleep for a while
-sleep($sleeptime);
+$result = sleep($sleeptime);
// Test passes if sleeps for at least 98% of specified time
$sleeplow = $sleeptime - ($sleeptime * 2 /100);
@@ -29,6 +29,7 @@ $time_end = microtime(true);
$time = $time_end - $time_start;
echo "Thread slept for " . $time . " seconds\n";
+echo "Return value: " . $result . "\n";
if ($time >= $sleeplow) {
echo "TEST PASSED\n";
@@ -36,9 +37,8 @@ if ($time >= $sleeplow) {
echo "TEST FAILED - time is ${time} secs and sleep was ${sleeptime} secs\n";
}
?>
-===DONE===
--EXPECTF--
*** Testing sleep() : basic functionality ***
Thread slept for %f seconds
+Return value: 0
TEST PASSED
-===DONE===
diff --git a/ext/standard/tests/general_functions/sleep_error.phpt b/ext/standard/tests/general_functions/sleep_error.phpt
index c4f069a3d2..4bf3e9fefc 100644
--- a/ext/standard/tests/general_functions/sleep_error.phpt
+++ b/ext/standard/tests/general_functions/sleep_error.phpt
@@ -2,43 +2,13 @@
Test sleep() function : error conditions
--FILE--
<?php
-/* Prototype : int sleep ( int $seconds )
- * Description: Delays the program execution for the given number of seconds .
- * Source code: ext/standard/basic_functions.c
- */
- set_time_limit(20);
-echo "*** Testing sleep() : error conditions ***\n";
-
-echo "\n-- Testing sleep() function with zero arguments --\n";
-var_dump( sleep() );
-
-echo "\n-- Testing sleep() function with more than expected no. of arguments --\n";
-$seconds = 10;
-$extra_arg = 10;
-var_dump( sleep($seconds, $extra_arg) );
-
-echo "\n-- Testing sleep() function with negative interval --\n";
-$seconds = -10;
-var_dump( sleep($seconds) );
+sleep(-10);
?>
-===DONE===
--EXPECTF--
-*** Testing sleep() : error conditions ***
-
--- Testing sleep() function with zero arguments --
-
-Warning: sleep() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing sleep() function with more than expected no. of arguments --
-
-Warning: sleep() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
--- Testing sleep() function with negative interval --
-
-Warning: sleep(): Number of seconds must be greater than or equal to 0 in %s on line %d
-bool(false)
-===DONE===
+Fatal error: Uncaught ValueError: Number of seconds must be greater than or equal to 0 in %s
+Stack trace:
+#0 %s(%d): sleep(-10)
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/general_functions/strval.phpt b/ext/standard/tests/general_functions/strval.phpt
index e904fdcaa0..a75ac12272 100644
--- a/ext/standard/tests/general_functions/strval.phpt
+++ b/ext/standard/tests/general_functions/strval.phpt
@@ -141,13 +141,6 @@ foreach ($not_scalars as $value ) {
var_dump( strval($value) );
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_dump( strval() );
-
-//arguments more than expected
-var_dump( strval( $scalars[0], $scalars[1]) );
-
echo "Done\n";
// close the resources used
@@ -284,19 +277,19 @@ string(14) "Resource id #%d"
string(14) "Resource id #%d"
-- Iteration 4 --
-Notice: Array to string conversion in %sstrval.php on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 5 --
-Notice: Array to string conversion in %sstrval.php on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 6 --
-Notice: Array to string conversion in %sstrval.php on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 7 --
-Notice: Array to string conversion in %sstrval.php on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 8 --
string(0) ""
@@ -306,12 +299,4 @@ string(0) ""
string(0) ""
-- Iteration 11 --
string(0) ""
-
-*** Testing error conditions ***
-
-Warning: strval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: strval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/general_functions/sys_getloadavg.phpt b/ext/standard/tests/general_functions/sys_getloadavg.phpt
index 5763084f70..1775978a12 100644
--- a/ext/standard/tests/general_functions/sys_getloadavg.phpt
+++ b/ext/standard/tests/general_functions/sys_getloadavg.phpt
@@ -7,14 +7,11 @@ if (!function_exists("sys_getloadavg")) die("skip");
--FILE--
<?php
-var_dump(sys_getloadavg(""));
var_dump(sys_getloadavg());
echo "Done\n";
?>
--EXPECTF--
-Warning: sys_getloadavg() expects exactly 0 parameters, %d given in %s
-NULL
array(3) {
[0]=>
float(%f)
diff --git a/ext/standard/tests/general_functions/uniqid_basic.phpt b/ext/standard/tests/general_functions/uniqid_basic.phpt
index 285365ab60..66cfdf8f97 100644
--- a/ext/standard/tests/general_functions/uniqid_basic.phpt
+++ b/ext/standard/tests/general_functions/uniqid_basic.phpt
@@ -34,7 +34,6 @@ for ($i = 0; $i < count($prefix); $i++) {
}
?>
-===DONE===
--EXPECTF--
*** Testing uniqid() : basic functionality ***
@@ -69,4 +68,3 @@ string(13) "%s"
string(23) "%s.%s"
string(13) "%s"
-===DONE===
diff --git a/ext/standard/tests/general_functions/usleep_basic.phpt b/ext/standard/tests/general_functions/usleep_basic.phpt
index 776d634ea4..d057d47c11 100644
--- a/ext/standard/tests/general_functions/usleep_basic.phpt
+++ b/ext/standard/tests/general_functions/usleep_basic.phpt
@@ -35,8 +35,6 @@ if ($time >= $sleeplow) {
echo "TEST FAILED: $summary";
}
?>
-===DONE===
--EXPECTF--
*** Testing usleep() : basic functionality ***
TEST PASSED: Thread slept for %f micro-seconds
-===DONE===
diff --git a/ext/standard/tests/general_functions/usleep_error.phpt b/ext/standard/tests/general_functions/usleep_error.phpt
index 474aab7d5d..25bc0b6866 100644
--- a/ext/standard/tests/general_functions/usleep_error.phpt
+++ b/ext/standard/tests/general_functions/usleep_error.phpt
@@ -2,44 +2,13 @@
Test usleep() function : error conditions
--FILE--
<?php
-/* Prototype : void usleep ( int $micro_seconds )
- * Description: Delays program execution for the given number of micro seconds.
- * Source code: ext/standard/basic_functions.c
- */
-set_time_limit(20);
-
-echo "*** Testing usleep() : error conditions ***\n";
-
-echo "\n-- Testing usleep() function with zero arguments --\n";
-var_dump( usleep() );
-
-echo "\n-- Testing usleep() function with more than expected no. of arguments --\n";
-$seconds = 10;
-$extra_arg = 10;
-var_dump( usleep($seconds, $extra_arg) );
-
-echo "\n-- Testing usleep() function with negative interval --\n";
-$seconds = -10;
-var_dump( usleep($seconds) );
+usleep(-10);
?>
-===DONE===
--EXPECTF--
-*** Testing usleep() : error conditions ***
-
--- Testing usleep() function with zero arguments --
-
-Warning: usleep() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing usleep() function with more than expected no. of arguments --
-
-Warning: usleep() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Testing usleep() function with negative interval --
-
-Warning: usleep(): Number of microseconds must be greater than or equal to 0 in %s on line %d
-bool(false)
-===DONE===
+Fatal error: Uncaught ValueError: Number of microseconds must be greater than or equal to 0 in %s
+Stack trace:
+#0 %s(%d): usleep(-10)
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt
index 4641051541..336abbdf9f 100644
--- a/ext/standard/tests/general_functions/var_dump.phpt
+++ b/ext/standard/tests/general_functions/var_dump.phpt
@@ -274,18 +274,6 @@ echo "\n*** Testing var_dump() on multiple arguments ***\n";
var_dump( $integers, $floats, $strings, $arrays, $booleans, $resources,
$objects, $misc_values, $variations );
-/* checking var_dump() on functions */
-echo "\n*** Testing var_dump() on anonymous functions ***\n";
-$newfunc = create_function('$a,$b', 'return "$a * $b = " . ($a * $b);');
-echo "New anonymous function: $newfunc\n";
-var_dump( $newfunc(2, 3) );
-/* creating anonymous function dynamically */
-var_dump( create_function('$a', 'return "$a * $a = " . ($a * $b);') );
-
-echo "\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump();
-
/* closing resource handle used */
closedir($dir_handle);
@@ -1561,17 +1549,4 @@ array(6) {
string(5) "/00\7"
}
}
-
-*** Testing var_dump() on anonymous functions ***
-
-Deprecated: Function create_function() is deprecated in %s on line %d
-New anonymous function:
-string(9) "2 * 3 = 6"
-
-Deprecated: Function create_function() is deprecated in %s on line %d
-string(9) "
-
-*** Testing error conditions ***
-
-Warning: var_dump() expects at least 1 parameter, 0 given in %s on line %d
Done
diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt
index 738de410e4..cd74d585bc 100644
--- a/ext/standard/tests/general_functions/var_dump_64bit.phpt
+++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt
@@ -274,18 +274,6 @@ echo "\n*** Testing var_dump() on multiple arguments ***\n";
var_dump( $integers, $floats, $strings, $arrays, $booleans, $resources,
$objects, $misc_values, $variations );
-/* checking var_dump() on functions */
-echo "\n*** Testing var_dump() on anonymous functions ***\n";
-$newfunc = create_function('$a,$b', 'return "$a * $b = " . ($a * $b);');
-echo "New anonymous function: $newfunc\n";
-var_dump( $newfunc(2, 3) );
-/* creating anonymous function dynamically */
-var_dump( create_function('$a', 'return "$a * $a = " . ($a * $b);') );
-
-echo "\n*** Testing error conditions ***\n";
-//passing zero argument
-var_dump();
-
/* closing resource handle used */
closedir($dir_handle);
@@ -1561,17 +1549,4 @@ array(6) {
string(5) "/00\7"
}
}
-
-*** Testing var_dump() on anonymous functions ***
-
-Deprecated: Function create_function() is deprecated in %s on line %d
-New anonymous function:
-string(9) "2 * 3 = 6"
-
-Deprecated: Function create_function() is deprecated in %s on line %d
-string(9) "
-
-*** Testing error conditions ***
-
-Warning: var_dump() expects at least 1 parameter, 0 given in %s on line %d
Done
diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt
index 61d94f83f4..3512006624 100644
--- a/ext/standard/tests/general_functions/var_export-locale.phpt
+++ b/ext/standard/tests/general_functions/var_export-locale.phpt
@@ -303,14 +303,7 @@ echo "\n";
$counter++;
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_export( var_export() );
-
-//arguments more than expected
-var_export( var_export(TRUE, FALSE, TRUE) );
-
-echo "\n\nDone";
+echo "\nDone";
?>
@@ -1138,11 +1131,4 @@ NULL
string(4) "NULL"
-*** Testing error conditions ***
-
-Warning: var_export() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-Warning: var_export() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
Done
diff --git a/ext/standard/tests/general_functions/var_export-locale_32.phpt b/ext/standard/tests/general_functions/var_export-locale_32.phpt
index af9efd9e24..311b6395cd 100644
--- a/ext/standard/tests/general_functions/var_export-locale_32.phpt
+++ b/ext/standard/tests/general_functions/var_export-locale_32.phpt
@@ -303,14 +303,7 @@ echo "\n";
$counter++;
}
-echo "\n*** Testing error conditions ***\n";
-//Zero argument
-var_export( var_export() );
-
-//arguments more than expected
-var_export( var_export(TRUE, FALSE, TRUE) );
-
-echo "\n\nDone";
+echo "\nDone";
?>
@@ -1138,11 +1131,4 @@ NULL
string(4) "NULL"
-*** Testing error conditions ***
-
-Warning: var_export() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-Warning: var_export() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
Done
diff --git a/ext/standard/tests/general_functions/var_export_basic1.phpt b/ext/standard/tests/general_functions/var_export_basic1.phpt
index 18fa404c29..f97fab2396 100644
--- a/ext/standard/tests/general_functions/var_export_basic1.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic1.phpt
@@ -49,7 +49,6 @@ foreach($valid_ints as $key => $int_value) {
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with integer values ***
@@ -144,4 +143,3 @@ string(11) "-2147483648"
2147483647
2147483647
string(10) "2147483647"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic1_32.phpt b/ext/standard/tests/general_functions/var_export_basic1_32.phpt
index 95596800d6..61e69c6315 100644
--- a/ext/standard/tests/general_functions/var_export_basic1_32.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic1_32.phpt
@@ -49,7 +49,6 @@ foreach($valid_ints as $key => $int_value) {
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with integer values ***
@@ -144,4 +143,3 @@ string(13) "-2147483647-1"
2147483647
2147483647
string(10) "2147483647"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic2.phpt b/ext/standard/tests/general_functions/var_export_basic2.phpt
index 29c3a138f9..87e92f20fd 100644
--- a/ext/standard/tests/general_functions/var_export_basic2.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic2.phpt
@@ -32,7 +32,6 @@ foreach($valid_bool as $key => $bool_value) {
echo "\n";
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with valid boolean values ***
@@ -73,4 +72,3 @@ false
false
string(5) "false"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic3.phpt b/ext/standard/tests/general_functions/var_export_basic3.phpt
index b66d2c4584..38618faea9 100644
--- a/ext/standard/tests/general_functions/var_export_basic3.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic3.phpt
@@ -47,7 +47,6 @@ foreach($valid_floats as $key => $float_value) {
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with valid float values ***
@@ -172,4 +171,3 @@ string(22) "5.0000000000000001E+42"
3.4000000000000001E-33
string(22) "3.4000000000000001E-33"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic4.phpt b/ext/standard/tests/general_functions/var_export_basic4.phpt
index b99f4584a6..c1b7b8cb5b 100644
--- a/ext/standard/tests/general_functions/var_export_basic4.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic4.phpt
@@ -43,7 +43,6 @@ foreach($valid_strings as $key => $str) {
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with valid strings ***
@@ -144,4 +143,3 @@ string(7) "'\\060'"
'8'
string(3) "'8'"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic5.phpt b/ext/standard/tests/general_functions/var_export_basic5.phpt
index ab81fa802e..989197a23d 100644
--- a/ext/standard/tests/general_functions/var_export_basic5.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic5.phpt
@@ -43,7 +43,6 @@ foreach($valid_arrays as $key => $arr) {
echo "\n";
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with valid arrays ***
@@ -276,4 +275,3 @@ string(41) "array (
1 => 'test',
)"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic6.phpt b/ext/standard/tests/general_functions/var_export_basic6.phpt
index 6eff478d70..a120f2fd1a 100644
--- a/ext/standard/tests/general_functions/var_export_basic6.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic6.phpt
@@ -101,7 +101,6 @@ foreach($valid_objects as $key => $obj) {
echo "\n";
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with valid objects ***
@@ -307,4 +306,3 @@ concreteClass::__set_state(array(
string(36) "concreteClass::__set_state(array(
))"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_basic7.phpt b/ext/standard/tests/general_functions/var_export_basic7.phpt
index 817ffc91f0..928721b926 100644
--- a/ext/standard/tests/general_functions/var_export_basic7.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic7.phpt
@@ -33,7 +33,6 @@ foreach($valid_nulls as $key => $null_value) {
echo "\n";
}
?>
-===DONE===
--EXPECT--
*** Testing var_export() with valid null values ***
@@ -56,4 +55,3 @@ NULL
NULL
string(4) "NULL"
-===DONE===
diff --git a/ext/standard/tests/general_functions/var_export_error2.phpt b/ext/standard/tests/general_functions/var_export_error2.phpt
index eedb757d20..83dd2aa297 100644
--- a/ext/standard/tests/general_functions/var_export_error2.phpt
+++ b/ext/standard/tests/general_functions/var_export_error2.phpt
@@ -8,11 +8,10 @@ Test var_export() function : error conditions - recursive object
* Alias to functions:
*/
-@$obj->p =& $obj;
+$obj = new stdClass;
+$obj->p =& $obj;
var_export($obj, true);
?>
-===DONE===
--EXPECTF--
-Warning: var_export does not handle circular references in %s on line 9
-===DONE===
+Warning: var_export does not handle circular references in %s on line 10
diff --git a/ext/standard/tests/general_functions/var_export_error3.phpt b/ext/standard/tests/general_functions/var_export_error3.phpt
index 38b5dbc28c..7c2bc54ef3 100644
--- a/ext/standard/tests/general_functions/var_export_error3.phpt
+++ b/ext/standard/tests/general_functions/var_export_error3.phpt
@@ -12,7 +12,5 @@ $a[] =& $a;
var_export($a, true);
?>
-===DONE===
--EXPECTF--
Warning: var_export does not handle circular references in %s on line 9
-===DONE===
diff --git a/ext/standard/tests/http/bug69337.phpt b/ext/standard/tests/http/bug69337.phpt
index 8de8187485..223a4def7d 100644
--- a/ext/standard/tests/http/bug69337.phpt
+++ b/ext/standard/tests/http/bug69337.phpt
@@ -32,8 +32,6 @@ $f = file_get_contents('http://127.0.0.1:22345/', 0, $ctx);
http_server_kill($pid);
var_dump($f);
?>
-==DONE==
--EXPECTF--
Warning: file_get_contents(http://127.0.0.1:22345/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found%ain %s on line %d
bool(false)
-==DONE==
diff --git a/ext/standard/tests/http/bug75535.phpt b/ext/standard/tests/http/bug75535.phpt
index 9bf298cc06..57a75a3ee5 100644
--- a/ext/standard/tests/http/bug75535.phpt
+++ b/ext/standard/tests/http/bug75535.phpt
@@ -19,7 +19,6 @@ var_dump($http_response_header);
http_server_kill($pid);
?>
-==DONE==
--EXPECT--
string(0) ""
array(2) {
@@ -28,4 +27,3 @@ array(2) {
[1]=>
string(14) "Content-Length"
}
-==DONE==
diff --git a/ext/standard/tests/http/http_response_header_01.phpt b/ext/standard/tests/http/http_response_header_01.phpt
index d364ebd153..9772c09b02 100644
--- a/ext/standard/tests/http/http_response_header_01.phpt
+++ b/ext/standard/tests/http/http_response_header_01.phpt
@@ -23,7 +23,6 @@ test();
http_server_kill($pid);
?>
-==DONE==
--EXPECT--
string(4) "Body"
array(3) {
@@ -34,4 +33,3 @@ array(3) {
[2]=>
string(12) "Some: Header"
}
-==DONE==
diff --git a/ext/standard/tests/http/http_response_header_02.phpt b/ext/standard/tests/http/http_response_header_02.phpt
index 518ae9167b..0868672b01 100644
--- a/ext/standard/tests/http/http_response_header_02.phpt
+++ b/ext/standard/tests/http/http_response_header_02.phpt
@@ -25,7 +25,6 @@ test();
http_server_kill($pid);
?>
-==DONE==
--EXPECT--
string(4) "Body"
array(5) {
@@ -40,4 +39,3 @@ array(5) {
[4]=>
string(12) "Some: Header"
}
-==DONE==
diff --git a/ext/standard/tests/http/http_response_header_03.phpt b/ext/standard/tests/http/http_response_header_03.phpt
index 907983ac4b..dedd2c3550 100644
--- a/ext/standard/tests/http/http_response_header_03.phpt
+++ b/ext/standard/tests/http/http_response_header_03.phpt
@@ -25,7 +25,6 @@ test();
http_server_kill($pid);
?>
-==DONE==
--EXPECTF--
Warning: file_get_contents(http://127.0.0.1:22348/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found%a
bool(false)
@@ -41,4 +40,3 @@ array(5) {
[4]=>
string(12) "Some: Header"
}
-==DONE==
diff --git a/ext/standard/tests/http/http_response_header_04.phpt b/ext/standard/tests/http/http_response_header_04.phpt
index 98badf9997..0d518327aa 100644
--- a/ext/standard/tests/http/http_response_header_04.phpt
+++ b/ext/standard/tests/http/http_response_header_04.phpt
@@ -23,7 +23,6 @@ test();
http_server_kill($pid);
?>
-==DONE==
--EXPECT--
string(4) "Body"
array(2) {
@@ -32,4 +31,3 @@ array(2) {
[1]=>
string(14) "Some: Header"
}
-==DONE==
diff --git a/ext/standard/tests/http/http_response_header_05.phpt b/ext/standard/tests/http/http_response_header_05.phpt
index dbdd7b8b1a..97c275413d 100644
--- a/ext/standard/tests/http/http_response_header_05.phpt
+++ b/ext/standard/tests/http/http_response_header_05.phpt
@@ -23,7 +23,6 @@ test();
http_server_kill($pid);
?>
-==DONE==
--EXPECT--
string(4) "Body"
array(2) {
@@ -32,4 +31,3 @@ array(2) {
[1]=>
string(0) ""
}
-==DONE==
diff --git a/ext/standard/tests/image/bug71848.phpt b/ext/standard/tests/image/bug71848.phpt
index d96ac1c537..25c05689e6 100644
--- a/ext/standard/tests/image/bug71848.phpt
+++ b/ext/standard/tests/image/bug71848.phpt
@@ -5,7 +5,6 @@ Bug #71848 (getimagesize with $imageinfo returns false)
var_dump(getimagesize(__DIR__ . '/bug71848.jpg', $info));
var_dump(array_keys($info));
?>
-===DONE===
--EXPECT--
array(7) {
[0]=>
@@ -29,4 +28,3 @@ array(2) {
[1]=>
string(4) "APP5"
}
-===DONE===
diff --git a/ext/standard/tests/image/bug72278.phpt b/ext/standard/tests/image/bug72278.phpt
index 6c5dfa8777..292aaf0952 100644
--- a/ext/standard/tests/image/bug72278.phpt
+++ b/ext/standard/tests/image/bug72278.phpt
@@ -6,7 +6,6 @@ define('FILENAME', __DIR__ . DIRECTORY_SEPARATOR . 'bug72278.jpg');
var_dump(getimagesize(FILENAME));
?>
-===DONE===
--EXPECTF--
Warning: getimagesize(): corrupt JPEG data: 3 extraneous bytes before marker in %s%ebug72278.php on line %d
array(7) {
@@ -25,4 +24,3 @@ array(7) {
["mime"]=>
string(10) "image/jpeg"
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_basic.phpt b/ext/standard/tests/image/getimagesize_basic.phpt
index 8e03ff2e53..ad857243d7 100644
--- a/ext/standard/tests/image/getimagesize_basic.phpt
+++ b/ext/standard/tests/image/getimagesize_basic.phpt
@@ -45,7 +45,6 @@ foreach($imagetype_filenames as $key => $filename) {
var_dump( $info );
};
?>
-===DONE===
--EXPECTF--
*** Testing getimagesize() : basic functionality ***
@@ -216,4 +215,3 @@ array(6) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_jpgapp.phpt b/ext/standard/tests/image/getimagesize_jpgapp.phpt
index 2776c8617a..74fd4e57d7 100644
--- a/ext/standard/tests/image/getimagesize_jpgapp.phpt
+++ b/ext/standard/tests/image/getimagesize_jpgapp.phpt
@@ -23,9 +23,7 @@ foreach ($arr as $key => $value) {
}
?>
-===DONE===
--EXPECT--
APP1 - length: 1717; md5: 02cbf4ba6640c131422483138c968516
APP2 - length: 7275; md5: f5036ccca2031e8bf932bcbd4aca4355
APP13 - length: 42; md5: 2202998bd05e78bcb419f08c070d6f61
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_tif_mm.phpt b/ext/standard/tests/image/getimagesize_tif_mm.phpt
index 8fb7ceb87a..6d76c2bb06 100644
--- a/ext/standard/tests/image/getimagesize_tif_mm.phpt
+++ b/ext/standard/tests/image/getimagesize_tif_mm.phpt
@@ -13,7 +13,6 @@ var_dump(getimagesize(__DIR__ . "/2x2mm.tiff", $arr));
var_dump($arr);
?>
-===DONE===
--EXPECT--
*** Testing getimagesize() : tiff_mm format ***
array(5) {
@@ -30,4 +29,3 @@ array(5) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_variation2.phpt b/ext/standard/tests/image/getimagesize_variation2.phpt
index c475a9cb05..6419881abc 100644
--- a/ext/standard/tests/image/getimagesize_variation2.phpt
+++ b/ext/standard/tests/image/getimagesize_variation2.phpt
@@ -8,8 +8,8 @@ Test getimagesize() function : usage variations - unexpected type for arg 2
* Alias to functions:
*/
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
+ echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
@@ -78,11 +78,10 @@ foreach($values as $key => $value) {
};
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing getimagesize() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(%d)
-Error: 8 - Undefined variable: unset_var, %s(%d)
+Error: 2 - Undefined variable: undefined_var
+Error: 2 - Undefined variable: unset_var
-- Arg value 0 --
string(28) "4a46494600010201006000600000"
@@ -158,4 +157,3 @@ string(28) "4a46494600010201006000600000"
-- Arg value unset_var --
string(28) "4a46494600010201006000600000"
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_variation3.phpt b/ext/standard/tests/image/getimagesize_variation3.phpt
index a608047707..20efd1afbc 100644
--- a/ext/standard/tests/image/getimagesize_variation3.phpt
+++ b/ext/standard/tests/image/getimagesize_variation3.phpt
@@ -32,7 +32,6 @@ foreach($file_types_array as $key => $filename) {
var_dump( $info );
};
?>
-===DONE===
--EXPECTF--
*** Testing getimagesize() : variation ***
@@ -60,11 +59,10 @@ array(0) {
-- Empty File (blank_file.bmp) --
-Notice: getimagesize(): Read error! in %s on line %d
+Notice: getimagesize(): Error reading from %s! in %s on line %d
bool(false)
-Notice: getimagesize(): Read error! in %s on line %d
+Notice: getimagesize(): Error reading from %s! in %s on line %d
bool(false)
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_variation4.phpt b/ext/standard/tests/image/getimagesize_variation4.phpt
index 526e35c305..d2e2c84554 100644
--- a/ext/standard/tests/image/getimagesize_variation4.phpt
+++ b/ext/standard/tests/image/getimagesize_variation4.phpt
@@ -18,7 +18,6 @@ echo "*** Testing getimagesize() : variation ***\n";
var_dump( getimagesize(__DIR__."/test13pix.swf", $info) );
var_dump( $info );
?>
-===DONE===
--EXPECT--
*** Testing getimagesize() : variation ***
array(5) {
@@ -35,4 +34,3 @@ array(5) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_variation_005.phpt b/ext/standard/tests/image/getimagesize_variation_005.phpt
index 79d2de03e9..93a8648c11 100644
--- a/ext/standard/tests/image/getimagesize_variation_005.phpt
+++ b/ext/standard/tests/image/getimagesize_variation_005.phpt
@@ -18,7 +18,6 @@ echo "*** Testing getimagesize() : basic functionality ***\n";
var_dump( getimagesize(__DIR__."/test13pix.swf", $info) );
var_dump( $info );
?>
-===DONE===
--EXPECT--
*** Testing getimagesize() : basic functionality ***
array(5) {
@@ -35,4 +34,3 @@ array(5) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_wbmp.phpt b/ext/standard/tests/image/getimagesize_wbmp.phpt
index 268a7b7b08..d0b0852a26 100644
--- a/ext/standard/tests/image/getimagesize_wbmp.phpt
+++ b/ext/standard/tests/image/getimagesize_wbmp.phpt
@@ -13,7 +13,6 @@ var_dump(getimagesize(__DIR__ . "/75x50.wbmp", $arr));
var_dump($arr);
?>
-===DONE===
--EXPECT--
*** Testing getimagesize() : wbmp format ***
array(5) {
@@ -30,4 +29,3 @@ array(5) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/getimagesize_xbm.phpt b/ext/standard/tests/image/getimagesize_xbm.phpt
index 6520cdb46e..bf8bdf924d 100644
--- a/ext/standard/tests/image/getimagesize_xbm.phpt
+++ b/ext/standard/tests/image/getimagesize_xbm.phpt
@@ -13,7 +13,6 @@ var_dump(getimagesize(__DIR__ . "/75x50.xbm", $arr));
var_dump($arr);
?>
-===DONE===
--EXPECT--
*** Testing getimagesize() : xbm format ***
array(5) {
@@ -30,4 +29,3 @@ array(5) {
}
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/image/image_type_to_extension.phpt b/ext/standard/tests/image/image_type_to_extension.phpt
index 8418a4b8c7..249df57943 100644
--- a/ext/standard/tests/image/image_type_to_extension.phpt
+++ b/ext/standard/tests/image/image_type_to_extension.phpt
@@ -29,12 +29,8 @@ image_type_to_extension()
printf("Constant: %s\n\tWith dot: %s\n\tWithout dot: %s\n", $name, image_type_to_extension($constant), image_type_to_extension($constant, false));
}
- var_dump(image_type_to_extension(-1, array()));
- var_dump(image_type_to_extension(new stdclass));
var_dump(image_type_to_extension(1000000, NULL));
- var_dump(image_type_to_extension());
var_dump(image_type_to_extension(0));
- var_dump(image_type_to_extension(0, 0, 0));
?>
Done
--EXPECTF--
@@ -89,18 +85,6 @@ Constant: IMAGETYPE_XBM
Constant: IMAGETYPE_WEBP
With dot: .webp
Without dot: webp
-
-Warning: image_type_to_extension() expects parameter 2 to be bool, array given in %s on line %d
-bool(false)
-
-Warning: image_type_to_extension() expects parameter 1 to be int, object given in %s on line %d
-bool(false)
bool(false)
-
-Warning: image_type_to_extension() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-bool(false)
-
-Warning: image_type_to_extension() expects at most 2 parameters, 3 given in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation2.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation2.phpt
index 6043c81180..5123f373a7 100644
--- a/ext/standard/tests/image/image_type_to_mime_type_variation2.phpt
+++ b/ext/standard/tests/image/image_type_to_mime_type_variation2.phpt
@@ -38,7 +38,6 @@ foreach($values as $value) {
$iterator++;
};
?>
-===DONE===
--EXPECT--
*** Testing image_type_to_mime_type() : usage variations ***
@@ -77,4 +76,3 @@ string(24) "application/octet-stream"
-- Iteration 12 --
string(24) "application/octet-stream"
-===DONE===
diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
index d8366c15e3..ac77faad33 100644
--- a/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
+++ b/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
@@ -16,7 +16,6 @@ for($imagetype = 0; $imagetype <= IMAGETYPE_COUNT; ++$imagetype) {
var_dump(image_type_to_mime_type($imagetype));
}
?>
-===DONE===
--EXPECTREGEX--
\*\*\* Testing image_type_to_mime_type\(\) : usage variations \*\*\*
@@ -79,4 +78,3 @@ string\(10\) "image\/webp"
-- Iteration 19 --
string\(24\) "application\/octet-stream"
-===DONE===
diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation4.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation4.phpt
index 8ec2e37ae1..baaca4650a 100644
--- a/ext/standard/tests/image/image_type_to_mime_type_variation4.phpt
+++ b/ext/standard/tests/image/image_type_to_mime_type_variation4.phpt
@@ -21,9 +21,7 @@ error_reporting(E_ALL ^ E_NOTICE);
var_dump( image_type_to_mime_type(IMAGETYPE_ICO) );
var_dump( image_type_to_mime_type(IMAGETYPE_SWC) );
?>
-===DONE===
--EXPECT--
*** Testing image_type_to_mime_type() : usage variations ***
string(24) "image/vnd.microsoft.icon"
string(29) "application/x-shockwave-flash"
-===DONE===
diff --git a/ext/standard/tests/mail/bug51604.phpt b/ext/standard/tests/mail/bug51604.phpt
index 988849c4e1..8b4b1f3c52 100644
--- a/ext/standard/tests/mail/bug51604.phpt
+++ b/ext/standard/tests/mail/bug51604.phpt
@@ -24,7 +24,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECT--
bool(true)
To: user@example.com
@@ -32,4 +31,3 @@ Subject: Test Subject
KHeaders
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/bug66535.phpt b/ext/standard/tests/mail/bug66535.phpt
index 09dad37ad6..72558f902a 100644
--- a/ext/standard/tests/mail/bug66535.phpt
+++ b/ext/standard/tests/mail/bug66535.phpt
@@ -31,7 +31,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECTF--
*** Testing mail() : send email without additional headers ***
bool(true)
@@ -40,4 +39,3 @@ Subject: Test Subject
X-PHP-Originating-Script: %d:bug66535.php
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/bug69115.phpt b/ext/standard/tests/mail/bug69115.phpt
index 98ece49769..dd128a9dc7 100644
--- a/ext/standard/tests/mail/bug69115.phpt
+++ b/ext/standard/tests/mail/bug69115.phpt
@@ -11,7 +11,5 @@ smtp_port =
$message = "Line 1\r\nLine 2\r\nLine 3";
mail('user@example.com', 'My Subject', $message, "From: me@me.me");
?>
-===DONE===
--EXPECTREGEX--
.*
-===DONE===
diff --git a/ext/standard/tests/mail/bug69874.phpt b/ext/standard/tests/mail/bug69874.phpt
index 45cfd0d32f..5bbf113f6d 100644
--- a/ext/standard/tests/mail/bug69874.phpt
+++ b/ext/standard/tests/mail/bug69874.phpt
@@ -31,7 +31,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECT--
*** Testing mail() : send email without additional headers ***
bool(true)
@@ -39,4 +38,3 @@ To: user@company.com
Subject: Test Subject
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/bug69874_2.phpt b/ext/standard/tests/mail/bug69874_2.phpt
index e35d1c367e..a3aabc855e 100644
--- a/ext/standard/tests/mail/bug69874_2.phpt
+++ b/ext/standard/tests/mail/bug69874_2.phpt
@@ -31,7 +31,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECTF--
*** Testing mail() : send email without additional headers ***
bool(true)
@@ -40,4 +39,3 @@ Subject: Test Subject
X-PHP-Originating-Script: %d:bug69874_2.php
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/bug73203.phpt b/ext/standard/tests/mail/bug73203.phpt
index c3f22d36d5..1f32b7db94 100644
--- a/ext/standard/tests/mail/bug73203.phpt
+++ b/ext/standard/tests/mail/bug73203.phpt
@@ -18,7 +18,5 @@ var_dump(
mail('test@example.com', 'subject', 'message', 'From: lala@example.com', '')
);
?>
-===DONE===
--EXPECT--
bool(true)
-===DONE===
diff --git a/ext/standard/tests/mail/ezmlm_hash_basic.phpt b/ext/standard/tests/mail/ezmlm_hash_basic.phpt
index aa1f4c63c9..31c1019c7a 100644
--- a/ext/standard/tests/mail/ezmlm_hash_basic.phpt
+++ b/ext/standard/tests/mail/ezmlm_hash_basic.phpt
@@ -13,7 +13,6 @@ var_dump(ezmlm_hash("webmaster@somewhere.com"));
var_dump(ezmlm_hash("foo@somewhere.com"));
?>
-===Done===
--EXPECTF--
*** Testing ezmlm_hash() : basic functionality ***
@@ -22,4 +21,3 @@ int(1)
Deprecated: Function ezmlm_hash() is deprecated in %s on line %d
int(7)
-===Done===
diff --git a/ext/standard/tests/mail/mail_basic.phpt b/ext/standard/tests/mail/mail_basic.phpt
index ddc5571c7e..9afef0b65a 100644
--- a/ext/standard/tests/mail/mail_basic.phpt
+++ b/ext/standard/tests/mail/mail_basic.phpt
@@ -40,7 +40,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECT--
*** Testing mail() : basic functionality ***
-- All Mail Content Parameters --
@@ -57,4 +56,3 @@ To: user@example.com
Subject: Test Subject
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic2.phpt b/ext/standard/tests/mail/mail_basic2.phpt
index aa1e0b1ecd..bee44f9f6b 100644
--- a/ext/standard/tests/mail/mail_basic2.phpt
+++ b/ext/standard/tests/mail/mail_basic2.phpt
@@ -35,7 +35,6 @@ var_dump( mail($to, $subject, $message, $additional_headers, $additional_paramet
echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
-- extra parameters --
@@ -45,4 +44,3 @@ bool(true)
%w3%wKHeaders
%w4%w
%w5%wA Message
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic3.phpt b/ext/standard/tests/mail/mail_basic3.phpt
index 3bab805649..57aacfa865 100644
--- a/ext/standard/tests/mail/mail_basic3.phpt
+++ b/ext/standard/tests/mail/mail_basic3.phpt
@@ -27,9 +27,7 @@ $message = 'A Message';
echo "-- failure --\n";
var_dump( mail($to, $subject, $message) );
?>
-===DONE===
--EXPECT--
*** Testing mail() : basic functionality ***
-- failure --
bool(false)
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic4.phpt b/ext/standard/tests/mail/mail_basic4.phpt
index c7f8ff9824..9424ad0400 100644
--- a/ext/standard/tests/mail/mail_basic4.phpt
+++ b/ext/standard/tests/mail/mail_basic4.phpt
@@ -28,9 +28,7 @@ echo "-- failure --\n";
var_dump( mail($to, $subject, $message) );
?>
-===DONE===
--EXPECT--
*** Testing mail() : basic functionality ***
-- failure --
bool(false)
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic5.phpt b/ext/standard/tests/mail/mail_basic5.phpt
index c6cc005dd5..37e0d5ba3d 100644
--- a/ext/standard/tests/mail/mail_basic5.phpt
+++ b/ext/standard/tests/mail/mail_basic5.phpt
@@ -26,9 +26,7 @@ $message = 'A Message';
echo "-- failure --\n";
var_dump( mail($to, $subject, $message) );
?>
-===DONE===
--EXPECT--
*** Testing mail() : basic functionality ***
-- failure --
bool(false)
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic6.phpt b/ext/standard/tests/mail/mail_basic6.phpt
index f9eab07e61..e7af072ff5 100644
--- a/ext/standard/tests/mail/mail_basic6.phpt
+++ b/ext/standard/tests/mail/mail_basic6.phpt
@@ -220,7 +220,6 @@ echo @file_get_contents($outFile);
@unlink($outFile);
?>
-===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
-- Valid Header --
@@ -326,4 +325,3 @@ HEAD1: a
HEAD2: b
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic7.phpt b/ext/standard/tests/mail/mail_basic7.phpt
index 0b2cdc2c4f..c19fcfa24e 100644
--- a/ext/standard/tests/mail/mail_basic7.phpt
+++ b/ext/standard/tests/mail/mail_basic7.phpt
@@ -125,7 +125,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
@@ -215,4 +214,3 @@ foo5|: bar1
foo9: %&$#!
A Message
-===DONE===
diff --git a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt
index 9f06e09854..c48634e99c 100644
--- a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt
+++ b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt
@@ -84,11 +84,9 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
--EXPECTF--
*** Testing mail() : basic functionality ***
Msg sent OK
Id of msg just sent is %d
.. delete it
TEST PASSED: Msgs sent and deleted OK
-===Done===
diff --git a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt
index 498554f947..3aff59a614 100644
--- a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt
+++ b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt
@@ -81,11 +81,9 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
--EXPECTF--
*** Testing mail() : basic functionality ***
Msg sent OK
Id of msg just sent is %d
.. delete it
TEST PASSED: Msgs sent and deleted OK
-===Done===
diff --git a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt
index 172474b1d0..52d48937ed 100644
--- a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt
+++ b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt
@@ -81,11 +81,9 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
--EXPECTF--
*** Testing mail() : basic functionality ***
Msg sent OK
Id of msg just sent is %d
.. delete it
TEST PASSED: Msgs sent and deleted OK
-===Done===
diff --git a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt
index 9e7cbc5802..a677312442 100644
--- a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt
+++ b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt
@@ -82,11 +82,9 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
--EXPECTF--
*** Testing mail() : basic functionality ***
Msg sent OK
Id of msg just sent is %d
.. delete it
TEST PASSED: Msgs sent and deleted OK
-===Done===
diff --git a/ext/standard/tests/mail/mail_variation1.phpt b/ext/standard/tests/mail/mail_variation1.phpt
index fd40f97b68..3e4d346b0b 100644
--- a/ext/standard/tests/mail/mail_variation1.phpt
+++ b/ext/standard/tests/mail/mail_variation1.phpt
@@ -23,8 +23,6 @@ $subject = 'Test Subject';
$message = 'A Message';
var_dump( mail($to, $subject, $message) );
?>
-===DONE===
--EXPECT--
*** Testing mail() : variation ***
bool(false)
-===DONE===
diff --git a/ext/standard/tests/mail/mail_variation2.phpt b/ext/standard/tests/mail/mail_variation2.phpt
index 7e78bcfade..9ab8071b4b 100644
--- a/ext/standard/tests/mail/mail_variation2.phpt
+++ b/ext/standard/tests/mail/mail_variation2.phpt
@@ -32,7 +32,6 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
-===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
bool(true)
@@ -40,4 +39,3 @@ bool(true)
%w2%wSubject: Test Subject
%w3%w
%w4%wA Message
-===DONE===
diff --git a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt
index bd259667c2..92a59477d0 100644
--- a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt
+++ b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt
@@ -83,7 +83,7 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
+===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
diff --git a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt
index c0698076e1..06c16eb5f8 100644
--- a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt
+++ b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt
@@ -83,7 +83,7 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
+===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
diff --git a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt
index fe961d3d16..44eda4555b 100644
--- a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt
+++ b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt
@@ -82,7 +82,7 @@ if (!$found) {
imap_close($imap_stream, CL_EXPUNGE);
?>
-===Done===
+===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
diff --git a/ext/standard/tests/math/abs_basic.phpt b/ext/standard/tests/math/abs_basic.phpt
index 5c3f8ff8ea..1866097c3e 100644
--- a/ext/standard/tests/math/abs_basic.phpt
+++ b/ext/standard/tests/math/abs_basic.phpt
@@ -31,7 +31,6 @@ for ($i = 0; $i < count($values); $i++) {
var_dump($res);
}
?>
-===Done===
--EXPECT--
*** Testing abs() : basic functionality ***
int(23)
@@ -48,4 +47,3 @@ float(23.45)
int(0)
int(1)
int(0)
-===Done===
diff --git a/ext/standard/tests/math/abs_basiclong_64bit.phpt b/ext/standard/tests/math/abs_basiclong_64bit.phpt
index 0f0cb5d55c..f3e72b062a 100644
--- a/ext/standard/tests/math/abs_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/abs_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
int(9223372036854775807)
@@ -57,4 +56,3 @@ float(9.2233720368548E+18)
int(9223372036854775807)
--- testing: -9.2233720368548E+18 ---
float(9.2233720368548E+18)
-===DONE===
diff --git a/ext/standard/tests/math/abs_variation.phpt b/ext/standard/tests/math/abs_variation.phpt
index fd671855e1..f27a73559a 100644
--- a/ext/standard/tests/math/abs_variation.phpt
+++ b/ext/standard/tests/math/abs_variation.phpt
@@ -73,14 +73,17 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(abs($input) );
+ try {
+ var_dump(abs($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
---EXPECTF--
+--EXPECT--
*** Testing abs() : usage variations ***
-- Iteration 1 --
@@ -102,27 +105,25 @@ int(1)
int(0)
-- Iteration 7 --
-int(0)
+abs() expects parameter 1 to be int or float, string given
-- Iteration 8 --
-int(0)
+abs() expects parameter 1 to be int or float, string given
-- Iteration 9 --
-bool(false)
+abs() expects parameter 1 to be int or float, array given
-- Iteration 10 --
-int(0)
+abs() expects parameter 1 to be int or float, string given
-- Iteration 11 --
-int(0)
+abs() expects parameter 1 to be int or float, string given
-- Iteration 12 --
-int(0)
+abs() expects parameter 1 to be int or float, string given
-- Iteration 13 --
-
-Notice: Object of class classA could not be converted to number in %s on line %d
-int(1)
+abs() expects parameter 1 to be int or float, object given
-- Iteration 14 --
int(0)
@@ -131,5 +132,4 @@ int(0)
int(0)
-- Iteration 16 --
-int(%d)
-===Done===
+abs() expects parameter 1 to be int or float, resource given
diff --git a/ext/standard/tests/math/acos_basiclong_64bit.phpt b/ext/standard/tests/math/acos_basiclong_64bit.phpt
index a32180cd1b..89cc9763d5 100644
--- a/ext/standard/tests/math/acos_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/acos_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(NAN)
@@ -57,4 +56,3 @@ float(NAN)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/acos_variation.phpt b/ext/standard/tests/math/acos_variation.phpt
index 5575ec5796..4fe8437fd5 100644
--- a/ext/standard/tests/math/acos_variation.phpt
+++ b/ext/standard/tests/math/acos_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(NAN)
float(NAN)
float(NAN)
float(NAN)
-
-Warning: acos() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(NAN)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/acosh_basiclong_64bit.phpt b/ext/standard/tests/math/acosh_basiclong_64bit.phpt
index 902c235c32..428ae3e5fb 100644
--- a/ext/standard/tests/math/acosh_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/acosh_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(44.361419555836)
@@ -57,4 +56,3 @@ float(44.361419555836)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/acosh_variation.phpt b/ext/standard/tests/math/acosh_variation.phpt
index cc89ce3e76..12200e035c 100644
--- a/ext/standard/tests/math/acosh_variation.phpt
+++ b/ext/standard/tests/math/acosh_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(3.828168471)
float(3.828168471)
float(3.847562739)
float(3.847562739)
-
-Warning: acosh() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(7.60090221)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/asin_basiclong_64bit.phpt b/ext/standard/tests/math/asin_basiclong_64bit.phpt
index 071ad1c39c..7a21ba6167 100644
--- a/ext/standard/tests/math/asin_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/asin_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(NAN)
@@ -57,4 +56,3 @@ float(NAN)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/asin_variation.phpt b/ext/standard/tests/math/asin_variation.phpt
index c8063849fd..c5d170e8db 100644
--- a/ext/standard/tests/math/asin_variation.phpt
+++ b/ext/standard/tests/math/asin_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(NAN)
float(NAN)
float(NAN)
float(NAN)
-
-Warning: asin() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(NAN)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/asinh_basiclong_64bit.phpt b/ext/standard/tests/math/asinh_basiclong_64bit.phpt
index f4ccb0d23b..db8b7ad03e 100644
--- a/ext/standard/tests/math/asinh_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/asinh_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(44.361419555836)
@@ -57,4 +56,3 @@ float(44.361419555836)
float(-44.361419555836)
--- testing: -9.2233720368548E+18 ---
float(-44.361419555836)
-===DONE===
diff --git a/ext/standard/tests/math/asinh_variation.phpt b/ext/standard/tests/math/asinh_variation.phpt
index 5e41a45900..2470f7d401 100644
--- a/ext/standard/tests/math/asinh_variation.phpt
+++ b/ext/standard/tests/math/asinh_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(3.829113652)
float(3.829113652)
float(3.848471992)
float(3.848471992)
-
-Warning: asinh() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(7.60090271)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/atan2_basiclong_64bit.phpt b/ext/standard/tests/math/atan2_basiclong_64bit.phpt
index f646585f30..235be3eca8 100644
--- a/ext/standard/tests/math/atan2_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/atan2_basiclong_64bit.phpt
@@ -29,7 +29,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807, 0 ---
float(1.5707963267949)
@@ -361,4 +360,3 @@ float(-1.5707963270277)
float(-0.78539816339745)
--- testing: -9.2233720368548E+18, -9223372036854775808 ---
float(-2.3561944901923)
-===DONE===
diff --git a/ext/standard/tests/math/atan_basiclong_64bit.phpt b/ext/standard/tests/math/atan_basiclong_64bit.phpt
index 15d9a000ae..2f5945dd2f 100644
--- a/ext/standard/tests/math/atan_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/atan_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(1.5707963267949)
@@ -57,4 +56,3 @@ float(1.5707963267949)
float(-1.5707963267949)
--- testing: -9.2233720368548E+18 ---
float(-1.5707963267949)
-===DONE===
diff --git a/ext/standard/tests/math/atan_variation.phpt b/ext/standard/tests/math/atan_variation.phpt
index b6a9a9ec32..625b6d0b83 100644
--- a/ext/standard/tests/math/atan_variation.phpt
+++ b/ext/standard/tests/math/atan_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(1.527345431)
float(1.527345431)
float(1.528178225)
float(1.528178225)
-
-Warning: atan() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(1.569796327)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/atanh_basiclong_64bit.phpt b/ext/standard/tests/math/atanh_basiclong_64bit.phpt
index 426ca51f2a..aa84cbf338 100644
--- a/ext/standard/tests/math/atanh_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/atanh_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(NAN)
@@ -57,4 +56,3 @@ float(NAN)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/atanh_variation.phpt b/ext/standard/tests/math/atanh_variation.phpt
index 2b0a4b1085..f14406bb0d 100644
--- a/ext/standard/tests/math/atanh_variation.phpt
+++ b/ext/standard/tests/math/atanh_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(NAN)
float(NAN)
float(NAN)
float(NAN)
-
-Warning: atanh() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(NAN)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/base_convert_error.phpt b/ext/standard/tests/math/base_convert_error.phpt
index 96e774b51f..279cfe7924 100644
--- a/ext/standard/tests/math/base_convert_error.phpt
+++ b/ext/standard/tests/math/base_convert_error.phpt
@@ -14,14 +14,17 @@ class classA
{
}
-echo "Incorrect number of arguments\n";
-base_convert();
-base_convert(35);
-base_convert(35,2);
-base_convert(1234, 1, 10);
-base_convert(1234, 10, 37);
+try {
+ base_convert(1234, 1, 10);
+} catch (ValueError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ base_convert(1234, 10, 37);
+} catch (ValueError $e) {
+ echo $e->getMessage(), "\n";
+}
-echo "Incorrect input\n";
try {
base_convert(new classA(), 8, 10);
} catch (Error $e) {
@@ -29,18 +32,8 @@ try {
}
?>
---EXPECTF--
+--EXPECT--
*** Testing base_convert() : error conditions ***
-Incorrect number of arguments
-
-Warning: base_convert() expects exactly 3 parameters, 0 given in %s on line %d
-
-Warning: base_convert() expects exactly 3 parameters, 1 given in %s on line %d
-
-Warning: base_convert() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: base_convert(): Invalid `from base' (1) in %s on line %d
-
-Warning: base_convert(): Invalid `to base' (37) in %s on line %d
-Incorrect input
+Invalid `from base' (1)
+Invalid `to base' (37)
Object of class classA could not be converted to string
diff --git a/ext/standard/tests/math/base_convert_variation1.phpt b/ext/standard/tests/math/base_convert_variation1.phpt
index 9f106bc704..00eb9e7585 100644
--- a/ext/standard/tests/math/base_convert_variation1.phpt
+++ b/ext/standard/tests/math/base_convert_variation1.phpt
@@ -76,7 +76,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing base_convert() : usage variations ***
@@ -148,7 +147,7 @@ string(1) "0"
-- Iteration 19 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
string(1) "0"
@@ -178,4 +177,3 @@ string(1) "0"
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
string(1) "5"
-===Done===
diff --git a/ext/standard/tests/math/bindec_basiclong_64bit.phpt b/ext/standard/tests/math/bindec_basiclong_64bit.phpt
index 488ab538ed..8b69d6b4c3 100644
--- a/ext/standard/tests/math/bindec_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/bindec_basiclong_64bit.phpt
@@ -30,7 +30,6 @@ foreach ($binLongStrs as $strVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 0111111111111111111111111111111111111111111111111111111111111111 ---
int(9223372036854775807)
@@ -48,4 +47,3 @@ float(3.6893488147419E+19)
int(4294967295)
--- testing: 111111111111111111111111111111111 ---
int(8589934591)
-===DONE===
diff --git a/ext/standard/tests/math/bindec_variation1.phpt b/ext/standard/tests/math/bindec_variation1.phpt
index f59cb81bbe..f215e8ee26 100644
--- a/ext/standard/tests/math/bindec_variation1.phpt
+++ b/ext/standard/tests/math/bindec_variation1.phpt
@@ -73,12 +73,15 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(bindec($input));
+ try {
+ var_dump(bindec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing bindec() : usage variations ***
@@ -148,11 +151,7 @@ int(0)
int(0)
-- Iteration 18 --
-
-Notice: Array to string conversion in %s on line %d
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(0)
+bindec() expects parameter 1 to be string, array given
-- Iteration 19 --
@@ -176,7 +175,4 @@ int(0)
int(0)
-- Iteration 24 --
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(0)
-===Done===
+bindec() expects parameter 1 to be string, resource given
diff --git a/ext/standard/tests/math/bindec_variation1_64bit.phpt b/ext/standard/tests/math/bindec_variation1_64bit.phpt
index 4f96268b37..3b5b3e82e0 100644
--- a/ext/standard/tests/math/bindec_variation1_64bit.phpt
+++ b/ext/standard/tests/math/bindec_variation1_64bit.phpt
@@ -73,12 +73,15 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(bindec($input));
+ try {
+ var_dump(bindec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing bindec() : usage variations ***
@@ -148,11 +151,7 @@ int(0)
int(0)
-- Iteration 18 --
-
-Notice: Array to string conversion in %s on line %d
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(0)
+bindec() expects parameter 1 to be string, array given
-- Iteration 19 --
@@ -176,7 +175,4 @@ int(0)
int(0)
-- Iteration 24 --
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(0)
-===Done===
+bindec() expects parameter 1 to be string, resource given
diff --git a/ext/standard/tests/math/bug75514.phpt b/ext/standard/tests/math/bug75514.phpt
index af97b6d0e1..da77b9bd9b 100644
--- a/ext/standard/tests/math/bug75514.phpt
+++ b/ext/standard/tests/math/bug75514.phpt
@@ -5,8 +5,6 @@ Bug #75514 mt_rand returns value outside [$min,$max]
mt_srand(0, MT_RAND_PHP);
var_dump(mt_rand(0,999999999), mt_rand(0,999));
?>
-===Done===
--EXPECT--
int(448865905)
int(592)
-===Done===
diff --git a/ext/standard/tests/math/ceil_basic.phpt b/ext/standard/tests/math/ceil_basic.phpt
index 275ed485c2..61c3dd683d 100644
--- a/ext/standard/tests/math/ceil_basic.phpt
+++ b/ext/standard/tests/math/ceil_basic.phpt
@@ -38,7 +38,6 @@ for ($i = 0; $i < count($values); $i++) {
}
?>
-===Done===
--EXPECT--
*** Testing ceil() : basic functionality ***
float(0)
@@ -61,4 +60,3 @@ float(39)
float(1)
float(0)
float(0)
-===Done===
diff --git a/ext/standard/tests/math/ceil_basiclong_64bit.phpt b/ext/standard/tests/math/ceil_basiclong_64bit.phpt
index 42d9f6b413..e1cc4b4dc6 100644
--- a/ext/standard/tests/math/ceil_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/ceil_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(9.2233720368548E+18)
@@ -57,4 +56,3 @@ float(9.2233720368548E+18)
float(-9.2233720368548E+18)
--- testing: -9.2233720368548E+18 ---
float(-9.2233720368548E+18)
-===DONE===
diff --git a/ext/standard/tests/math/ceil_variation1.phpt b/ext/standard/tests/math/ceil_variation1.phpt
index 05f308a4a0..a6f308d386 100644
--- a/ext/standard/tests/math/ceil_variation1.phpt
+++ b/ext/standard/tests/math/ceil_variation1.phpt
@@ -67,13 +67,16 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(ceil($input));
+ try {
+ var_dump(ceil($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
---EXPECTF--
+--EXPECT--
*** Testing ceil() : usage variations ***
-- Iteration 1 --
@@ -95,27 +98,25 @@ float(1)
float(0)
-- Iteration 7 --
-float(0)
+ceil() expects parameter 1 to be int or float, string given
-- Iteration 8 --
-float(0)
+ceil() expects parameter 1 to be int or float, string given
-- Iteration 9 --
-bool(false)
+ceil() expects parameter 1 to be int or float, array given
-- Iteration 10 --
-float(0)
+ceil() expects parameter 1 to be int or float, string given
-- Iteration 11 --
-float(0)
+ceil() expects parameter 1 to be int or float, string given
-- Iteration 12 --
-float(0)
+ceil() expects parameter 1 to be int or float, string given
-- Iteration 13 --
-
-Notice: Object of class classA could not be converted to number in %s on line %d
-float(1)
+ceil() expects parameter 1 to be int or float, object given
-- Iteration 14 --
float(0)
@@ -124,5 +125,4 @@ float(0)
float(0)
-- Iteration 16 --
-float(%d)
-===Done===
+ceil() expects parameter 1 to be int or float, resource given
diff --git a/ext/standard/tests/math/cos_basiclong_64bit.phpt b/ext/standard/tests/math/cos_basiclong_64bit.phpt
index 12355a7d86..c575bd7930 100644
--- a/ext/standard/tests/math/cos_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/cos_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(0.0118000765128)
@@ -57,4 +56,3 @@ float(0.0118000765128)
float(0.0118000765128)
--- testing: -9.2233720368548E+18 ---
float(0.0118000765128)
-===DONE===
diff --git a/ext/standard/tests/math/cos_variation.phpt b/ext/standard/tests/math/cos_variation.phpt
index 6323042dc7..f9d1b26246 100644
--- a/ext/standard/tests/math/cos_variation.phpt
+++ b/ext/standard/tests/math/cos_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(-0.5328330203)
float(-0.5328330203)
float(-0.1117112391)
float(-0.1117112391)
-
-Warning: cos() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(0.5623790763)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/cosh_basiclong_64bit.phpt b/ext/standard/tests/math/cosh_basiclong_64bit.phpt
index f065b47213..8c805046c5 100644
--- a/ext/standard/tests/math/cosh_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/cosh_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(INF)
@@ -57,4 +56,3 @@ float(INF)
float(INF)
--- testing: -9.2233720368548E+18 ---
float(INF)
-===DONE===
diff --git a/ext/standard/tests/math/cosh_variation.phpt b/ext/standard/tests/math/cosh_variation.phpt
index cd64670668..ec58c0151f 100644
--- a/ext/standard/tests/math/cosh_variation.phpt
+++ b/ext/standard/tests/math/cosh_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(4872401723)
float(4872401723)
float(7641446995)
float(7641446995)
-
-Warning: cosh() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(INF)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/decbin_basiclong_64bit.phpt b/ext/standard/tests/math/decbin_basiclong_64bit.phpt
index a2e9185ab5..d48d729bc9 100644
--- a/ext/standard/tests/math/decbin_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/decbin_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
string(63) "111111111111111111111111111111111111111111111111111111111111111"
@@ -57,4 +56,3 @@ string(64) "1000000000000000000000000000000000000000000000000000000000000000"
string(64) "1000000000000000000000000000000000000000000000000000000000000001"
--- testing: -9.2233720368548E+18 ---
string(64) "1000000000000000000000000000000000000000000000000000000000000000"
-===DONE===
diff --git a/ext/standard/tests/math/decbin_variation1.phpt b/ext/standard/tests/math/decbin_variation1.phpt
index 711f1733a2..46b509be3b 100644
--- a/ext/standard/tests/math/decbin_variation1.phpt
+++ b/ext/standard/tests/math/decbin_variation1.phpt
@@ -90,7 +90,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing decbin() : usage variations ***
@@ -176,4 +175,3 @@ string(1) "0"
-- Iteration 27 --
string(%d) "%d"
-===Done===
diff --git a/ext/standard/tests/math/decbin_variation1_64bit.phpt b/ext/standard/tests/math/decbin_variation1_64bit.phpt
index ccde29472b..589c954651 100644
--- a/ext/standard/tests/math/decbin_variation1_64bit.phpt
+++ b/ext/standard/tests/math/decbin_variation1_64bit.phpt
@@ -90,7 +90,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing decbin() : usage variations ***
@@ -176,4 +175,3 @@ string(1) "0"
-- Iteration 27 --
string(%d) "%d"
-===Done===
diff --git a/ext/standard/tests/math/dechex_basiclong_64bit.phpt b/ext/standard/tests/math/dechex_basiclong_64bit.phpt
index 135a422f66..812bafbfb7 100644
--- a/ext/standard/tests/math/dechex_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/dechex_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
string(16) "7fffffffffffffff"
@@ -57,4 +56,3 @@ string(16) "8000000000000000"
string(16) "8000000000000001"
--- testing: -9.2233720368548E+18 ---
string(16) "8000000000000000"
-===DONE===
diff --git a/ext/standard/tests/math/dechex_variation1.phpt b/ext/standard/tests/math/dechex_variation1.phpt
index e77ea9922e..e2a3e4ed67 100644
--- a/ext/standard/tests/math/dechex_variation1.phpt
+++ b/ext/standard/tests/math/dechex_variation1.phpt
@@ -90,7 +90,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing dechex() : usage variations ***
@@ -176,4 +175,3 @@ string(1) "0"
-- Iteration 27 --
string(%d) "%s"
-===Done===
diff --git a/ext/standard/tests/math/dechex_variation1_64bit.phpt b/ext/standard/tests/math/dechex_variation1_64bit.phpt
index ff88ec8c79..6d186fa008 100644
--- a/ext/standard/tests/math/dechex_variation1_64bit.phpt
+++ b/ext/standard/tests/math/dechex_variation1_64bit.phpt
@@ -90,7 +90,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing dechex() : usage variations ***
@@ -176,4 +175,3 @@ string(1) "0"
-- Iteration 27 --
string(%d) "%s"
-===Done===
diff --git a/ext/standard/tests/math/decoct_basiclong_64bit.phpt b/ext/standard/tests/math/decoct_basiclong_64bit.phpt
index f1812b9062..8b61aa8cbf 100644
--- a/ext/standard/tests/math/decoct_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/decoct_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
string(21) "777777777777777777777"
@@ -57,4 +56,3 @@ string(22) "1000000000000000000000"
string(22) "1000000000000000000001"
--- testing: -9.2233720368548E+18 ---
string(22) "1000000000000000000000"
-===DONE===
diff --git a/ext/standard/tests/math/decoct_variation1.phpt b/ext/standard/tests/math/decoct_variation1.phpt
index 85230df2b3..ad6c63f0dc 100644
--- a/ext/standard/tests/math/decoct_variation1.phpt
+++ b/ext/standard/tests/math/decoct_variation1.phpt
@@ -91,7 +91,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing decoct() : usage variations ***
@@ -177,4 +176,3 @@ string(1) "0"
-- Iteration 27 --
string(%d) "%d"
-===Done===
diff --git a/ext/standard/tests/math/decoct_variation1_64bit.phpt b/ext/standard/tests/math/decoct_variation1_64bit.phpt
index 8e76e15c2e..0a35475883 100644
--- a/ext/standard/tests/math/decoct_variation1_64bit.phpt
+++ b/ext/standard/tests/math/decoct_variation1_64bit.phpt
@@ -91,7 +91,6 @@ foreach($inputs as $input) {
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing decoct() : usage variations ***
@@ -177,4 +176,3 @@ string(1) "0"
-- Iteration 27 --
string(%d) "%d"
-===Done===
diff --git a/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt b/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt
index 3a14b11825..ae4087eccb 100644
--- a/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(1.6097821017949E+17)
@@ -57,4 +56,3 @@ float(1.6097821017949E+17)
float(-1.6097821017949E+17)
--- testing: -9.2233720368548E+18 ---
float(-1.6097821017949E+17)
-===DONE===
diff --git a/ext/standard/tests/math/deg2rad_variation.phpt b/ext/standard/tests/math/deg2rad_variation.phpt
index d5f6920ea7..eb3c7eae0e 100644
--- a/ext/standard/tests/math/deg2rad_variation.phpt
+++ b/ext/standard/tests/math/deg2rad_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(0.401425728)
float(0.401425728)
float(0.4092797096)
float(0.4092797096)
-
-Warning: deg2rad() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(17.45329252)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/exp_basic.phpt b/ext/standard/tests/math/exp_basic.phpt
index 6d90c9d8a8..ba53e22f28 100644
--- a/ext/standard/tests/math/exp_basic.phpt
+++ b/ext/standard/tests/math/exp_basic.phpt
@@ -26,7 +26,6 @@ foreach($values as $value) {
};
?>
-===Done===
--EXPECT--
-- Iteration 1 --
float(22026.465794807)
@@ -63,4 +62,3 @@ float(1)
-- Iteration 12 --
float(1)
-===Done===
diff --git a/ext/standard/tests/math/exp_basiclong_64bit.phpt b/ext/standard/tests/math/exp_basiclong_64bit.phpt
index 75518548e3..f559b7c576 100644
--- a/ext/standard/tests/math/exp_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/exp_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(INF)
@@ -57,4 +56,3 @@ float(INF)
float(0)
--- testing: -9.2233720368548E+18 ---
float(0)
-===DONE===
diff --git a/ext/standard/tests/math/expm1_basic.phpt b/ext/standard/tests/math/expm1_basic.phpt
index 5690f4cf6f..9e926b869d 100644
--- a/ext/standard/tests/math/expm1_basic.phpt
+++ b/ext/standard/tests/math/expm1_basic.phpt
@@ -33,7 +33,6 @@ foreach($values as $value) {
$iterator++;
};
?>
-===Done===
--EXPECT--
*** Testing expm1() : basic functionality ***
@@ -72,4 +71,3 @@ float(0)
-- Iteration 12 --
float(0)
-===Done===
diff --git a/ext/standard/tests/math/expm1_basiclong_64bit.phpt b/ext/standard/tests/math/expm1_basiclong_64bit.phpt
index 9046764d02..835ebc41c1 100644
--- a/ext/standard/tests/math/expm1_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/expm1_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(INF)
@@ -57,4 +56,3 @@ float(INF)
float(-1)
--- testing: -9.2233720368548E+18 ---
float(-1)
-===DONE===
diff --git a/ext/standard/tests/math/fdiv.phpt b/ext/standard/tests/math/fdiv.phpt
new file mode 100644
index 0000000000..dd50cfdb78
--- /dev/null
+++ b/ext/standard/tests/math/fdiv.phpt
@@ -0,0 +1,78 @@
+--TEST--
+fdiv() function
+--FILE--
+<?php
+
+var_dump(fdiv(10, 3));
+var_dump(fdiv(10., 3.));
+var_dump(fdiv(-10., 2.5));
+var_dump(fdiv(10., -2.5));
+echo "\n";
+var_dump(fdiv(10., 0.));
+var_dump(fdiv(10., -0.));
+var_dump(fdiv(-10., 0.));
+var_dump(fdiv(-10., -0.));
+echo "\n";
+var_dump(fdiv(INF, 0.));
+var_dump(fdiv(INF, -0.));
+var_dump(fdiv(-INF, 0.));
+var_dump(fdiv(-INF, -0.));
+echo "\n";
+var_dump(fdiv(0., 0.));
+var_dump(fdiv(0., -0.));
+var_dump(fdiv(-0., 0.));
+var_dump(fdiv(-0., -0.));
+echo "\n";
+var_dump(fdiv(INF, INF));
+var_dump(fdiv(INF, -INF));
+var_dump(fdiv(-INF, INF));
+var_dump(fdiv(-INF, -INF));
+echo "\n";
+var_dump(fdiv(0., INF));
+var_dump(fdiv(0., -INF));
+var_dump(fdiv(-0., INF));
+var_dump(fdiv(-0., -INF));
+echo "\n";
+var_dump(fdiv(NAN, NAN));
+var_dump(fdiv(INF, NAN));
+var_dump(fdiv(0., NAN));
+var_dump(fdiv(NAN, INF));
+var_dump(fdiv(NAN, 0.));
+
+?>
+--EXPECT--
+float(3.3333333333333)
+float(3.3333333333333)
+float(-4)
+float(-4)
+
+float(INF)
+float(-INF)
+float(-INF)
+float(INF)
+
+float(INF)
+float(-INF)
+float(-INF)
+float(INF)
+
+float(NAN)
+float(NAN)
+float(NAN)
+float(NAN)
+
+float(NAN)
+float(NAN)
+float(NAN)
+float(NAN)
+
+float(0)
+float(-0)
+float(-0)
+float(0)
+
+float(NAN)
+float(NAN)
+float(NAN)
+float(NAN)
+float(NAN)
diff --git a/ext/standard/tests/math/floor_basic.phpt b/ext/standard/tests/math/floor_basic.phpt
index 986ee26924..c5d2fc46b1 100644
--- a/ext/standard/tests/math/floor_basic.phpt
+++ b/ext/standard/tests/math/floor_basic.phpt
@@ -38,7 +38,6 @@ foreach($values as $value) {
};
?>
-===Done===
--EXPECT--
*** Testing floor() : basic functionality ***
@@ -101,4 +100,3 @@ float(0)
-- floor --
float(0)
-===Done===
diff --git a/ext/standard/tests/math/floor_basiclong_64bit.phpt b/ext/standard/tests/math/floor_basiclong_64bit.phpt
index 6b768ef90c..3bc4e6393e 100644
--- a/ext/standard/tests/math/floor_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/floor_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(9.2233720368548E+18)
@@ -57,4 +56,3 @@ float(9.2233720368548E+18)
float(-9.2233720368548E+18)
--- testing: -9.2233720368548E+18 ---
float(-9.2233720368548E+18)
-===DONE===
diff --git a/ext/standard/tests/math/floor_variation1.phpt b/ext/standard/tests/math/floor_variation1.phpt
index aef4c742b9..6774816ead 100644
--- a/ext/standard/tests/math/floor_variation1.phpt
+++ b/ext/standard/tests/math/floor_variation1.phpt
@@ -67,13 +67,16 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(floor($input));
+ try {
+ var_dump(floor($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
---EXPECTF--
+--EXPECT--
*** Testing floor() : usage variations ***
-- Iteration 1 --
@@ -95,27 +98,25 @@ float(1)
float(0)
-- Iteration 7 --
-float(0)
+floor() expects parameter 1 to be int or float, string given
-- Iteration 8 --
-float(0)
+floor() expects parameter 1 to be int or float, string given
-- Iteration 9 --
-bool(false)
+floor() expects parameter 1 to be int or float, array given
-- Iteration 10 --
-float(0)
+floor() expects parameter 1 to be int or float, string given
-- Iteration 11 --
-float(0)
+floor() expects parameter 1 to be int or float, string given
-- Iteration 12 --
-float(0)
+floor() expects parameter 1 to be int or float, string given
-- Iteration 13 --
-
-Notice: Object of class classA could not be converted to number in %s on line %d
-float(1)
+floor() expects parameter 1 to be int or float, object given
-- Iteration 14 --
float(0)
@@ -124,5 +125,4 @@ float(0)
float(0)
-- Iteration 16 --
-float(%f)
-===Done===
+floor() expects parameter 1 to be int or float, resource given
diff --git a/ext/standard/tests/math/fmod_basiclong_64bit.phpt b/ext/standard/tests/math/fmod_basiclong_64bit.phpt
index 6513e31159..e949aab00a 100644
--- a/ext/standard/tests/math/fmod_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/fmod_basiclong_64bit.phpt
@@ -29,7 +29,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807, 0 ---
float(NAN)
@@ -361,4 +360,3 @@ float(-0)
float(-0)
--- testing: -9.2233720368548E+18, -9223372036854775808 ---
float(-0)
-===DONE===
diff --git a/ext/standard/tests/math/hexdec_basic_64bit.phpt b/ext/standard/tests/math/hexdec_basic_64bit.phpt
index e7b866253f..bb8c3d3f27 100644
--- a/ext/standard/tests/math/hexdec_basic_64bit.phpt
+++ b/ext/standard/tests/math/hexdec_basic_64bit.phpt
@@ -33,7 +33,6 @@ foreach($values as $value) {
};
?>
-===Done===
--EXPECTF--
*** Testing hexdec() : basic functionality ***
@@ -94,4 +93,3 @@ int(0)
-- hexdec --
int(0)
-===Done===
diff --git a/ext/standard/tests/math/hexdec_basiclong_64bit.phpt b/ext/standard/tests/math/hexdec_basiclong_64bit.phpt
index 225e42018b..b378b452eb 100644
--- a/ext/standard/tests/math/hexdec_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/hexdec_basiclong_64bit.phpt
@@ -30,7 +30,6 @@ foreach ($hexLongStrs as $strVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 7fffffffffffffff ---
int(9223372036854775807)
@@ -48,4 +47,3 @@ float(4.7223664828696E+21)
int(34359738367)
--- testing: fffffffff ---
int(68719476735)
-===DONE===
diff --git a/ext/standard/tests/math/hexdec_variation1.phpt b/ext/standard/tests/math/hexdec_variation1.phpt
index 8f066cb11d..d395f8a8f1 100644
--- a/ext/standard/tests/math/hexdec_variation1.phpt
+++ b/ext/standard/tests/math/hexdec_variation1.phpt
@@ -77,12 +77,15 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(hexdec($input));
+ try {
+ var_dump(hexdec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing hexdec() : usage variations ***
@@ -154,11 +157,7 @@ int(0)
int(0)
-- Iteration 20 --
-
-Notice: Array to string conversion in %s on line %d
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(170)
+hexdec() expects parameter 1 to be string, array given
-- Iteration 21 --
@@ -182,7 +181,4 @@ int(0)
int(0)
-- Iteration 26 --
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(970453)
-===Done===
+hexdec() expects parameter 1 to be string, resource given
diff --git a/ext/standard/tests/math/hexdec_variation1_64bit.phpt b/ext/standard/tests/math/hexdec_variation1_64bit.phpt
index 759997979f..35c17f727a 100644
--- a/ext/standard/tests/math/hexdec_variation1_64bit.phpt
+++ b/ext/standard/tests/math/hexdec_variation1_64bit.phpt
@@ -77,12 +77,15 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(hexdec($input));
+ try {
+ var_dump(hexdec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing hexdec() : usage variations ***
@@ -154,11 +157,7 @@ int(0)
int(0)
-- Iteration 20 --
-
-Notice: Array to string conversion in %s on line %d
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(170)
+hexdec() expects parameter 1 to be string, array given
-- Iteration 21 --
@@ -182,7 +181,4 @@ int(0)
int(0)
-- Iteration 26 --
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(970453)
-===Done===
+hexdec() expects parameter 1 to be string, resource given
diff --git a/ext/standard/tests/math/hypot_basic.phpt b/ext/standard/tests/math/hypot_basic.phpt
index c09dd51da5..796c160810 100644
--- a/ext/standard/tests/math/hypot_basic.phpt
+++ b/ext/standard/tests/math/hypot_basic.phpt
@@ -48,7 +48,6 @@ for ($i = 0; $i < count($valuesy); $i++) {
}
}
?>
-===Done===
--EXPECTF--
*** Testing hypot() : basic functionality ***
@@ -441,4 +440,3 @@ Y: X: float(0)
Y: X:1 float(1)
Y: X: float(0)
-===Done===
diff --git a/ext/standard/tests/math/hypot_basiclong_64bit.phpt b/ext/standard/tests/math/hypot_basiclong_64bit.phpt
index 3bbfcb4afc..9a0b71ffc1 100644
--- a/ext/standard/tests/math/hypot_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/hypot_basiclong_64bit.phpt
@@ -29,7 +29,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807, 0 ---
float(9.2233720368548E+18)
@@ -361,4 +360,3 @@ float(9.2233720368548E+18)
float(1.3043817825333E+19)
--- testing: -9.2233720368548E+18, -9223372036854775808 ---
float(1.3043817825333E+19)
-===DONE===
diff --git a/ext/standard/tests/math/is_finite_basiclong_64bit.phpt b/ext/standard/tests/math/is_finite_basiclong_64bit.phpt
index 201d8473fa..b8e4b63f17 100644
--- a/ext/standard/tests/math/is_finite_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/is_finite_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
bool(true)
@@ -57,4 +56,3 @@ bool(true)
bool(true)
--- testing: -9.2233720368548E+18 ---
bool(true)
-===DONE===
diff --git a/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt b/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt
index ca53b77f0c..d6bd27c8a3 100644
--- a/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
bool(false)
@@ -57,4 +56,3 @@ bool(false)
bool(false)
--- testing: -9.2233720368548E+18 ---
bool(false)
-===DONE===
diff --git a/ext/standard/tests/math/is_nan_basiclong_64bit.phpt b/ext/standard/tests/math/is_nan_basiclong_64bit.phpt
index ca85db1660..2da97f592c 100644
--- a/ext/standard/tests/math/is_nan_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/is_nan_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
bool(false)
@@ -57,4 +56,3 @@ bool(false)
bool(false)
--- testing: -9.2233720368548E+18 ---
bool(false)
-===DONE===
diff --git a/ext/standard/tests/math/lcg_value_basic.phpt b/ext/standard/tests/math/lcg_value_basic.phpt
index 44304f2475..7660f67c24 100644
--- a/ext/standard/tests/math/lcg_value_basic.phpt
+++ b/ext/standard/tests/math/lcg_value_basic.phpt
@@ -21,22 +21,6 @@ if ($i != 100) {
echo "PASSED\n";
}
-echo "\n lcg_value error cases..\n";
-$res = lcg_value(23);
-
-if (is_null($res)) {
- echo "PASSED\n";
-} else {
- echo "FAILED\n";
-}
-
-$res = lcg_value(10,false);
-if (is_null($res)) {
- echo "PASSED\n";
-} else {
- echo "FAILED\n";
-}
-
echo "MATHS test script completed\n";
?>
@@ -45,12 +29,4 @@ MATHS test script started
lcg_value tests...
PASSED
-
- lcg_value error cases..
-
-Warning: lcg_value() expects exactly 0 parameters, 1 given in %slcg_value_basic.php on line %d
-PASSED
-
-Warning: lcg_value() expects exactly 0 parameters, 2 given in %slcg_value_basic.php on line %d
-PASSED
MATHS test script completed
diff --git a/ext/standard/tests/math/log10_basiclong_64bit.phpt b/ext/standard/tests/math/log10_basiclong_64bit.phpt
index 2eb2d544b6..ef00d37d02 100644
--- a/ext/standard/tests/math/log10_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/log10_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(18.964889726831)
@@ -57,4 +56,3 @@ float(18.964889726831)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/log10_variation.phpt b/ext/standard/tests/math/log10_variation.phpt
index 5304325952..8dbea47a84 100644
--- a/ext/standard/tests/math/log10_variation.phpt
+++ b/ext/standard/tests/math/log10_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(1.361727836)
float(1.361727836)
float(1.370142847)
float(1.370142847)
-
-Warning: log10() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(3)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/log1p_basic.phpt b/ext/standard/tests/math/log1p_basic.phpt
index 61a0c3d839..2b8c7f8cc5 100644
--- a/ext/standard/tests/math/log1p_basic.phpt
+++ b/ext/standard/tests/math/log1p_basic.phpt
@@ -34,7 +34,6 @@ foreach($values as $value) {
?>
-===Done===
--EXPECT--
*** Testing log1p() : basic functionality ***
@@ -75,4 +74,3 @@ float(0.69314718055995)
-- log1p --
float(0)
-===Done===
diff --git a/ext/standard/tests/math/log1p_basiclong_64bit.phpt b/ext/standard/tests/math/log1p_basiclong_64bit.phpt
index 05580ff731..be6f8aa3a2 100644
--- a/ext/standard/tests/math/log1p_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/log1p_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(43.668272375277)
@@ -57,4 +56,3 @@ float(43.668272375277)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/log_basiclong_64bit.phpt b/ext/standard/tests/math/log_basiclong_64bit.phpt
index 5259899323..c0598fed8b 100644
--- a/ext/standard/tests/math/log_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/log_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(43.668272375277)
@@ -57,4 +56,3 @@ float(43.668272375277)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/log_error.phpt b/ext/standard/tests/math/log_error.phpt
index 48a23df3c0..7c305a4cba 100644
--- a/ext/standard/tests/math/log_error.phpt
+++ b/ext/standard/tests/math/log_error.phpt
@@ -4,13 +4,7 @@ Test log() - wrong params test log()
precision=14
--FILE--
<?php
-log();
-log(36,4,true);
log(36, -4);
?>
--EXPECTF--
-Warning: log() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: log() expects at most 2 parameters, 3 given in %s on line %d
-
Warning: log(): base must be greater than 0 in %s on line %d
diff --git a/ext/standard/tests/math/octdec_basic_64bit.phpt b/ext/standard/tests/math/octdec_basic_64bit.phpt
index 6fd0b366b8..6401fdff3c 100644
--- a/ext/standard/tests/math/octdec_basic_64bit.phpt
+++ b/ext/standard/tests/math/octdec_basic_64bit.phpt
@@ -32,7 +32,6 @@ for ($i = 0; $i < count($values); $i++) {
var_dump($res);
}
?>
-===Done===
--EXPECTF--
*** Testing octdec() : basic functionality ***
@@ -64,4 +63,3 @@ int(823384)
int(1)
int(0)
int(0)
-===Done===
diff --git a/ext/standard/tests/math/octdec_basiclong_64bit.phpt b/ext/standard/tests/math/octdec_basiclong_64bit.phpt
index 4a97a6f414..4e9d88def6 100644
--- a/ext/standard/tests/math/octdec_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/octdec_basiclong_64bit.phpt
@@ -30,7 +30,6 @@ foreach ($octLongStrs as $strVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 777777777777777777777 ---
int(9223372036854775807)
@@ -48,4 +47,3 @@ float(7.5557863725914E+22)
int(34359738367)
--- testing: 777777777777 ---
int(68719476735)
-===DONE===
diff --git a/ext/standard/tests/math/octdec_variation1.phpt b/ext/standard/tests/math/octdec_variation1.phpt
index 84be45dbb3..b59b3b71eb 100644
--- a/ext/standard/tests/math/octdec_variation1.phpt
+++ b/ext/standard/tests/math/octdec_variation1.phpt
@@ -73,7 +73,11 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(octdec($input));
+ try {
+ var_dump(octdec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
@@ -156,11 +160,7 @@ int(0)
int(0)
-- Iteration 20 --
-
-Notice: Array to string conversion in %s on line %d
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(0)
+octdec() expects parameter 1 to be string, array given
-- Iteration 21 --
@@ -184,7 +184,5 @@ int(0)
int(0)
-- Iteration 26 --
-
-Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
-int(5)
+octdec() expects parameter 1 to be string, resource given
---Done---
diff --git a/ext/standard/tests/math/pow_basic.phpt b/ext/standard/tests/math/pow_basic.phpt
index 3a719ada08..e23dac3fb4 100644
--- a/ext/standard/tests/math/pow_basic.phpt
+++ b/ext/standard/tests/math/pow_basic.phpt
@@ -46,7 +46,6 @@ foreach($bases as $base) {
echo "\n\n";
}
?>
-===Done===
--EXPECT--
Base = 23
..... Exponent = 0 Result = 1
@@ -267,4 +266,3 @@ Base = -2147483648
..... Exponent = 2147483647 Result = -INF
..... Exponent = -2147483648 Result = 0
-===Done===
diff --git a/ext/standard/tests/math/pow_basic2.phpt b/ext/standard/tests/math/pow_basic2.phpt
index 8dfb487639..bb5a25520d 100644
--- a/ext/standard/tests/math/pow_basic2.phpt
+++ b/ext/standard/tests/math/pow_basic2.phpt
@@ -26,7 +26,6 @@ var_dump(pow(-24, $large_exp+1));
var_dump(pow(-0.24, -$large_exp+1));
?>
-===Done===
--EXPECTF--
-- The following all result in INF --
float(INF)
@@ -48,4 +47,3 @@ float(%s)
-- The following all result in -INF --
float(-INF)
float(-INF)
-===Done===
diff --git a/ext/standard/tests/math/pow_basic_64bit.phpt b/ext/standard/tests/math/pow_basic_64bit.phpt
index 512efd034c..3dc37c4774 100644
--- a/ext/standard/tests/math/pow_basic_64bit.phpt
+++ b/ext/standard/tests/math/pow_basic_64bit.phpt
@@ -46,7 +46,6 @@ foreach($bases as $base) {
echo "\n\n";
}
?>
-===Done===
--EXPECT--
Base = 23
..... Exponent = 0 Result = 1
@@ -267,4 +266,3 @@ Base = -9223372036854775808
..... Exponent = 2147483647 Result = -INF
..... Exponent = -2147483648 Result = 0
-===Done===
diff --git a/ext/standard/tests/math/pow_basiclong_64bit.phpt b/ext/standard/tests/math/pow_basiclong_64bit.phpt
index 722b01c0c7..ff661c3a9a 100644
--- a/ext/standard/tests/math/pow_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/pow_basiclong_64bit.phpt
@@ -29,7 +29,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807, 0 ---
int(1)
@@ -361,4 +360,3 @@ float(0)
float(INF)
--- testing: -9.2233720368548E+18, -9223372036854775808 ---
float(0)
-===DONE===
diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt
index a3e13d861c..e005ced560 100644
--- a/ext/standard/tests/math/pow_variation1.phpt
+++ b/ext/standard/tests/math/pow_variation1.phpt
@@ -84,13 +84,16 @@ $inputs = array(
// loop through each element of $inputs to check the behaviour of pow()
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(pow($input, 3));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(pow($input, 3));
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing pow() : usage variations ***
@@ -153,7 +156,7 @@ Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 19 --
-int(0)
+Unsupported operand types
-- Iteration 20 --
@@ -183,4 +186,3 @@ int(0)
-- Iteration 26 --
%s
-===Done===
diff --git a/ext/standard/tests/math/pow_variation1_64bit.phpt b/ext/standard/tests/math/pow_variation1_64bit.phpt
index 0d8b1960be..636c65eabf 100644
--- a/ext/standard/tests/math/pow_variation1_64bit.phpt
+++ b/ext/standard/tests/math/pow_variation1_64bit.phpt
@@ -84,13 +84,16 @@ $inputs = array(
// loop through each element of $inputs to check the behaviour of pow()
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(pow($input, 3));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(pow($input, 3));
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing pow() : usage variations ***
@@ -153,7 +156,7 @@ Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 19 --
-int(0)
+Unsupported operand types
-- Iteration 20 --
@@ -183,4 +186,3 @@ int(0)
-- Iteration 26 --
%s
-===Done===
diff --git a/ext/standard/tests/math/pow_variation2.phpt b/ext/standard/tests/math/pow_variation2.phpt
index 4876447da9..ad86e1721e 100644
--- a/ext/standard/tests/math/pow_variation2.phpt
+++ b/ext/standard/tests/math/pow_variation2.phpt
@@ -80,13 +80,16 @@ $inputs = array(
// loop through each element of $inputs to check the behaviour of pow()
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump(pow(20.3, $input));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(pow(20.3, $input));
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
?>
-===Done===
--EXPECTF--
*** Testing pow() : usage variations ***
@@ -149,7 +152,7 @@ Warning: A non-numeric value encountered in %s on line %d
float(1)
-- Iteration 19 --
-int(1)
+Unsupported operand types
-- Iteration 20 --
@@ -179,4 +182,3 @@ float(1)
-- Iteration 26 --
%s
-===Done===
diff --git a/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt b/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt
index b3d973387e..fbde4ab585 100644
--- a/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(5.2846029059076E+20)
@@ -57,4 +56,3 @@ float(5.2846029059076E+20)
float(-5.2846029059076E+20)
--- testing: -9.2233720368548E+18 ---
float(-5.2846029059076E+20)
-===DONE===
diff --git a/ext/standard/tests/math/rad2deg_variation.phpt b/ext/standard/tests/math/rad2deg_variation.phpt
index 596a1940a4..6ea7d0c8a4 100644
--- a/ext/standard/tests/math/rad2deg_variation.phpt
+++ b/ext/standard/tests/math/rad2deg_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(1317.802929)
float(1317.802929)
float(1343.58603)
float(1343.58603)
-
-Warning: rad2deg() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(57295.77951)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/round_basic.phpt b/ext/standard/tests/math/round_basic.phpt
index d6b927f2d5..912529433e 100644
--- a/ext/standard/tests/math/round_basic.phpt
+++ b/ext/standard/tests/math/round_basic.phpt
@@ -44,7 +44,6 @@ for ($i = 0; $i < count($values); $i++) {
}
}
?>
-===Done===
--EXPECT--
*** Testing round() : basic functionality ***
round: 123456789
@@ -164,4 +163,3 @@ round: 2.3456789e8
...with precision -> float(234567890)
...with precision 1-> float(234567890)
...with precision -> float(234567890)
-===Done===
diff --git a/ext/standard/tests/math/round_basiclong_64bit.phpt b/ext/standard/tests/math/round_basiclong_64bit.phpt
index fbae95437f..ee66684494 100644
--- a/ext/standard/tests/math/round_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/round_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(9.2233720368548E+18)
@@ -57,4 +56,3 @@ float(9.2233720368548E+18)
float(-9.2233720368548E+18)
--- testing: -9.2233720368548E+18 ---
float(-9.2233720368548E+18)
-===DONE===
diff --git a/ext/standard/tests/math/round_bug71201.phpt b/ext/standard/tests/math/round_bug71201.phpt
index 43a5e11263..b02d3b6ef4 100644
--- a/ext/standard/tests/math/round_bug71201.phpt
+++ b/ext/standard/tests/math/round_bug71201.phpt
@@ -4,7 +4,5 @@ Bug #71201 round() segfault on 64-bit builds
<?php
echo round(1.0, -2147483648), "\n";
?>
-===DONE===
--EXPECT--
0
-===DONE===
diff --git a/ext/standard/tests/math/round_variation1.phpt b/ext/standard/tests/math/round_variation1.phpt
index 454a9129f4..b8566e6df7 100644
--- a/ext/standard/tests/math/round_variation1.phpt
+++ b/ext/standard/tests/math/round_variation1.phpt
@@ -81,14 +81,17 @@ $inputs = array(
// 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($input, 14));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(round($input, 14));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
?>
-===Done===
---EXPECTF--
+--EXPECT--
*** Testing round() : usage variations ***
-- Iteration 1 --
@@ -140,27 +143,25 @@ float(1)
float(0)
-- Iteration 17 --
-float(0)
+round() expects parameter 1 to be int or float, string given
-- Iteration 18 --
-float(0)
+round() expects parameter 1 to be int or float, string given
-- Iteration 19 --
-bool(false)
+round() expects parameter 1 to be int or float, array given
-- Iteration 20 --
-float(0)
+round() expects parameter 1 to be int or float, string given
-- Iteration 21 --
-float(0)
+round() expects parameter 1 to be int or float, string given
-- Iteration 22 --
-float(0)
+round() expects parameter 1 to be int or float, string given
-- Iteration 23 --
-
-Notice: Object of class classA could not be converted to number in %s on line %d
-float(1)
+round() expects parameter 1 to be int or float, object given
-- Iteration 24 --
float(0)
@@ -169,5 +170,4 @@ float(0)
float(0)
-- Iteration 26 --
-float(%f)
-===Done===
+round() expects parameter 1 to be int or float, resource given
diff --git a/ext/standard/tests/math/sin_basiclong_64bit.phpt b/ext/standard/tests/math/sin_basiclong_64bit.phpt
index f335b3bd62..35775d2f0b 100644
--- a/ext/standard/tests/math/sin_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/sin_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(0.99993037667344)
@@ -57,4 +56,3 @@ float(0.99993037667344)
float(-0.99993037667344)
--- testing: -9.2233720368548E+18 ---
float(-0.99993037667344)
-===DONE===
diff --git a/ext/standard/tests/math/sin_variation.phpt b/ext/standard/tests/math/sin_variation.phpt
index 5b635dfbdc..d044a16b40 100644
--- a/ext/standard/tests/math/sin_variation.phpt
+++ b/ext/standard/tests/math/sin_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(-0.8462204042)
float(-0.8462204042)
float(-0.9937407102)
float(-0.9937407102)
-
-Warning: sin() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(0.8268795405)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/sinh_basiclong_64bit.phpt b/ext/standard/tests/math/sinh_basiclong_64bit.phpt
index a52a48a8db..f192b7a1d6 100644
--- a/ext/standard/tests/math/sinh_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/sinh_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(INF)
@@ -57,4 +56,3 @@ float(INF)
float(-INF)
--- testing: -9.2233720368548E+18 ---
float(-INF)
-===DONE===
diff --git a/ext/standard/tests/math/sinh_variation.phpt b/ext/standard/tests/math/sinh_variation.phpt
index e47e94d629..5e576f447f 100644
--- a/ext/standard/tests/math/sinh_variation.phpt
+++ b/ext/standard/tests/math/sinh_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(4872401723)
float(4872401723)
float(7641446995)
float(7641446995)
-
-Warning: sinh() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(INF)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/sqrt_basiclong_64bit.phpt b/ext/standard/tests/math/sqrt_basiclong_64bit.phpt
index 44fe578548..a20cccad79 100644
--- a/ext/standard/tests/math/sqrt_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/sqrt_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(3037000499.976)
@@ -57,4 +56,3 @@ float(3037000499.976)
float(NAN)
--- testing: -9.2233720368548E+18 ---
float(NAN)
-===DONE===
diff --git a/ext/standard/tests/math/sqrt_variation.phpt b/ext/standard/tests/math/sqrt_variation.phpt
index 7369b98dfd..696596cefa 100644
--- a/ext/standard/tests/math/sqrt_variation.phpt
+++ b/ext/standard/tests/math/sqrt_variation.phpt
@@ -22,7 +22,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -35,7 +34,6 @@ for ($i = 0; $i < count($values); $i++) {
}
?>
-===Done===
--EXPECTF--
*** Testing sqrt() : usage variations ***
float(4.7958315233127)
@@ -47,9 +45,6 @@ float(4.7958315233127)
float(4.7958315233127)
float(4.8425200051213)
float(4.8425200051213)
-
-Warning: sqrt() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(31.622776601684)
Notice: A non well formed numeric value encountered in %s on line %d
@@ -57,4 +52,3 @@ float(31.622776601684)
float(0)
float(1)
float(0)
-===Done===
diff --git a/ext/standard/tests/math/srand_basic.phpt b/ext/standard/tests/math/srand_basic.phpt
index a3788cdf45..663653e485 100644
--- a/ext/standard/tests/math/srand_basic.phpt
+++ b/ext/standard/tests/math/srand_basic.phpt
@@ -20,7 +20,6 @@ var_dump(srand(true));
var_dump(srand(false));
var_dump(srand(NULL));
?>
-===Done===
--EXPECT--
*** Testing srand() : basic functionality ***
NULL
@@ -31,4 +30,3 @@ NULL
NULL
NULL
NULL
-===Done===
diff --git a/ext/standard/tests/math/tan_basiclong_64bit.phpt b/ext/standard/tests/math/tan_basiclong_64bit.phpt
index b62f09a69e..29c057ce69 100644
--- a/ext/standard/tests/math/tan_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/tan_basiclong_64bit.phpt
@@ -27,7 +27,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(84.739)
@@ -59,4 +58,3 @@ float(84.739)
float(-84.739)
--- testing: -9.2234E+18 ---
float(-84.739)
-===DONE===
diff --git a/ext/standard/tests/math/tan_variation.phpt b/ext/standard/tests/math/tan_variation.phpt
index 81546bbf6f..2c9ede4738 100644
--- a/ext/standard/tests/math/tan_variation.phpt
+++ b/ext/standard/tests/math/tan_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(1.588153083)
float(1.588153083)
float(8.895619796)
float(8.895619796)
-
-Warning: tan() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(1.470324156)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/math/tanh_basiclong_64bit.phpt b/ext/standard/tests/math/tanh_basiclong_64bit.phpt
index f3563f81fc..fd034a4cb0 100644
--- a/ext/standard/tests/math/tanh_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/tanh_basiclong_64bit.phpt
@@ -25,7 +25,6 @@ foreach ($longVals as $longVal) {
}
?>
-===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
float(1)
@@ -57,4 +56,3 @@ float(1)
float(-1)
--- testing: -9.2233720368548E+18 ---
float(-1)
-===DONE===
diff --git a/ext/standard/tests/math/tanh_variation.phpt b/ext/standard/tests/math/tanh_variation.phpt
index b1b477c150..907f802b8a 100644
--- a/ext/standard/tests/math/tanh_variation.phpt
+++ b/ext/standard/tests/math/tanh_variation.phpt
@@ -21,7 +21,6 @@ $values = array(23,
"23",
"23.45",
"2.345e1",
- "nonsense",
"1000",
"1000ABC",
null,
@@ -44,9 +43,6 @@ float(1)
float(1)
float(1)
float(1)
-
-Warning: tanh() expects parameter 1 to be float, string given in %s on line %d
-NULL
float(1)
Notice: A non well formed numeric value encountered in %s on line %d
diff --git a/ext/standard/tests/misc/bug65550.phpt b/ext/standard/tests/misc/bug65550.phpt
index 5ac0389d33..a0340d4727 100644
--- a/ext/standard/tests/misc/bug65550.phpt
+++ b/ext/standard/tests/misc/bug65550.phpt
@@ -8,8 +8,6 @@ $user_agent = 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/522+
$caps = get_browser($user_agent, true);
var_dump($caps['browser'], $caps['version']);
?>
-==DONE==
--EXPECT--
string(7) "OmniWeb"
string(3) "5.6"
-==DONE==
diff --git a/ext/standard/tests/misc/get_browser_basic.phpt b/ext/standard/tests/misc/get_browser_basic.phpt
index 7daf668c50..81eb9d52e9 100644
--- a/ext/standard/tests/misc/get_browser_basic.phpt
+++ b/ext/standard/tests/misc/get_browser_basic.phpt
@@ -22,7 +22,6 @@ for( $x = 0; $x < 20; $x++) {
}
?>
-===DONE===
--EXPECT--
*** Testing get_browser() : basic functionality ***
array(35) {
@@ -1455,4 +1454,3 @@ array(35) {
["aolversion"]=>
string(1) "0"
}
-===DONE===
diff --git a/ext/standard/tests/misc/get_browser_error.phpt b/ext/standard/tests/misc/get_browser_error.phpt
index 16e07f9f7d..f1930b71d8 100644
--- a/ext/standard/tests/misc/get_browser_error.phpt
+++ b/ext/standard/tests/misc/get_browser_error.phpt
@@ -20,14 +20,10 @@ echo "*** Testing get_browser() : error functionality ***\n";
/* Unknown browser uses defaults. */
var_dump( get_browser( 'foobar', true ) );
-/* More than expected arguments */
-var_dump( get_browser( 'foobar', true, 15 ) );
-
/* Some wrong parameters, no HTTP_USER_AGENT set */
var_dump( get_browser( null, 'foobar' ) );
?>
-===DONE===
--EXPECTF--
*** Testing get_browser() : error functionality ***
array(34) {
@@ -101,9 +97,5 @@ array(34) {
string(1) "0"
}
-Warning: get_browser() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
Warning: get_browser(): HTTP_USER_AGENT variable is not set, cannot determine user agent name in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/misc/get_browser_variation1.phpt b/ext/standard/tests/misc/get_browser_variation1.phpt
index dacfdfc8d9..7c32a722c7 100644
--- a/ext/standard/tests/misc/get_browser_variation1.phpt
+++ b/ext/standard/tests/misc/get_browser_variation1.phpt
@@ -23,7 +23,6 @@ for( $x = 20; $x < $count; $x++) {
}
?>
-===DONE===
--EXPECT--
*** Testing get_browser() : variation functionality: extra browser names ***
array(35) {
@@ -1386,4 +1385,3 @@ array(35) {
["aolversion"]=>
string(1) "0"
}
-===DONE===
diff --git a/ext/standard/tests/misc/time_nanosleep_error3.phpt b/ext/standard/tests/misc/time_nanosleep_error3.phpt
index a419e82d0c..6aed304f1a 100644
--- a/ext/standard/tests/misc/time_nanosleep_error3.phpt
+++ b/ext/standard/tests/misc/time_nanosleep_error3.phpt
@@ -9,8 +9,12 @@ if (!function_exists('time_nanosleep')) die("skip");
--FILE--
<?php
-$nano = time_nanosleep(-2, 1000);
+time_nanosleep(-2, 1000);
?>
--EXPECTF--
-Warning: time_nanosleep(): The seconds value must be greater than 0 in %stime_nanosleep_error3.php on line %d
+Fatal error: Uncaught ValueError: The seconds value must be greater than 0 in %s:%d
+Stack trace:
+#0 %s(%d): time_nanosleep(-2, 1000)
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/misc/time_nanosleep_error4.phpt b/ext/standard/tests/misc/time_nanosleep_error4.phpt
index e3e522a944..3d60c516b1 100644
--- a/ext/standard/tests/misc/time_nanosleep_error4.phpt
+++ b/ext/standard/tests/misc/time_nanosleep_error4.phpt
@@ -10,8 +10,12 @@ if (!function_exists('time_nanosleep')) die("skip");
--FILE--
<?php
-$nano = time_nanosleep(0, -10);
+time_nanosleep(0, -10);
?>
--EXPECTF--
-Warning: time_nanosleep(): The nanoseconds value must be greater than 0 in %stime_nanosleep_error4.php on line %d
+Fatal error: Uncaught ValueError: The nanoseconds value must be greater than 0 in %s:%d
+Stack trace:
+#0 %s(%d): time_nanosleep(0, -10)
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/misc/time_nanosleep_error5.phpt b/ext/standard/tests/misc/time_nanosleep_error5.phpt
index 2f1f3a119d..7116da5519 100644
--- a/ext/standard/tests/misc/time_nanosleep_error5.phpt
+++ b/ext/standard/tests/misc/time_nanosleep_error5.phpt
@@ -7,8 +7,12 @@ time_nanosleep — Delay for a number of seconds and nanoseconds
--FILE--
<?php
-$nano = time_nanosleep(0, 1000000000);
+time_nanosleep(0, 1000000000);
?>
--EXPECTF--
-Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 or seconds was negative in %s.php on line %d
+Fatal error: Uncaught ValueError: Nanoseconds was not in the range 0 to 999 999 999 or seconds was negative in %s:%d
+Stack trace:
+#0 %s(%d): time_nanosleep(0, 1000000000)
+#1 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/network/bug64330.phpt b/ext/standard/tests/network/bug64330.phpt
index e5653e7459..836709ea49 100644
--- a/ext/standard/tests/network/bug64330.phpt
+++ b/ext/standard/tests/network/bug64330.phpt
@@ -14,8 +14,6 @@ if ($client) {
echo "ok\n";
}
?>
-===DONE===
--EXPECT--
Test
ok
-===DONE===
diff --git a/ext/standard/tests/network/closelog_basic.phpt b/ext/standard/tests/network/closelog_basic.phpt
index 77c7155ea8..8031da37a5 100644
--- a/ext/standard/tests/network/closelog_basic.phpt
+++ b/ext/standard/tests/network/closelog_basic.phpt
@@ -14,10 +14,8 @@ echo "*** Testing closelog() : basic functionality ***\n";
echo "\n-- Testing closelog() function with Zero arguments --\n";
var_dump( closelog() );
?>
-===DONE===
--EXPECT--
*** Testing closelog() : basic functionality ***
-- Testing closelog() function with Zero arguments --
bool(true)
-===DONE===
diff --git a/ext/standard/tests/network/fsockopen_error.phpt b/ext/standard/tests/network/fsockopen_error.phpt
index 638412b47f..ea08335f2d 100644
--- a/ext/standard/tests/network/fsockopen_error.phpt
+++ b/ext/standard/tests/network/fsockopen_error.phpt
@@ -11,21 +11,6 @@ Test fsockopen() function : error conditions
echo "*** Testing fsockopen() : basic error conditions ***\n";
-
-echo "\n-- Testing fsockopen() function with more than expected no. of arguments --\n";
-$hostname = 'string_val';
-$port = 10;
-$errno = 10;
-$errstr = 'string_val';
-$timeout = 10.5;
-$extra_arg = 10;
-var_dump( fsockopen($hostname, $port, $errno, $errstr, $timeout, $extra_arg) );
-var_dump($errstr);
-var_dump($errno);
-
-echo "\n-- Testing fsockopen() function with less than expected no. of arguments --\n";
-var_dump( fsockopen() );
-
echo "\n-- Attempting to connect to a non-existent socket --\n";
$hostname = 'tcp://127.0.0.1'; // loopback address
$port = 31337;
@@ -49,18 +34,6 @@ echo "Done";
--EXPECTF--
*** Testing fsockopen() : basic error conditions ***
--- Testing fsockopen() function with more than expected no. of arguments --
-
-Warning: fsockopen() expects at most 5 parameters, 6 given in %s on line %d
-bool(false)
-string(10) "string_val"
-int(10)
-
--- Testing fsockopen() function with less than expected no. of arguments --
-
-Warning: fsockopen() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-- Attempting to connect to a non-existent socket --
Warning: fsockopen(): unable to connect to tcp://127.0.0.1:31337 (%a) in %s on line %d
diff --git a/ext/standard/tests/network/gethostbyaddr_basic1.phpt b/ext/standard/tests/network/gethostbyaddr_basic1.phpt
index 0e65937871..27605e7d2a 100644
--- a/ext/standard/tests/network/gethostbyaddr_basic1.phpt
+++ b/ext/standard/tests/network/gethostbyaddr_basic1.phpt
@@ -11,8 +11,6 @@ echo "*** Testing gethostbyaddr() : basic functionality ***\n";
echo gethostbyaddr("127.0.0.1")."\n";
?>
-===DONE===
--EXPECTF--
*** Testing gethostbyaddr() : basic functionality ***
%rloopback|localhost(\.localdomain)?|%s%r
-===DONE===
diff --git a/ext/standard/tests/network/gethostbyaddr_error.phpt b/ext/standard/tests/network/gethostbyaddr_error.phpt
index f7982d5ca4..a33a71185f 100644
--- a/ext/standard/tests/network/gethostbyaddr_error.phpt
+++ b/ext/standard/tests/network/gethostbyaddr_error.phpt
@@ -11,16 +11,6 @@ Test gethostbyaddr() function : error conditions
echo "Testing gethostbyaddr : error conditions\n";
-// Zero arguments
-echo "\n-- Testing gethostbyaddr function with Zero arguments --\n";
-var_dump( gethostbyaddr() );
-
-//Test gethostbyaddr with one more than the expected number of arguments
-echo "\n-- Testing gethostbyaddr function with more than expected no. of arguments --\n";
-$ip_address = 'string_val';
-$extra_arg = 10;
-var_dump( gethostbyaddr($ip_address, $extra_arg) );
-
echo "\n-- Testing gethostbyaddr function with invalid addresses --\n";
$ip_address = 'invalid';
@@ -37,16 +27,6 @@ echo "Done";
--EXPECTREGEX--
Testing gethostbyaddr : error conditions
--- Testing gethostbyaddr function with Zero arguments --
-
-Warning: gethostbyaddr\(\) expects exactly 1 parameter, 0 given in .* on line \d+
-NULL
-
--- Testing gethostbyaddr function with more than expected no. of arguments --
-
-Warning: gethostbyaddr\(\) expects exactly 1 parameter, 2 given in .* on line \d+
-NULL
-
-- Testing gethostbyaddr function with invalid addresses --
Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or IPv6 address) in .* on line \d+
diff --git a/ext/standard/tests/network/gethostbyname_basic003.phpt b/ext/standard/tests/network/gethostbyname_basic003.phpt
index 6462126a0d..d7df11ec76 100644
--- a/ext/standard/tests/network/gethostbyname_basic003.phpt
+++ b/ext/standard/tests/network/gethostbyname_basic003.phpt
@@ -11,8 +11,6 @@ echo "*** Testing gethostbyname() : basic functionality ***\n";
echo gethostbyname("localhost")."\n";
?>
-===DONE===
--EXPECT--
*** Testing gethostbyname() : basic functionality ***
127.0.0.1
-===DONE===
diff --git a/ext/standard/tests/network/gethostbynamel_basic1.phpt b/ext/standard/tests/network/gethostbynamel_basic1.phpt
index 94fd2a01ff..85e2ff473d 100644
--- a/ext/standard/tests/network/gethostbynamel_basic1.phpt
+++ b/ext/standard/tests/network/gethostbynamel_basic1.phpt
@@ -10,10 +10,8 @@ Test gethostbynamel() function : basic functionality
echo "*** Testing gethostbynamel() : basic functionality ***\n";
var_dump(gethostbynamel("localhost"));
?>
-===DONE===
--EXPECTF--
*** Testing gethostbynamel() : basic functionality ***
array(%d) {
%a
}
-===DONE===
diff --git a/ext/standard/tests/network/gethostname.phpt b/ext/standard/tests/network/gethostname.phpt
index e7caaf48eb..57f4c498d0 100644
--- a/ext/standard/tests/network/gethostname.phpt
+++ b/ext/standard/tests/network/gethostname.phpt
@@ -5,10 +5,6 @@ marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao p
--FILE--
<?php
var_dump(gethostname());
-var_dump(gethostname("php-zend-brazil"));
?>
--EXPECTF--
-%s
-
-Warning: gethostname() expects exactly %d parameters, %d given in %s on line %d
-NULL
+string(%d) "%s"
diff --git a/ext/standard/tests/network/getprotobyname_error.phpt b/ext/standard/tests/network/getprotobyname_error.phpt
index 7ee366ac7a..52ef3b8ee0 100644
--- a/ext/standard/tests/network/getprotobyname_error.phpt
+++ b/ext/standard/tests/network/getprotobyname_error.phpt
@@ -4,13 +4,8 @@ getprotobyname function errors test
edgarsandi - <edgar.r.sandi@gmail.com>
--FILE--
<?php
- // empty protocol name
- var_dump(getprotobyname());
-
- // invalid protocol name
- var_dump(getprotobyname('abc'));
+// invalid protocol name
+var_dump(getprotobyname('abc'));
?>
---EXPECTF--
-Warning: getprotobyname() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
bool(false)
diff --git a/ext/standard/tests/network/getprotobynumber_error.phpt b/ext/standard/tests/network/getprotobynumber_error.phpt
index 7df12e864a..dda2661b5a 100644
--- a/ext/standard/tests/network/getprotobynumber_error.phpt
+++ b/ext/standard/tests/network/getprotobynumber_error.phpt
@@ -4,13 +4,8 @@ getprotobynumber function errors test
edgarsandi - <edgar.r.sandi@gmail.com>
--FILE--
<?php
- // empty protocol number
- var_dump(getprotobynumber());
-
- // invalid protocol number
- var_dump(getprotobynumber(999));
+// invalid protocol number
+var_dump(getprotobynumber(999));
?>
---EXPECTF--
-Warning: getprotobynumber() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
bool(false)
diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt
index a1e70a0020..81db0016b5 100644
--- a/ext/standard/tests/network/inet.phpt
+++ b/ext/standard/tests/network/inet.phpt
@@ -14,12 +14,10 @@ var_dump(inet_ntop($packed));
$packed = chr(255) . chr(255) . chr(255) . chr(0);
var_dump(inet_ntop($packed));
-var_dump(inet_ntop());
var_dump(inet_ntop(-1));
var_dump(inet_ntop(""));
var_dump(inet_ntop("blah-blah"));
-var_dump(inet_pton());
var_dump(inet_pton(""));
var_dump(inet_pton(-1));
var_dump(inet_pton("abra"));
@@ -40,15 +38,9 @@ echo "Done\n";
--EXPECTF--
string(9) "127.0.0.1"
string(13) "255.255.255.0"
-
-Warning: inet_ntop() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
bool(false)
bool(false)
bool(false)
-
-Warning: inet_pton() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
bool(false)
bool(false)
bool(false)
diff --git a/ext/standard/tests/network/ip.phpt b/ext/standard/tests/network/ip.phpt
index 5237c89776..831eee018a 100644
--- a/ext/standard/tests/network/ip.phpt
+++ b/ext/standard/tests/network/ip.phpt
@@ -21,16 +21,11 @@ foreach ($array as $ip) {
var_dump(long2ip($long));
}
-var_dump(ip2long());
var_dump(ip2long(""));
var_dump(ip2long("777.777.777.777"));
var_dump(ip2long("111.111.111.111"));
-var_dump(ip2long(array()));
-var_dump(long2ip());
var_dump(long2ip(-110000));
-var_dump(long2ip(""));
-var_dump(long2ip(array()));
echo "Done\n";
?>
@@ -47,23 +42,8 @@ int(0)
string(7) "0.0.0.0"
int(1118019956)
string(14) "66.163.161.116"
-
-Warning: ip2long() expects exactly 1 parameter, 0 given in %sip.php on line %d
-NULL
bool(false)
bool(false)
int(1869573999)
-
-Warning: ip2long() expects parameter 1 to be string, array given in %sip.php on line %d
-NULL
-
-Warning: long2ip() expects exactly 1 parameter, 0 given in %sip.php on line %d
-NULL
string(13) "255.254.82.80"
-
-Warning: long2ip() expects parameter 1 to be int, string given in %sip.php on line %d
-NULL
-
-Warning: long2ip() expects parameter 1 to be int, array given in %sip.php on line %d
-NULL
Done
diff --git a/ext/standard/tests/network/ip2long_variation2.phpt b/ext/standard/tests/network/ip2long_variation2.phpt
index d85b6ba3c9..0fcd701b26 100644
--- a/ext/standard/tests/network/ip2long_variation2.phpt
+++ b/ext/standard/tests/network/ip2long_variation2.phpt
@@ -27,7 +27,6 @@ foreach($ips as $ip) {
}
?>
-===DONE===
--EXPECT--
bool(false)
int(2130706433)
@@ -37,4 +36,3 @@ bool(false)
int(-1062731776)
bool(false)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/network/ip2long_variation2_x64.phpt b/ext/standard/tests/network/ip2long_variation2_x64.phpt
index a6fde5bdd9..563f579b84 100644
--- a/ext/standard/tests/network/ip2long_variation2_x64.phpt
+++ b/ext/standard/tests/network/ip2long_variation2_x64.phpt
@@ -34,7 +34,6 @@ foreach($ips as $ip) {
}
?>
-===DONE===
--EXPECT--
bool(false)
int(2130706433)
@@ -44,4 +43,3 @@ bool(false)
int(3232235520)
bool(false)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/network/ip_x86_64.phpt b/ext/standard/tests/network/ip_x86_64.phpt
index 3c530b8371..06ed1549a6 100644
--- a/ext/standard/tests/network/ip_x86_64.phpt
+++ b/ext/standard/tests/network/ip_x86_64.phpt
@@ -21,16 +21,11 @@ foreach ($array as $ip) {
var_dump(long2ip($long));
}
-var_dump(ip2long());
var_dump(ip2long(""));
var_dump(ip2long("777.777.777.777"));
var_dump(ip2long("111.111.111.111"));
-var_dump(ip2long(array()));
-var_dump(long2ip());
var_dump(long2ip(-110000));
-var_dump(long2ip(""));
-var_dump(long2ip(array()));
echo "Done\n";
?>
@@ -47,23 +42,8 @@ int(0)
string(7) "0.0.0.0"
int(1118019956)
string(14) "66.163.161.116"
-
-Warning: ip2long() expects exactly 1 parameter, 0 given in %sip_x86_64.php on line %d
-NULL
bool(false)
bool(false)
int(1869573999)
-
-Warning: ip2long() expects parameter 1 to be string, array given in %sip_x86_64.php on line %d
-NULL
-
-Warning: long2ip() expects exactly 1 parameter, 0 given in %sip_x86_64.php on line %d
-NULL
string(13) "255.254.82.80"
-
-Warning: long2ip() expects parameter 1 to be int, string given in %sip_x86_64.php on line %d
-NULL
-
-Warning: long2ip() expects parameter 1 to be int, array given in %sip_x86_64.php on line %d
-NULL
Done
diff --git a/ext/standard/tests/network/syslog_basic.phpt b/ext/standard/tests/network/syslog_basic.phpt
index 47da28f094..196b167f8b 100644
--- a/ext/standard/tests/network/syslog_basic.phpt
+++ b/ext/standard/tests/network/syslog_basic.phpt
@@ -19,8 +19,6 @@ $message = 'A test syslog call invocation';
var_dump( syslog($priority, $message) );
?>
-===DONE===
--EXPECT--
*** Testing syslog() : basic functionality ***
bool(true)
-===DONE===
diff --git a/ext/standard/tests/password/bug75221.phpt b/ext/standard/tests/password/bug75221.phpt
index bd6e386a16..64d8fb14d1 100644
--- a/ext/standard/tests/password/bug75221.phpt
+++ b/ext/standard/tests/password/bug75221.phpt
@@ -13,7 +13,5 @@ $hash = password_hash(
);
var_dump(substr($hash, -1, 1) !== "\0");
?>
-===DONE===
--EXPECT--
bool(true)
-===DONE===
diff --git a/ext/standard/tests/password/password_bcrypt_errors.phpt b/ext/standard/tests/password/password_bcrypt_errors.phpt
index a0826080e6..64496744cb 100644
--- a/ext/standard/tests/password/password_bcrypt_errors.phpt
+++ b/ext/standard/tests/password/password_bcrypt_errors.phpt
@@ -8,14 +8,6 @@ var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => 3)));
var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => 32)));
-var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => "foo")));
-
-var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => "123456789012345678901")));
-
-var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => 123)));
-
-var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => "foo")));
-
?>
--EXPECTF--
Warning: password_hash(): Invalid bcrypt cost parameter specified: 3 in %s on line %d
@@ -23,21 +15,3 @@ NULL
Warning: password_hash(): Invalid bcrypt cost parameter specified: 32 in %s on line %d
NULL
-
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-
-Warning: password_hash(): Provided salt is too short: 3 expecting 22 in %s on line %d
-NULL
-
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-
-Warning: password_hash(): Provided salt is too short: 21 expecting 22 in %s on line %d
-NULL
-
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-
-Warning: password_hash(): Provided salt is too short: 3 expecting 22 in %s on line %d
-NULL
-
-Warning: password_hash(): Invalid bcrypt cost parameter specified: 0 in %s on line %d
-NULL
diff --git a/ext/standard/tests/password/password_deprecated_salts.phpt b/ext/standard/tests/password/password_deprecated_salts.phpt
deleted file mode 100644
index c173401067..0000000000
--- a/ext/standard/tests/password/password_deprecated_salts.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-Test deprecated operation of password_hash()
---FILE--
-<?php
-//-=-=-=-
-
-
-var_dump(password_hash("rasmuslerdorf", PASSWORD_BCRYPT, array("cost" => 7, "salt" => "usesomesillystringforsalt")));
-
-var_dump(password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0))));
-
-echo "OK!";
-?>
---EXPECTF--
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-string(60) "$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi"
-
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-string(60) "$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y"
-OK!
diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt
index 6416eca91b..cb50654905 100644
--- a/ext/standard/tests/password/password_hash_error.phpt
+++ b/ext/standard/tests/password/password_hash_error.phpt
@@ -4,51 +4,40 @@ Test error operation of password_hash()
<?php
//-=-=-=-
-var_dump(password_hash());
-
-var_dump(password_hash("foo"));
+try {
+ var_dump(password_hash("foo"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(password_hash("foo", array()));
-var_dump(password_hash("foo", 19, new StdClass));
-
-var_dump(password_hash("foo", PASSWORD_BCRYPT, "baz"));
-
-var_dump(password_hash(array(), PASSWORD_BCRYPT));
+try {
+ var_dump(password_hash("foo", 19, new StdClass));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
-var_dump(password_hash("123", PASSWORD_BCRYPT, array("salt" => array())));
+try {
+ var_dump(password_hash("foo", PASSWORD_BCRYPT, "baz"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
-/* Non-string salt, checking for memory leaks */
-var_dump(password_hash('123', PASSWORD_BCRYPT, array('salt' => 1234)));
+try {
+ var_dump(password_hash(array(), PASSWORD_BCRYPT));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
--EXPECTF--
-Warning: password_hash() expects at least 2 parameters, 0 given in %s on line %d
-NULL
+password_hash() expects at least 2 parameters, 1 given
-Warning: password_hash() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Warning: password_hash(): Unknown password hashing algorithm: Array in %s on line %d
NULL
-
-Warning: password_hash(): Unknown password hashing algorithm: 19 in %s on line %d
-NULL
-
-Warning: password_hash() expects parameter 3 to be array, string given in %s on line %d
-NULL
-
-Warning: password_hash() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-
-Warning: password_hash(): Non-string salt parameter supplied in %s on line %d
-NULL
-
-Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in %s on line %d
-
-Warning: password_hash(): Provided salt is too short: 4 expecting 22 in %s on line %d
-NULL
+password_hash() expects parameter 3 to be array, object given
+password_hash() expects parameter 3 to be array, string given
+password_hash() expects parameter 1 to be string, array given
diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt
index 7180d11de7..f64723ee85 100644
--- a/ext/standard/tests/password/password_needs_rehash_error.phpt
+++ b/ext/standard/tests/password/password_needs_rehash_error.phpt
@@ -3,29 +3,32 @@ Test error operation of password_needs_rehash()
--FILE--
<?php
//-=-=-=-
-var_dump(password_needs_rehash());
-var_dump(password_needs_rehash(''));
+try {
+ var_dump(password_needs_rehash(''));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(password_needs_rehash('', []));
-var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT));
+try {
+ var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
-var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo"));
+try {
+ var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "OK!";
?>
--EXPECTF--
-Warning: password_needs_rehash() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: password_needs_rehash() expects at least 2 parameters, 1 given in %s on line %d
-NULL
+password_needs_rehash() expects at least 2 parameters, 1 given
bool(false)
-
-Warning: password_needs_rehash() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: password_needs_rehash() expects parameter 3 to be array, string given in %s on line %d
-NULL
+password_needs_rehash() expects parameter 1 to be string, array given
+password_needs_rehash() expects parameter 3 to be array, string given
OK!
diff --git a/ext/standard/tests/password/password_removed_salt_option.phpt b/ext/standard/tests/password/password_removed_salt_option.phpt
new file mode 100644
index 0000000000..356bdec3e8
--- /dev/null
+++ b/ext/standard/tests/password/password_removed_salt_option.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Test removed support for explicit salt option
+--FILE--
+<?php
+//-=-=-=-
+
+
+var_dump(strlen(password_hash("rasmuslerdorf", PASSWORD_BCRYPT, array("cost" => 7, "salt" => "usesomesillystringforsalt"))));
+
+var_dump(strlen(password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0)))));
+
+echo "OK!";
+?>
+--EXPECTF--
+Warning: password_hash(): The 'salt' option is no longer supported. The provided salt has been been ignored in %s on line %d
+int(60)
+
+Warning: password_hash(): The 'salt' option is no longer supported. The provided salt has been been ignored in %s on line %d
+int(60)
+OK!
diff --git a/ext/standard/tests/password/password_verify_error.phpt b/ext/standard/tests/password/password_verify_error.phpt
index 7f680af448..192a4ae288 100644
--- a/ext/standard/tests/password/password_verify_error.phpt
+++ b/ext/standard/tests/password/password_verify_error.phpt
@@ -4,14 +4,12 @@ Test error operation of password_verify()
<?php
//-=-=-=-
-var_dump(password_verify());
-
-var_dump(password_verify("foo"));
+try {
+ var_dump(password_verify("foo"));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-Warning: password_verify() expects exactly 2 parameters, 0 given in %s on line %d
-bool(false)
-
-Warning: password_verify() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
+--EXPECT--
+password_verify() expects exactly 2 parameters, 1 given
diff --git a/ext/standard/tests/php_version_win_const.phpt b/ext/standard/tests/php_version_win_const.phpt
index 12de79b1ae..ea7c11f071 100644
--- a/ext/standard/tests/php_version_win_const.phpt
+++ b/ext/standard/tests/php_version_win_const.phpt
@@ -10,9 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
<?php
var_dump(PHP_WINDOWS_VERSION_MAJOR > 0, PHP_WINDOWS_VERSION_MAJOR, PHP_WINDOWS_VERSION_MINOR);
?>
-==DONE==
--EXPECTF--
bool(true)
int(%d)
int(%d)
-==DONE==
diff --git a/ext/standard/tests/random/reflection.phpt b/ext/standard/tests/random/reflection.phpt
index 2df6a33be7..662b23e8b0 100644
--- a/ext/standard/tests/random/reflection.phpt
+++ b/ext/standard/tests/random/reflection.phpt
@@ -10,10 +10,8 @@ $rf = new ReflectionFunction('random_int');
var_dump($rf->getNumberOfParameters());
var_dump($rf->getNumberOfRequiredParameters());
?>
-===DONE===
--EXPECT--
int(1)
int(1)
int(2)
int(2)
-===DONE===
diff --git a/ext/standard/tests/serialize/002.phpt b/ext/standard/tests/serialize/002.phpt
index 635e728968..9d06f22d41 100644
--- a/ext/standard/tests/serialize/002.phpt
+++ b/ext/standard/tests/serialize/002.phpt
@@ -12,7 +12,6 @@ var_dump(unserialize('a:2:{i:0;a:0:{}i:1;a:0:{}}'));
var_dump(unserialize('a:3:{i:0;s:3:"foo";i:1;s:3:"bar";i:2;s:3:"baz";}'));
var_dump(unserialize('O:8:"stdClass":0:{}'));
?>
-===DONE===
--EXPECTF--
bool(false)
bool(true)
@@ -41,4 +40,3 @@ array(3) {
}
object(stdClass)#%d (0) {
}
-===DONE===
diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt
index c0f5917ec9..13ae050129 100644
--- a/ext/standard/tests/serialize/005.phpt
+++ b/ext/standard/tests/serialize/005.phpt
@@ -127,8 +127,6 @@ var_dump(unserialize('O:19:"autoload_implements":0:{}'));
echo "===AutoNA===\n";
var_dump(unserialize('O:22:"autoload_not_available":0:{}'));
?>
-===DONE===
-<?php exit(0); ?>
--EXPECTF--
===O1===
TestOld::__sleep()
@@ -182,4 +180,3 @@ object(__PHP_Incomplete_Class)#%d (1) {
["__PHP_Incomplete_Class_Name"]=>
string(22) "autoload_not_available"
}
-===DONE===
diff --git a/ext/standard/tests/serialize/bug25378.phpt b/ext/standard/tests/serialize/bug25378.phpt
index 70bfbb46a3..ab8cd987e5 100644
--- a/ext/standard/tests/serialize/bug25378.phpt
+++ b/ext/standard/tests/serialize/bug25378.phpt
@@ -16,7 +16,6 @@ var_dump(unserialize("s:3000:\"123"));
var_dump(unserialize("s:3:\"123;"));
var_dump(unserialize("s:0:\"123\";"));
?>
-===DONE===
--EXPECTF--
Notice: unserialize(): Error at offset 0 of 8 bytes in %sbug25378.php on line %d
bool(false)
@@ -56,4 +55,3 @@ bool(false)
Notice: unserialize(): Error at offset 5 of 10 bytes in %sbug25378.php on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt
index 41ef9dd565..4b45d8d1ef 100644
--- a/ext/standard/tests/serialize/bug30234.phpt
+++ b/ext/standard/tests/serialize/bug30234.phpt
@@ -25,7 +25,6 @@ var_dump(interface_exists('autoload_interface', false));
var_dump(class_exists('autoload_implements', false));
?>
-===DONE===
--EXPECTF--
bool(false)
bool(false)
@@ -36,4 +35,3 @@ object(autoload_implements)#%d (0) {
bool(true)
bool(true)
bool(true)
-===DONE===
diff --git a/ext/standard/tests/serialize/bug31402.phpt b/ext/standard/tests/serialize/bug31402.phpt
index 566e959554..66ade571fc 100644
--- a/ext/standard/tests/serialize/bug31402.phpt
+++ b/ext/standard/tests/serialize/bug31402.phpt
@@ -33,7 +33,6 @@ $after = unserialize($ser);
var_dump($before, $after);
?>
-===DONE===
--EXPECTF--
object(TestY)#%d (2) {
["A"]=>
@@ -85,4 +84,3 @@ object(TestY)#%d (2) {
int(1)
}
}
-===DONE===
diff --git a/ext/standard/tests/serialize/bug68545.phpt b/ext/standard/tests/serialize/bug68545.phpt
index c33155d269..9c37ab7c4f 100644
--- a/ext/standard/tests/serialize/bug68545.phpt
+++ b/ext/standard/tests/serialize/bug68545.phpt
@@ -4,8 +4,6 @@ Bug #68545 NULL pointer dereference in unserialize.c:var_push_dtor
<?php
var_dump(unserialize('a:6:{a:6:{s:3:"322";s:3:"bar";s:3:"bar";s:3:"foo";a:6:{a:6:{s:3:"322";s:3:"bar";s:3:"bar";s:3:"foo";s:3:"bar";a:6:{a:6:{s:3:"322";s:3:"bar";s:3:"bar";s:3:"foo";a:6:{a:6:{s:3:"322";s:3:"bar";s:3:"b22";s:3:"bar";s:3:"bar";s:3:"foo";s:3:"bar";a:6:{a:6:{s:3:"322";s:3:"bar";s:3:"bar";s:3:"foo";s:3:"bar";s:3:"bar";'));
?>
-===DONE===
--EXPECTF--
Notice: unserialize(): Error at offset %d of %d bytes in %sbug68545.php on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/serialize/bug68976.phpt b/ext/standard/tests/serialize/bug68976.phpt
index 4e61e65354..d9ca33bdf7 100644
--- a/ext/standard/tests/serialize/bug68976.phpt
+++ b/ext/standard/tests/serialize/bug68976.phpt
@@ -25,7 +25,6 @@ for($i = 0; $i < 5; $i++) {
var_dump($data);
?>
-===DONE===
--EXPECT--
array(2) {
[0]=>
@@ -34,4 +33,3 @@ array(2) {
[1]=>
int(1)
}
-===DONE===
diff --git a/ext/standard/tests/serialize/bug69152.phpt b/ext/standard/tests/serialize/bug69152.phpt
index c4dbcd6926..abd0281a12 100644
--- a/ext/standard/tests/serialize/bug69152.phpt
+++ b/ext/standard/tests/serialize/bug69152.phpt
@@ -9,8 +9,6 @@ $x->test();
?>
--EXPECTF--
-Exception in %s:%d
-Stack trace:
-#0 {main}
-
-Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in %s on line %d
+Fatal error: Uncaught TypeError: trace is not an array in %s:%d
+%a
+ thrown in %s on line %d
diff --git a/ext/standard/tests/serialize/bug69793.phpt b/ext/standard/tests/serialize/bug69793.phpt
index 8426c1573e..b2d9fbb256 100644
--- a/ext/standard/tests/serialize/bug69793.phpt
+++ b/ext/standard/tests/serialize/bug69793.phpt
@@ -7,11 +7,11 @@ $e = unserialize('O:9:"Exception":7:{s:17:"'."\0".'Exception'."\0".'string";s:1:
var_dump($e."");
?>
--EXPECTF--
-Notice: Undefined property: Exception::$file in %s%ebug69793.php on line %d
+Warning: Undefined property: Exception::$file in %s on line %d
-Notice: Undefined property: Exception::$previous in %s%ebug69793.php on line %d
+Warning: Undefined property: Exception::$previous in %s on line %d
-Notice: Undefined property: Exception::$previous in %s%ebug69793.php on line %d
+Warning: Undefined property: Exception::$previous in %s on line %d
string(41) "Exception in :1337
Stack trace:
#0 {main}"
diff --git a/ext/standard/tests/serialize/bug74300.phpt b/ext/standard/tests/serialize/bug74300.phpt
index d9adda256b..53c6e9a01f 100644
--- a/ext/standard/tests/serialize/bug74300.phpt
+++ b/ext/standard/tests/serialize/bug74300.phpt
@@ -7,10 +7,8 @@ serialize_precision=10
var_dump(unserialize('d:2e+2;'));
var_dump(unserialize('d:2e++2;'));
?>
-===DONE===
--EXPECTF--
float(200)
Notice: unserialize(): Error at offset 0 of 8 bytes in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/serialize/serialization_objects_002.phpt b/ext/standard/tests/serialize/serialization_objects_002.phpt
index c7f9e1cbd3..920fd35310 100644
--- a/ext/standard/tests/serialize/serialization_objects_002.phpt
+++ b/ext/standard/tests/serialize/serialization_objects_002.phpt
Binary files differ
diff --git a/ext/standard/tests/serialize/serialization_objects_005.phpt b/ext/standard/tests/serialize/serialization_objects_005.phpt
index 4c631c6a59..48325f4fba 100644
--- a/ext/standard/tests/serialize/serialization_objects_005.phpt
+++ b/ext/standard/tests/serialize/serialization_objects_005.phpt
@@ -77,7 +77,7 @@ string(9) "p.changed"
bool(false)
bool(true)
-Notice: Undefined property: C::$x in %s on line 37
+Warning: Undefined property: C::$x in %s on line %d
NULL
diff --git a/ext/standard/tests/serialize/typed_property_refs.phpt b/ext/standard/tests/serialize/typed_property_refs.phpt
index 9475e8a783..72bad612b0 100644
--- a/ext/standard/tests/serialize/typed_property_refs.phpt
+++ b/ext/standard/tests/serialize/typed_property_refs.phpt
@@ -66,8 +66,8 @@ object(B)#1 (2) {
["b"]=>
&int(1)
}
-Typed property A::$a must be int, null used
-Typed property B::$b must be int, null used
-Typed property C::$b must be string, int used
-Typed property C::$a must be int, string used
+Cannot assign null to property A::$a of type int
+Cannot assign null to property B::$b of type int
+Cannot assign int to property C::$b of type string
+Cannot assign string to property C::$a of type int
Reference with value of type int held by property D::$a of type int is not compatible with property D::$b of type float
diff --git a/ext/standard/tests/streams/bug40459.phpt b/ext/standard/tests/streams/bug40459.phpt
index ce06a3f804..9dc501170a 100644
--- a/ext/standard/tests/streams/bug40459.phpt
+++ b/ext/standard/tests/streams/bug40459.phpt
@@ -92,7 +92,6 @@ echo "\n";
?>
-==DONE==
--EXPECT--
stream_open: yes
url_stat: yes
@@ -102,4 +101,3 @@ mkdir: yes
rename: yes
unlink: yes
touch: yes
-==DONE==
diff --git a/ext/standard/tests/streams/bug46426.phpt b/ext/standard/tests/streams/bug46426.phpt
index 8c95ea456e..b69c6c557b 100644
--- a/ext/standard/tests/streams/bug46426.phpt
+++ b/ext/standard/tests/streams/bug46426.phpt
@@ -21,8 +21,6 @@ echo stream_get_contents($tmp, 1, 0);
echo "\n";
echo stream_get_contents($tmp, -1);
-@unlink($tmp);
-
?>
--EXPECT--
23
diff --git a/ext/standard/tests/streams/bug49936.phpt b/ext/standard/tests/streams/bug49936.phpt
index dccf87474c..d38d15624e 100644
--- a/ext/standard/tests/streams/bug49936.phpt
+++ b/ext/standard/tests/streams/bug49936.phpt
@@ -14,8 +14,6 @@ var_dump(@opendir($dir));
var_dump(@opendir($dir));
?>
-===DONE===
--EXPECT--
bool(false)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/streams/bug53903.phpt b/ext/standard/tests/streams/bug53903.phpt
index fd0b770f6b..ca04a5ca14 100644
--- a/ext/standard/tests/streams/bug53903.phpt
+++ b/ext/standard/tests/streams/bug53903.phpt
@@ -24,7 +24,7 @@ $s[] = 1; // Cannot use a scalar value as an array
print_r($s);
--EXPECTF--
-Notice: Undefined property: sw::$undefined in %s on line %d
+Warning: Undefined property: sw::$undefined in %s on line %d
Array
(
[0] => 1
diff --git a/ext/standard/tests/streams/bug54623.phpt b/ext/standard/tests/streams/bug54623.phpt
index c21dc82019..02b1924eea 100644
--- a/ext/standard/tests/streams/bug54623.phpt
+++ b/ext/standard/tests/streams/bug54623.phpt
@@ -9,9 +9,12 @@ $sock2 = pfsockopen('udp://127.0.0.1', '63844');
var_dump((int)$sock2);
@fwrite($sock2, "2");
fclose($sock2);
-fwrite($sock, "3");
+try {
+ fwrite($sock, "3");
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
--EXPECTF--
int(%d)
int(%d)
-
-Warning: fwrite(): supplied resource is not a valid stream resource in %s on line %d
+fwrite(): supplied resource is not a valid stream resource
diff --git a/ext/standard/tests/streams/bug54946.phpt b/ext/standard/tests/streams/bug54946.phpt
index 0f58d19647..d057766ff2 100644
--- a/ext/standard/tests/streams/bug54946.phpt
+++ b/ext/standard/tests/streams/bug54946.phpt
@@ -30,7 +30,6 @@ var_dump($retval);
fclose($stream);
unlink($filename);
?>
-===DONE===
--EXPECTF--
Notice: stream_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
string(0) ""
@@ -40,4 +39,3 @@ string(0) ""
Notice: stream_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
string(0) ""
-===DONE===
diff --git a/ext/standard/tests/streams/bug60602.phpt b/ext/standard/tests/streams/bug60602.phpt
index 82917ecbd6..396695f772 100644
--- a/ext/standard/tests/streams/bug60602.phpt
+++ b/ext/standard/tests/streams/bug60602.phpt
@@ -46,10 +46,8 @@ if (is_resource($p)) {
echo "no process\n";
}
?>
-==DONE==
--EXPECTF--
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
int(%d)
int(0)
bool(true)
-==DONE==
diff --git a/ext/standard/tests/streams/bug61019.phpt b/ext/standard/tests/streams/bug61019.phpt
index 7fead5362f..db0bf9d6a5 100644
--- a/ext/standard/tests/streams/bug61019.phpt
+++ b/ext/standard/tests/streams/bug61019.phpt
@@ -67,7 +67,6 @@ else
echo "Can't start external command\n";
}
?>
-===DONE===
--EXPECT--
Test
External command executed
@@ -75,4 +74,3 @@ External command exit: 0
STDOUT: testtext
STDERR:
-===DONE===
diff --git a/ext/standard/tests/streams/bug64770.phpt b/ext/standard/tests/streams/bug64770.phpt
index bb904d7446..df25d3f8ca 100644
--- a/ext/standard/tests/streams/bug64770.phpt
+++ b/ext/standard/tests/streams/bug64770.phpt
@@ -45,8 +45,6 @@ if (is_resource($p)) {
echo "no process\n";
}
?>
-==DONE==
--EXPECTF--
int(%d)
int(0)
-==DONE==
diff --git a/ext/standard/tests/streams/bug70198.phpt b/ext/standard/tests/streams/bug70198.phpt
index 83efb9669b..94585db882 100644
--- a/ext/standard/tests/streams/bug70198.phpt
+++ b/ext/standard/tests/streams/bug70198.phpt
@@ -56,7 +56,5 @@ if (!$fp) {
proc_close($srv_proc);
unlink($srv_fl);
?>
-==DONE==
--EXPECT--
int(0)
-==DONE==
diff --git a/ext/standard/tests/streams/bug72771.phpt b/ext/standard/tests/streams/bug72771.phpt
index ebb358707e..1b94b334e4 100644
--- a/ext/standard/tests/streams/bug72771.phpt
+++ b/ext/standard/tests/streams/bug72771.phpt
@@ -16,8 +16,6 @@ $path="ftps://127.0.0.1:" . $port."/";
$ds=opendir($path, $context);
var_dump($ds);
?>
-==DONE==
--EXPECTF--
Warning: opendir(ftps://127.0.0.1:%d/): failed to open dir: Server doesn't support FTPS. in %s on line %d
bool(false)
-==DONE==
diff --git a/ext/standard/tests/streams/bug72857.phpt b/ext/standard/tests/streams/bug72857.phpt
index 7b71c269f4..a74dff9c7e 100644
--- a/ext/standard/tests/streams/bug72857.phpt
+++ b/ext/standard/tests/streams/bug72857.phpt
@@ -13,8 +13,6 @@ Bug #72857 stream_socket_recvfrom read access violation
fclose($fp0);
unlink($fname);
?>
-==DONE==
--EXPECT--
bool(false)
NULL
-==DONE==
diff --git a/ext/standard/tests/streams/bug73457.phpt b/ext/standard/tests/streams/bug73457.phpt
index a49a2026b7..f60d65385e 100644
--- a/ext/standard/tests/streams/bug73457.phpt
+++ b/ext/standard/tests/streams/bug73457.phpt
@@ -16,8 +16,6 @@ $path="ftp://127.0.0.1:" . $port."/bug73457";
$ds=file_get_contents($path);
var_dump($ds);
?>
-==DONE==
--EXPECTF--
Warning: file_get_contents(ftp://127.0.0.1:%d/bug73457): failed to open stream: Failed to set up data channel: Connection refused in %s on line %d
bool(false)
-==DONE==
diff --git a/ext/standard/tests/streams/bug74090.phpt b/ext/standard/tests/streams/bug74090.phpt
index 7a0250a124..31a5f8dc10 100644
--- a/ext/standard/tests/streams/bug74090.phpt
+++ b/ext/standard/tests/streams/bug74090.phpt
@@ -28,7 +28,5 @@ var_dump(strlen($ret) > 0);
stream_socket_shutdown($fd, STREAM_SHUT_RDWR);
stream_socket_shutdown($server, STREAM_SHUT_RDWR);
?>
-==DONE==
--EXPECT--
bool(true)
-==DONE==
diff --git a/ext/standard/tests/streams/bug77680.phpt b/ext/standard/tests/streams/bug77680.phpt
index 8537bd4e36..7fe8062e6e 100644
--- a/ext/standard/tests/streams/bug77680.phpt
+++ b/ext/standard/tests/streams/bug77680.phpt
@@ -15,7 +15,6 @@ $path = "ftp://localhost:" . $port."/one/two/three/";
mkdir($path, 0755, true);
?>
-==DONE==
--EXPECTF--
string(20) "CWD /one/two/three
"
@@ -33,4 +32,3 @@ string(14) "MKD /one/two
"
string(20) "MKD /one/two/three
"
-==DONE==
diff --git a/ext/standard/tests/streams/bug77765.phpt b/ext/standard/tests/streams/bug77765.phpt
index fa933ffc0d..e048db53e4 100644
--- a/ext/standard/tests/streams/bug77765.phpt
+++ b/ext/standard/tests/streams/bug77765.phpt
@@ -14,9 +14,7 @@ $path = "ftp://localhost:" . $port."/www";
var_dump(stat($path)['mode']);
?>
-==DONE==
--EXPECTF--
string(11) "SIZE /www
"
int(16877)
-==DONE==
diff --git a/ext/standard/tests/streams/opendir-001.phpt b/ext/standard/tests/streams/opendir-001.phpt
index d2d2ce8b9c..5659d57920 100644
--- a/ext/standard/tests/streams/opendir-001.phpt
+++ b/ext/standard/tests/streams/opendir-001.phpt
@@ -14,9 +14,7 @@ $path="ftp://localhost:" . $port."/bogusdir";
var_dump(opendir($path));
?>
-==DONE==
--EXPECTF--
Warning: opendir(ftp://localhost:%d/bogusdir): failed to open dir: FTP server reports 250 /bogusdir: No such file or directory
in %s on line %d
bool(false)
-==DONE==
diff --git a/ext/standard/tests/streams/opendir-002.phpt b/ext/standard/tests/streams/opendir-002.phpt
index a995979992..4978c8affa 100644
--- a/ext/standard/tests/streams/opendir-002.phpt
+++ b/ext/standard/tests/streams/opendir-002.phpt
@@ -21,11 +21,9 @@ while ($fn=readdir($ds)) {
closedir($ds);
?>
-==DONE==
--EXPECTF--
resource(%d) of type (stream)
string(5) "file1"
string(5) "file1"
string(3) "fil"
string(4) "b0rk"
-==DONE==
diff --git a/ext/standard/tests/streams/opendir-003.phpt b/ext/standard/tests/streams/opendir-003.phpt
index 2b3aedbf30..0d9f656261 100644
--- a/ext/standard/tests/streams/opendir-003.phpt
+++ b/ext/standard/tests/streams/opendir-003.phpt
@@ -18,9 +18,7 @@ $context = stream_context_create(array('ssl' => array('cafile' => __DIR__ . '/.
var_dump(opendir($path, $context));
?>
-==DONE==
--EXPECTF--
Warning: opendir(ftps://127.0.0.1:%d/bogusdir): failed to open dir: FTP server reports 250 /bogusdir: No such file or directory
in %s on line %d
bool(false)
-==DONE==
diff --git a/ext/standard/tests/streams/opendir-004.phpt b/ext/standard/tests/streams/opendir-004.phpt
index 06a3f944be..885a7b96bc 100644
--- a/ext/standard/tests/streams/opendir-004.phpt
+++ b/ext/standard/tests/streams/opendir-004.phpt
@@ -22,11 +22,9 @@ while ($fn=readdir($ds)) {
var_dump($fn);
}
?>
-==DONE==
--EXPECTF--
resource(%d) of type (stream)
string(5) "file1"
string(5) "file1"
string(3) "fil"
string(4) "b0rk"
-==DONE==
diff --git a/ext/standard/tests/streams/proc_open_bug51800.phpt b/ext/standard/tests/streams/proc_open_bug51800.phpt
index 7e7d2c7cb3..d54ba00262 100644
--- a/ext/standard/tests/streams/proc_open_bug51800.phpt
+++ b/ext/standard/tests/streams/proc_open_bug51800.phpt
@@ -74,7 +74,6 @@ var_dump(array(
), strlen($stdout), strlen($stderr));
?>
-===DONE===
--CLEAN--
<?php
$callee = __DIR__ . "/process_proc_open_bug51800.php";
@@ -91,4 +90,3 @@ array(3) {
}
int(10000)
int(10000)
-===DONE===
diff --git a/ext/standard/tests/streams/proc_open_bug51800_right.phpt b/ext/standard/tests/streams/proc_open_bug51800_right.phpt
index 22860f1fc3..12871cc1d3 100644
--- a/ext/standard/tests/streams/proc_open_bug51800_right.phpt
+++ b/ext/standard/tests/streams/proc_open_bug51800_right.phpt
@@ -57,7 +57,6 @@ var_dump(array(
), strlen($stdout), strlen($stderr));
?>
-===DONE===
--CLEAN--
<?php
$callee = __DIR__ . "/process_proc_open_bug51800_right.php";
@@ -74,4 +73,3 @@ array(3) {
}
int(10000)
int(10000)
-===DONE===
diff --git a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt
index d183557066..1a2f69adbb 100644
--- a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt
+++ b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt
@@ -63,7 +63,6 @@ var_dump(array(
), strlen($stdout), strlen($stderr));
?>
-===DONE===
--CLEAN--
<?php
$callee = __DIR__ . "/process_proc_open_bug51800_right2.php";
@@ -80,4 +79,3 @@ array(3) {
}
int(1000000)
int(1000000)
-===DONE===
diff --git a/ext/standard/tests/streams/proc_open_bug64438.phpt b/ext/standard/tests/streams/proc_open_bug64438.phpt
index 2880865e1d..c310775a4d 100644
--- a/ext/standard/tests/streams/proc_open_bug64438.phpt
+++ b/ext/standard/tests/streams/proc_open_bug64438.phpt
@@ -65,7 +65,6 @@ while ($pipes || $writePipes) {
var_dump($pipeEvents);
?>
-===DONE===
--EXPECTF--
array(2) {
[%d]=>
@@ -83,4 +82,3 @@ array(2) {
string(12) "Closing pipe"
}
}
-===DONE===
diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt
index 65505d09fe..0eb9e45054 100644
--- a/ext/standard/tests/streams/proc_open_bug69900.phpt
+++ b/ext/standard/tests/streams/proc_open_bug69900.phpt
@@ -49,7 +49,6 @@ fclose($pipes[1]);
proc_close($process);
?>
-===DONE===
--CLEAN--
<?php
$fl = __DIR__ . DIRECTORY_SEPARATOR . "test69900.php";
@@ -76,4 +75,3 @@ hello8
fgets() took less than %d ms
hello9
fgets() took less than %d ms
-===DONE===
diff --git a/ext/standard/tests/streams/set_file_buffer.phpt b/ext/standard/tests/streams/set_file_buffer.phpt
index 79df5a441a..5e5051c86e 100644
--- a/ext/standard/tests/streams/set_file_buffer.phpt
+++ b/ext/standard/tests/streams/set_file_buffer.phpt
@@ -43,5 +43,4 @@ option: %d, %d, %d
int(%i)
int(%d)
size: %d
-size: %d
int(%d)
diff --git a/ext/standard/tests/streams/stream_get_contents_001.phpt b/ext/standard/tests/streams/stream_get_contents_001.phpt
index dc7fcb239c..6f5abcb782 100644
--- a/ext/standard/tests/streams/stream_get_contents_001.phpt
+++ b/ext/standard/tests/streams/stream_get_contents_001.phpt
@@ -12,8 +12,6 @@ echo stream_get_contents($tmp, 2), "--\n";
echo stream_get_contents($tmp, 2, 3), "--\n";
echo stream_get_contents($tmp, 2, -1), "--\n";
-@unlink($tmp);
-
?>
--EXPECT--
--
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
index bb98d7c6e7..7bfa4f0510 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
@@ -10,48 +10,20 @@ Test stream_get_meta_data() function : error conditions
echo "*** Testing stream_get_meta_data() : error conditions ***\n";
-// Zero arguments
-echo "\n-- Testing stream_get_meta_data() function with Zero arguments --\n";
-var_dump( stream_get_meta_data() );
-
-//Test stream_get_meta_data with one more than the expected number of arguments
-echo "\n-- Testing stream_get_meta_data() function with more than expected no. of arguments --\n";
-
-$fp = null;
-$extra_arg = 10;
-var_dump( stream_get_meta_data($fp, $extra_arg) );
-
-echo "\n-- Testing stream_get_meta_data() function with invalid stream resource --\n";
-$fp = null;
-var_dump(stream_get_meta_data($fp));
-
echo "\n-- Testing stream_get_meta_data() function with closed stream resource --\n";
$fp = fopen(__FILE__, 'r');
fclose($fp);
-var_dump(stream_get_meta_data($fp));
+try {
+ var_dump(stream_get_meta_data($fp));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing stream_get_meta_data() : error conditions ***
--- Testing stream_get_meta_data() function with Zero arguments --
-
-Warning: stream_get_meta_data() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing stream_get_meta_data() function with more than expected no. of arguments --
-
-Warning: stream_get_meta_data() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Testing stream_get_meta_data() function with invalid stream resource --
-
-Warning: stream_get_meta_data() expects parameter 1 to be resource, null given in %s on line %d
-NULL
-
-- Testing stream_get_meta_data() function with closed stream resource --
-
-Warning: stream_get_meta_data(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
+stream_get_meta_data(): supplied resource is not a valid stream resource
Done
diff --git a/ext/standard/tests/streams/stream_resolve_include_path.phpt b/ext/standard/tests/streams/stream_resolve_include_path.phpt
index 4109b5672e..f77c0730f3 100644
--- a/ext/standard/tests/streams/stream_resolve_include_path.phpt
+++ b/ext/standard/tests/streams/stream_resolve_include_path.phpt
@@ -14,8 +14,6 @@ mkdir($include_path_nested);
file_put_contents($include_path_file, 'include_path');
file_put_contents($include_path_nested_file, 'include_path');
-var_dump(stream_resolve_include_path());
-
set_include_path($include_path . PATH_SEPARATOR . $include_path_nested);
var_dump(stream_resolve_include_path('file-does-not-exist'));
@@ -24,13 +22,20 @@ var_dump(stream_resolve_include_path('file'));
set_include_path($include_path_nested . PATH_SEPARATOR . $include_path);
var_dump(stream_resolve_include_path('file'));
+?>
+--CLEAN--
+<?php
+$include_path = __DIR__ . '/test_path';
+$include_path_nested = $include_path . '/nested';
+$include_path_file = $include_path . DIRECTORY_SEPARATOR . 'file';
+$include_path_nested_file = $include_path_nested . DIRECTORY_SEPARATOR . 'file';
+
unlink($include_path_nested_file);
rmdir($include_path_nested);
unlink($include_path_file);
rmdir($include_path);
+?>
--EXPECTF--
-Warning: stream_resolve_include_path() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
bool(false)
string(%d) "%stest_path%sfile"
string(%d) "%stest_path%snested%sfile"
diff --git a/ext/standard/tests/streams/stream_set_chunk_size.phpt b/ext/standard/tests/streams/stream_set_chunk_size.phpt
index 8c2ae9865b..9705580902 100644
--- a/ext/standard/tests/streams/stream_set_chunk_size.phpt
+++ b/ext/standard/tests/streams/stream_set_chunk_size.phpt
@@ -34,7 +34,7 @@ echo "should return previous chunk size (8192)\n";
var_dump(stream_set_chunk_size($f, 1));
echo "should be read without buffer (\$count == 10000)\n";
var_dump(strlen(fread($f, 10000)));
-echo "should elicit 3 writes of size 1 and return 3\n";
+echo "should have no effect on writes\n";
var_dump(fwrite($f, str_repeat('b', 3)));
echo "should return previous chunk size (1)\n";
@@ -45,13 +45,12 @@ echo "should elicit one read of size 100 (chunk size)\n";
var_dump(strlen(fread($f, 50)));
echo "should elicit no read because there is sufficient cached data\n";
var_dump(strlen(fread($f, 50)));
-echo "should elicit 2 writes of size 100 and one of size 50\n";
+echo "should have no effect on writes\n";
var_dump(strlen(fwrite($f, str_repeat('b', 250))));
echo "\nerror conditions\n";
var_dump(stream_set_chunk_size($f, 0));
var_dump(stream_set_chunk_size($f, -1));
-var_dump(stream_set_chunk_size($f, array()));
--EXPECTF--
bool(true)
should return previous chunk size (8192)
@@ -59,10 +58,8 @@ int(8192)
should be read without buffer ($count == 10000)
read with size: 10000
int(10000)
-should elicit 3 writes of size 1 and return 3
-write with size: 1
-write with size: 1
-write with size: 1
+should have no effect on writes
+write with size: 3
int(3)
should return previous chunk size (1)
int(1)
@@ -74,10 +71,8 @@ read with size: 100
int(50)
should elicit no read because there is sufficient cached data
int(50)
-should elicit 2 writes of size 100 and one of size 50
-write with size: 100
-write with size: 100
-write with size: 50
+should have no effect on writes
+write with size: 250
int(3)
error conditions
@@ -87,6 +82,3 @@ bool(false)
Warning: stream_set_chunk_size(): The chunk size must be a positive integer, given -1 in %s on line %d
bool(false)
-
-Warning: stream_set_chunk_size() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
diff --git a/ext/standard/tests/streams/stream_set_timeout_error.phpt b/ext/standard/tests/streams/stream_set_timeout_error.phpt
index 0334b951e0..7dcc645422 100644
--- a/ext/standard/tests/streams/stream_set_timeout_error.phpt
+++ b/ext/standard/tests/streams/stream_set_timeout_error.phpt
@@ -10,9 +10,6 @@ Test stream_set_timeout() function : error conditions
echo "*** Testing stream_set_timeout() : error conditions ***\n";
-//Test stream_set_timeout with one more than the expected number of arguments
-echo "\n-- Testing stream_set_timeout() function with more than expected no. of arguments --\n";
-
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
@@ -26,22 +23,14 @@ $client = fsockopen("tcp://127.0.0.1:$port");
$seconds = 10;
$microseconds = 10;
-$extra_arg = 10;
-var_dump( stream_set_timeout($client, $seconds, $microseconds, $extra_arg) );
-
-// Testing stream_set_timeout with one less than the expected number of arguments
-echo "\n-- Testing stream_set_timeout() function with less than expected no. of arguments --\n";
-
-$seconds = 10;
-var_dump( stream_set_timeout($client) );
-
echo "\n-- Testing stream_set_timeout() function with a closed socket --\n";
fclose($client);
-var_dump( stream_set_timeout($client, $seconds) );
-
-echo "\n-- Testing stream_set_timeout() function with an invalid stream --\n";
-var_dump( stream_set_timeout($seconds, $seconds) );
+try {
+ var_dump( stream_set_timeout($client, $seconds) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n-- Testing stream_set_timeout() function with a stream that does not support timeouts --\n";
$filestream = fopen(__FILE__, "r");
@@ -55,25 +44,8 @@ echo "Done";
--EXPECTF--
*** Testing stream_set_timeout() : error conditions ***
--- Testing stream_set_timeout() function with more than expected no. of arguments --
-
-Warning: stream_set_timeout() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing stream_set_timeout() function with less than expected no. of arguments --
-
-Warning: stream_set_timeout() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-- Testing stream_set_timeout() function with a closed socket --
-
-Warning: stream_set_timeout(): supplied resource is not a valid stream resource in %s on line %d
-bool(false)
-
--- Testing stream_set_timeout() function with an invalid stream --
-
-Warning: stream_set_timeout() expects parameter 1 to be resource, int given in %s on line %d
-NULL
+stream_set_timeout(): supplied resource is not a valid stream resource
-- Testing stream_set_timeout() function with a stream that does not support timeouts --
bool(false)
diff --git a/ext/standard/tests/strings/006.phpt b/ext/standard/tests/strings/006.phpt
index 7665aa20f5..4c83d93c5e 100644
--- a/ext/standard/tests/strings/006.phpt
+++ b/ext/standard/tests/strings/006.phpt
@@ -11,11 +11,9 @@ var_dump(highlight_file($file, true));
var_dump(ob_get_contents());
?>
-===DONE===
--EXPECTF--
Warning: highlight_file(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA): failed to open stream: %s006.php on line %d
Warning: highlight_file(): Failed opening 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' for highlighting in %s006.php on line %d
bool(false)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/007-win32.phpt b/ext/standard/tests/strings/007-win32.phpt
index 7d06f018a5..665a45bf0f 100644
--- a/ext/standard/tests/strings/007-win32.phpt
+++ b/ext/standard/tests/strings/007-win32.phpt
@@ -12,9 +12,7 @@ var_dump(php_strip_whitespace($file));
var_dump(ob_get_contents());
?>
-===DONE===
--EXPECTF--
Warning: php_strip_whitespace(%s): failed to open stream: No such file or directory in %s on line %d
string(0) ""
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/007.phpt b/ext/standard/tests/strings/007.phpt
index a0fd8acdf4..91b6edb717 100644
--- a/ext/standard/tests/strings/007.phpt
+++ b/ext/standard/tests/strings/007.phpt
@@ -12,9 +12,7 @@ var_dump(php_strip_whitespace($file));
var_dump(ob_get_contents());
?>
-===DONE===
--EXPECTF--
Warning: php_strip_whitespace(%s): failed to open stream: File name too long in %s007.php on line %d
string(0) ""
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/addcslashes_001.phpt b/ext/standard/tests/strings/addcslashes_001.phpt
index 4080c7214d..5b60f6168d 100644
--- a/ext/standard/tests/strings/addcslashes_001.phpt
+++ b/ext/standard/tests/strings/addcslashes_001.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/bin2hex_basic.phpt b/ext/standard/tests/strings/bin2hex_basic.phpt
index 9eb07b573e..9079f77323 100644
--- a/ext/standard/tests/strings/bin2hex_basic.phpt
+++ b/ext/standard/tests/strings/bin2hex_basic.phpt
@@ -32,7 +32,6 @@ foreach($strings as $string) {
$count ++;
}
?>
-===DONE===
--EXPECT--
*** Testing bin2hex() : basic functionality ***
-- Iteration 1 --
@@ -47,4 +46,3 @@ string(46) "4865726520697320612073696d706c6520737472696e67"
string(112) "5c74205468697320537472696e6720636f6e7461696e73205c745c7420736f6d6520636f6e74726f6c20636861726163746572735c725c6e"
-- Iteration 6 --
string(144) "5c7839305c7839315c7830305c7839335c7839345c7839305c7839315c7839355c7839365c7839375c7839385c7839395c7839615c7839625c7839635c7839645c7839655c783966"
-===DONE===
diff --git a/ext/standard/tests/strings/bug24208.phpt b/ext/standard/tests/strings/bug24208.phpt
deleted file mode 100644
index f85c9c1e54..0000000000
--- a/ext/standard/tests/strings/bug24208.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Bug #24208 (parse_str() is not working)
---FILE--
-<?php
-$a = $b = $c = "oops";
-parse_str("a=1&b=2&c=3");
-var_dump($a, $b, $c);
-?>
---EXPECTF--
-Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in %s on line %d
-string(1) "1"
-string(1) "2"
-string(1) "3"
diff --git a/ext/standard/tests/strings/bug33605.phpt b/ext/standard/tests/strings/bug33605.phpt
index 7ba38f94f5..b3cb2ece95 100644
--- a/ext/standard/tests/strings/bug33605.phpt
+++ b/ext/standard/tests/strings/bug33605.phpt
@@ -2,10 +2,12 @@
Bug #33605 (substr_compare crashes)
--FILE--
<?php
-$res = substr_compare("aa", "a", -99999999, -1, 0);
-var_dump($res);
+try {
+ substr_compare("aa", "a", -99999999, -1, 0);
+} catch (\Error $e) {
+ echo $e->getMessage();
+}
?>
--EXPECTF--
-Warning: substr_compare(): The length must be greater than or equal to zero in %s on line %d
-bool(false)
+The length must be greater than or equal to zero
diff --git a/ext/standard/tests/strings/bug37262.phpt b/ext/standard/tests/strings/bug37262.phpt
index b964c4a659..92abb29206 100644
--- a/ext/standard/tests/strings/bug37262.phpt
+++ b/ext/standard/tests/strings/bug37262.phpt
@@ -2,9 +2,7 @@
Bug #37262 (var_export() does not escape \0 character)
--FILE--
<?php
-$func = create_function('$a', 'return $a;');
-var_export($func);
+var_export("foo\0bar");
?>
---EXPECTF--
-Deprecated: Function create_function() is deprecated in %s on line %d
-'' . "\0" . 'lambda_%d'
+--EXPECT--
+'foo' . "\0" . 'bar'
diff --git a/ext/standard/tests/strings/bug40754.phpt b/ext/standard/tests/strings/bug40754.phpt
index 26ea5bc770..d502bff829 100644
--- a/ext/standard/tests/strings/bug40754.phpt
+++ b/ext/standard/tests/strings/bug40754.phpt
@@ -53,10 +53,10 @@ bool(false)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
int(2)
string(8) "abcdeabc"
diff --git a/ext/standard/tests/strings/bug45166.phpt b/ext/standard/tests/strings/bug45166.phpt
index 7140f762ca..0b694518df 100644
--- a/ext/standard/tests/strings/bug45166.phpt
+++ b/ext/standard/tests/strings/bug45166.phpt
@@ -4,7 +4,5 @@ Bug #45166 (substr() )
<?php
echo substr('cd', -3) . "\n";
?>
-===DONE===
--EXPECT--
cd
-===DONE===
diff --git a/ext/standard/tests/strings/bug54238.phpt b/ext/standard/tests/strings/bug54238.phpt
index 0f60098ff0..e679bb6928 100644
--- a/ext/standard/tests/strings/bug54238.phpt
+++ b/ext/standard/tests/strings/bug54238.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #54238 (use-after-free in substr_replace())
---INI--
-error_reporting=E_ALL&~E_NOTICE
--FILE--
<?php
$f = array(array('A', 'A'));
@@ -9,7 +7,10 @@ $f = array(array('A', 'A'));
$z = substr_replace($f, $f, $f, 1);
var_dump($z, $f);
?>
---EXPECT--
+--EXPECTF--
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
array(1) {
[0]=>
string(9) "AArrayray"
diff --git a/ext/standard/tests/strings/bug54322.phpt b/ext/standard/tests/strings/bug54322.phpt
index 6b8d10daa7..f31f94fd84 100644
--- a/ext/standard/tests/strings/bug54322.phpt
+++ b/ext/standard/tests/strings/bug54322.phpt
@@ -2,9 +2,11 @@
Bug #54322: Null pointer deref in get_html_translation_table due to information loss in long-to-int conversion
--FILE--
<?php
-var_dump(
-get_html_translation_table(NAN, 0, "UTF-8") > 0
-);
---EXPECTF--
-Warning: get_html_translation_table() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
+try {
+ var_dump(get_html_translation_table(NAN, 0, "UTF-8") > 0);
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+?>
+--EXPECT--
+get_html_translation_table() expects parameter 1 to be int, float given
diff --git a/ext/standard/tests/strings/bug61116.phpt b/ext/standard/tests/strings/bug61116.phpt
index b9b38a7bbb..a21ac519b5 100644
--- a/ext/standard/tests/strings/bug61116.phpt
+++ b/ext/standard/tests/strings/bug61116.phpt
@@ -9,18 +9,20 @@ echo new ReflectionFunction('get_html_translation_table'), "\n";
Function [ <internal:standard> function htmlspecialchars ] {
- Parameters [4] {
- Parameter #0 [ <required> $string ]
- Parameter #1 [ <optional> $quote_style ]
- Parameter #2 [ <optional> $encoding ]
- Parameter #3 [ <optional> $double_encode ]
+ Parameter #0 [ <required> string $string ]
+ Parameter #1 [ <optional> int $quote_style ]
+ Parameter #2 [ <optional> ?string $encoding ]
+ Parameter #3 [ <optional> bool $double_encode ]
}
+ - Return [ string ]
}
Function [ <internal:standard> function get_html_translation_table ] {
- Parameters [3] {
- Parameter #0 [ <optional> $table ]
- Parameter #1 [ <optional> $quote_style ]
- Parameter #2 [ <optional> $encoding ]
+ Parameter #0 [ <optional> int $table ]
+ Parameter #1 [ <optional> int $quote_style ]
+ Parameter #2 [ <optional> string $encoding ]
}
+ - Return [ array ]
}
diff --git a/ext/standard/tests/strings/bug62462.phpt b/ext/standard/tests/strings/bug62462.phpt
index c6eb41a543..5596a42bdd 100644
--- a/ext/standard/tests/strings/bug62462.phpt
+++ b/ext/standard/tests/strings/bug62462.phpt
@@ -5,7 +5,6 @@ Multibyte characters shouldn't be split by soft line break added by quoted_print
echo quoted_printable_encode(str_repeat("\xc4\x85", 77));
?>
-==DONE==
--EXPECT--
=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
@@ -14,4 +13,3 @@ echo quoted_printable_encode(str_repeat("\xc4\x85", 77));
=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
=C4=85=C4=85=C4=85=C4=85=C4=85
-==DONE==
diff --git a/ext/standard/tests/strings/bug63943.phpt b/ext/standard/tests/strings/bug63943.phpt
deleted file mode 100644
index 6018879b24..0000000000
--- a/ext/standard/tests/strings/bug63943.phpt
+++ /dev/null
@@ -1,8 +0,0 @@
---TEST--
-Bug #63943 (Bad warning text from strpos() on empty needle)
---FILE--
-<?php
-strpos("lllllll", '');
-?>
---EXPECTF--
-Warning: strpos(): Empty needle in %sbug63943.php on line %d
diff --git a/ext/standard/tests/strings/bug69522.phpt b/ext/standard/tests/strings/bug69522.phpt
index fc86d409c6..8df13e699c 100644
--- a/ext/standard/tests/strings/bug69522.phpt
+++ b/ext/standard/tests/strings/bug69522.phpt
@@ -5,7 +5,5 @@ Bug #69522 (heap buffer overflow in unpack())
$a = pack("AAAAAAAAAAAA", 1,2,3,4,5,6,7,8,9,10,11,12);
$b = unpack('h2147483648', $a);
?>
-===DONE===
--EXPECTF--
Warning: unpack(): Type h: integer overflow in %s on line %d
-===DONE===
diff --git a/ext/standard/tests/strings/bug72823.phpt b/ext/standard/tests/strings/bug72823.phpt
index d0aaf0fd35..1571fdc7b5 100644
--- a/ext/standard/tests/strings/bug72823.phpt
+++ b/ext/standard/tests/strings/bug72823.phpt
@@ -6,7 +6,5 @@ var_dump(
strtr(11, array('aaa' => 'bbb'))
);
?>
-===DONE===
--EXPECT--
string(2) "11"
-===DONE===
diff --git a/ext/standard/tests/strings/bug77439.phpt b/ext/standard/tests/strings/bug77439.phpt
index ee8a3d2845..98ae56222b 100644
--- a/ext/standard/tests/strings/bug77439.phpt
+++ b/ext/standard/tests/strings/bug77439.phpt
@@ -2,12 +2,11 @@
Bug #77439: parse_str segfaults when inserting item into existing array
--FILE--
<?php
-$a = [];
-parse_str('a[1]=1');
-var_dump($a);
+$vars = ['a' => []];
+parse_str('a[1]=1', $vars);
+var_dump($vars['a']);
?>
---EXPECTF--
-Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in %s on line %d
+--EXPECT--
array(1) {
[1]=>
string(1) "1"
diff --git a/ext/standard/tests/strings/bug78003.phpt b/ext/standard/tests/strings/bug78003.phpt
index 4379ca8a71..2420191f98 100644
--- a/ext/standard/tests/strings/bug78003.phpt
+++ b/ext/standard/tests/strings/bug78003.phpt
@@ -8,9 +8,7 @@ var_dump(
strip_tags('<foo<?>bar>')
);
?>
-===DONE===
--EXPECT--
string(0) ""
string(0) ""
string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/chr_basic.phpt b/ext/standard/tests/strings/chr_basic.phpt
index e072febcff..ec80d76213 100644
--- a/ext/standard/tests/strings/chr_basic.phpt
+++ b/ext/standard/tests/strings/chr_basic.phpt
@@ -15,9 +15,7 @@ echo chr(10); // "\n"
echo "World";
echo "\n";
?>
-===DONE===
--EXPECT--
*** Testing chr() : basic functionality ***
Hello
World
-===DONE===
diff --git a/ext/standard/tests/strings/chr_error.phpt b/ext/standard/tests/strings/chr_error.phpt
index 4d595543bb..2603b69210 100644
--- a/ext/standard/tests/strings/chr_error.phpt
+++ b/ext/standard/tests/strings/chr_error.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/chr_variation1.phpt b/ext/standard/tests/strings/chr_variation1.phpt
index c962aa0e78..7aae1bf905 100644
--- a/ext/standard/tests/strings/chr_variation1.phpt
+++ b/ext/standard/tests/strings/chr_variation1.phpt
@@ -66,7 +66,6 @@ foreach($inputs as $input) {
fclose($file_handle); //closing the file handle
?>
-===DONE===
--EXPECT--
*** Testing chr() function: with unexpected inputs for 'ascii' argument ***
-- Iteration 1 --
@@ -99,4 +98,3 @@ string(2) "00"
string(2) "00"
-- Iteration 15 --
string(2) "00"
-===DONE===
diff --git a/ext/standard/tests/strings/chunk_split.phpt b/ext/standard/tests/strings/chunk_split.phpt
index 648388f23a..a2696cd26b 100644
--- a/ext/standard/tests/strings/chunk_split.phpt
+++ b/ext/standard/tests/strings/chunk_split.phpt
@@ -7,17 +7,6 @@ echo chunk_split('foooooooooooooooo', 5)."\n";
echo chunk_split(str_repeat('X', 2*76))."\n";
echo chunk_split("test", 10, "|end") . "\n";
-$a=str_repeat("B", 65535);
-$b=1;
-$c=str_repeat("B", 65535);
-var_dump(chunk_split($a,$b,$c));
-
-$a=str_repeat("B", 65537);
-$b=1;
-$c=str_repeat("B", 65537);
-var_dump(chunk_split($a,$b,$c));
-
-
?>
--EXPECT--
a-b-c-
@@ -30,5 +19,3 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
test|end
-bool(false)
-bool(false)
diff --git a/ext/standard/tests/strings/chunk_split_variation1_32bit.phpt b/ext/standard/tests/strings/chunk_split_variation1_32bit.phpt
new file mode 100644
index 0000000000..f9825eb438
--- /dev/null
+++ b/ext/standard/tests/strings/chunk_split_variation1_32bit.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Test chunk_split() function : usage variations - unexpected large '$end' string argument variation 1
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
+?>
+--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 large 'end' string argument variation 1 ***\n";
+
+$a=str_repeat("B", 65535);
+$b=1;
+$c=str_repeat("B", 65535);
+var_dump(chunk_split($a,$b,$c));
+?>
+--EXPECTF--
+*** Testing chunk_split() : unexpected large 'end' string argument variation 1 ***
+
+Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/ext/standard/tests/strings/chunk_split_variation2_32bit.phpt b/ext/standard/tests/strings/chunk_split_variation2_32bit.phpt
new file mode 100644
index 0000000000..ca0948d999
--- /dev/null
+++ b/ext/standard/tests/strings/chunk_split_variation2_32bit.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test chunk_split() function : usage variations - unexpected large '$end' string argument variation 2
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform 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() : unexpected large 'end' string argument variation 2 ***\n";
+
+$a=str_repeat("B", 65537);
+$b=1;
+$c=str_repeat("B", 65537);
+var_dump(chunk_split($a,$b,$c));
+?>
+--EXPECTF--
+*** Testing chunk_split() : unexpected large 'end' string argument variation 2 ***
+
+Fatal error: Possible integer overflow in memory allocation (65537 * 65537 + 65556) in %s on line %d
diff --git a/ext/standard/tests/strings/chunk_split_variation3.phpt b/ext/standard/tests/strings/chunk_split_variation3.phpt
new file mode 100644
index 0000000000..3992e212d5
--- /dev/null
+++ b/ext/standard/tests/strings/chunk_split_variation3.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Test chunk_split() function : usage variations - unexpected large number of chunks
+--SKIPIF--
+<?php
+if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
+?>
+--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
+*/
+
+$chunk_length = 1;
+
+echo "*** Testing chunk_split() : unexpected large 'end' string argument variation 2 ***\n";
+
+echo "Body generation\n";
+$body = str_repeat("Hello", 10000000);
+
+echo "Using chunk_split()\n";
+var_dump(chunk_split($body, $chunk_length));
+?>
+--EXPECTF--
+*** Testing chunk_split() : unexpected large 'end' string argument variation 2 ***
+Body generation
+Using chunk_split()
+
+Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt
index 8a5a8cd6bb..bea49d24b4 100644
--- a/ext/standard/tests/strings/chunk_split_variation5.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation5.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt
index bfafd1af0b..15c224962e 100644
--- a/ext/standard/tests/strings/chunk_split_variation8.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation8.phpt
@@ -46,7 +46,13 @@ $values = array (
// loop through each element of values for 'chunklen'
for($count = 0; $count < count($values); $count++) {
echo "-- Iteration ".($count+1). " --\n";
- var_dump( chunk_split($heredoc_str, $values[$count], $ending) );
+ try {
+ var_dump( chunk_split($heredoc_str, $values[$count], $ending) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
echo "Done"
@@ -54,18 +60,14 @@ echo "Done"
--EXPECTF--
*** Testing chunk_split() : different 'chunklen' with heredoc 'str' ***
-- Iteration 1 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
+Chunk length should be greater than zero
-- Iteration 2 --
string(504) "T:::h:::i:::s:::':::s::: :::h:::e:::r:::e:::d:::o:::c::: :::s:::t:::r:::i:::n:::g::: :::w:::i:::t:::h::: ::: ::: :::a:::n:::d::: :::
::: :::w:::h:::i:::t:::e::: :::s:::p:::a:::c:::e::: :::c:::h:::a:::r:::.:::
:::I:::t::: :::h:::a:::s::: :::_:::s:::p:::e:::c:::i:::@:::l::: :::c:::h:::@:::r:::$::: :::2:::2:::2:::2::: :::!:::!:::!:::N:::o:::w::: :::\:::k::: :::a:::s::: :::e:::s:::c:::a:::p:::e::: :::c:::h:::a:::r::: :::t:::o::: :::t:::e:::s:::t:::
:::c:::h:::u:::n:::k:::_:::s:::p:::l:::i:::t:::(:::):::"
-- Iteration 3 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
+Chunk length should be greater than zero
-- Iteration 4 --
string(129) "This's heredoc string with and
white space char.
@@ -82,11 +84,7 @@ string(129) "This's heredoc string with and
It has _speci@l ch@r$ 2222 !!!Now \k as escape char to test
chunk_split():::"
-- Iteration 7 --
-
-Warning: chunk_split() expects parameter 2 to be int, float given in %s on line %d
-NULL
+chunk_split() expects parameter 2 to be int, float given
-- Iteration 8 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
+Chunk length should be greater than zero
Done
diff --git a/ext/standard/tests/strings/convert_cyr_string.phpt b/ext/standard/tests/strings/convert_cyr_string.phpt
index 01bd0f50fc..3bbde00cf1 100644
--- a/ext/standard/tests/strings/convert_cyr_string.phpt
+++ b/ext/standard/tests/strings/convert_cyr_string.phpt
@@ -4,7 +4,6 @@ basic convert_cyr_string() tests
<?php
var_dump(convert_cyr_string("", "", ""));
-var_dump(convert_cyr_string(array(), array(), array()));
var_dump(convert_cyr_string("[[[[[[", "q", "m"));
var_dump(convert_cyr_string("[[[[[[", "k", "w"));
@@ -26,11 +25,6 @@ string(0) ""
Deprecated: Function convert_cyr_string() is deprecated in %s on line %d
-Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Deprecated: Function convert_cyr_string() is deprecated in %s on line %d
-
Warning: convert_cyr_string(): Unknown source charset: q in %s on line %d
string(6) "[[[[[["
diff --git a/ext/standard/tests/strings/convert_cyr_string_basic.phpt b/ext/standard/tests/strings/convert_cyr_string_basic.phpt
index f4c7f69918..110dccdc1f 100644
--- a/ext/standard/tests/strings/convert_cyr_string_basic.phpt
+++ b/ext/standard/tests/strings/convert_cyr_string_basic.phpt
@@ -25,7 +25,6 @@ for ($i = 128; $i < 256; $i++) {
}
?>
-===DONE===
--EXPECTF--
*** Testing convert_cyr_string() : basic functionality ***
@@ -166,4 +165,3 @@ string(102) "436f6e766572742066726f6d206f6e6520437972696c6c696320636861726163746
253: dc
254: c0
255: d1
-===DONE===
diff --git a/ext/standard/tests/strings/convert_cyr_string_error.phpt b/ext/standard/tests/strings/convert_cyr_string_error.phpt
index 0444183ba1..393a778a30 100644
--- a/ext/standard/tests/strings/convert_cyr_string_error.phpt
+++ b/ext/standard/tests/strings/convert_cyr_string_error.phpt
@@ -25,7 +25,6 @@ echo "\n-- Testing convert_cyr_string() function with invalid 'from' and 'to' ch
var_dump(bin2hex( convert_cyr_string($str, ">", "?")) );
?>
-===DONE===
--EXPECTF--
*** Testing convert_cyr_string() : error conditions ***
@@ -51,4 +50,3 @@ Warning: convert_cyr_string(): Unknown source charset: > in %s on line %d
Warning: convert_cyr_string(): Unknown destination charset: ? in %s on line %d
string(10) "68656c6c6f"
-===DONE===
diff --git a/ext/standard/tests/strings/convert_uudecode_basic.phpt b/ext/standard/tests/strings/convert_uudecode_basic.phpt
index 963c163761..7422ac06c0 100644
--- a/ext/standard/tests/strings/convert_uudecode_basic.phpt
+++ b/ext/standard/tests/strings/convert_uudecode_basic.phpt
@@ -47,8 +47,6 @@ foreach($strings as $string) {
echo "TEST PASSED\n";
?>
-===DONE===
--EXPECT--
*** Testing convert_uudecode() : basic functionality ***
TEST PASSED
-===DONE===
diff --git a/ext/standard/tests/strings/convert_uuencode_basic.phpt b/ext/standard/tests/strings/convert_uuencode_basic.phpt
index b8c338a1c6..8a4f57fa87 100644
--- a/ext/standard/tests/strings/convert_uuencode_basic.phpt
+++ b/ext/standard/tests/strings/convert_uuencode_basic.phpt
@@ -39,7 +39,6 @@ foreach($strings as $string) {
?>
-===DONE===
--EXPECTF--
*** Testing convert_uuencode() : basic functionality ***
-- Iteration 1 --
@@ -85,4 +84,3 @@ string(82) "M7'0@5&AI<R!3=')I;F<@8V]N=&%I;G,@7'1<="!S;VUE(&-O;G1R;VP@8VAA
+<F%C=&5R<UQR7&X`
`
"
-===DONE===
diff --git a/ext/standard/tests/strings/count_chars_basic.phpt b/ext/standard/tests/strings/count_chars_basic.phpt
index c39889be15..c1868714b0 100644
--- a/ext/standard/tests/strings/count_chars_basic.phpt
+++ b/ext/standard/tests/strings/count_chars_basic.phpt
@@ -20,9 +20,13 @@ var_dump(count_chars($string, 2));
var_dump(count_chars($string, 3));
var_dump(bin2hex(count_chars($string, 4)));
+try {
+ count_chars($string, 5);
+} catch (ValueError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
--EXPECT--
*** Testing count_chars() : basic functionality ***
array(256) {
@@ -1571,4 +1575,4 @@ array(238) {
}
string(18) " Rabcdefghimnorstu"
string(476) "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f5051535455565758595a5b5c5d5e5f606a6b6c7071767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"
-===DONE===
+Unknown mode
diff --git a/ext/standard/tests/strings/crc32_variation3.phpt b/ext/standard/tests/strings/crc32_variation3.phpt
index 691703103e..bc219c43e9 100644
--- a/ext/standard/tests/strings/crc32_variation3.phpt
+++ b/ext/standard/tests/strings/crc32_variation3.phpt
@@ -77,9 +77,9 @@ echo "Done";
--EXPECTF--
*** Testing crc32() : with different strings in double quotes ***
-Notice: Undefined variable: hello in %s on line %d
+Warning: Undefined variable: hello in %s on line %d
-Notice: Undefined variable: world in %s on line %d
+Warning: Undefined variable: world in %s on line %d
-- Iteration 1 --
int(0)
diff --git a/ext/standard/tests/strings/crypt.phpt b/ext/standard/tests/strings/crypt.phpt
index f64b61cb5f..270f0372d1 100644
--- a/ext/standard/tests/strings/crypt.phpt
+++ b/ext/standard/tests/strings/crypt.phpt
@@ -19,8 +19,6 @@ echo (CRYPT_MD5) ? ((crypt($str, $salt3) === $res_3) ? 'MD5' : 'MD5 - ERROR
echo (CRYPT_BLOWFISH) ? ((crypt($str, $salt4) === $res_4) ? 'BLO' : 'BLO - ERROR') : 'BLO', "\n";
var_dump(crypt($str));
-var_dump(crypt());
-var_dump(crypt("", "", ""));
?>
--EXPECTF--
@@ -31,9 +29,3 @@ BLO
Notice: crypt(): No salt parameter was specified. You must use a randomly generated salt and a strong hash function to produce a secure hash. in %s on line %d
string(%d) "%s"
-
-Warning: crypt() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: crypt() expects at most 2 parameters, 3 given in %s on line %d
-NULL
diff --git a/ext/standard/tests/strings/dirname_error.phpt b/ext/standard/tests/strings/dirname_error.phpt
index 98a9ea5b45..daf4e2cb0a 100644
--- a/ext/standard/tests/strings/dirname_error.phpt
+++ b/ext/standard/tests/strings/dirname_error.phpt
@@ -6,26 +6,17 @@ Test dirname() function : error conditions
Description: Returns directory name component of path.
*/
echo "*** Testing error conditions ***\n";
-// zero arguments
-var_dump( dirname() );
// Bad arg
-var_dump( dirname("/var/tmp/bar.gz", 0) );
-
-// more than expected no. of arguments
-var_dump( dirname("/var/tmp/bar.gz", 1, ".gz") );
+try {
+ dirname("/var/tmp/bar.gz", 0);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
echo "Done\n";
?>
--EXPECTF--
*** Testing error conditions ***
-
-Warning: dirname() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: dirname(): Invalid argument, levels must be >= 1 in %s on line %d
-NULL
-
-Warning: dirname() expects at most 2 parameters, 3 given in %s on line %d
-NULL
+Invalid argument, levels must be >= 1
Done
diff --git a/ext/standard/tests/strings/dirname_multi.phpt b/ext/standard/tests/strings/dirname_multi.phpt
index febbd0c293..f95bf16d2a 100644
--- a/ext/standard/tests/strings/dirname_multi.phpt
+++ b/ext/standard/tests/strings/dirname_multi.phpt
@@ -11,14 +11,17 @@ if((substr(PHP_OS, 0, 3) == "WIN"))
Description: Returns directory name component of path.
*/
for ($i=0 ; $i<5 ; $i++) {
- var_dump(dirname("/foo/bar/baz", $i));
+ try {
+ var_dump(dirname("/foo/bar/baz", $i));
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
?>
Done
--EXPECTF--
-Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi.php on line %d
-NULL
+Invalid argument, levels must be >= 1
string(8) "/foo/bar"
string(4) "/foo"
string(1) "/"
diff --git a/ext/standard/tests/strings/dirname_multi_win.phpt b/ext/standard/tests/strings/dirname_multi_win.phpt
index 4fed5895e6..9dc0c05c59 100644
--- a/ext/standard/tests/strings/dirname_multi_win.phpt
+++ b/ext/standard/tests/strings/dirname_multi_win.phpt
@@ -10,17 +10,22 @@ if((substr(PHP_OS, 0, 3) != "WIN"))
/* Prototype: string dirname ( string $path [, int nb]);
Description: Returns directory name component of path.
*/
+
for ($i=0 ; $i<5 ; $i++) {
- var_dump(dirname("/foo/bar/baz", $i));
+ try {
+ var_dump(dirname("/foo/bar/baz", $i));
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
+
var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
var_dump(dirname("g:/foo/bar/baz", PHP_INT_MAX));
var_dump(dirname("g:foo/bar/baz", PHP_INT_MAX));
?>
Done
---EXPECTF--
-Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi_win.php on line %d
-NULL
+--EXPECT--
+Invalid argument, levels must be >= 1
string(8) "/foo/bar"
string(4) "/foo"
string(1) "\"
diff --git a/ext/standard/tests/strings/explode.phpt b/ext/standard/tests/strings/explode.phpt
index 84cdcb985f..8fa3b62079 100644
--- a/ext/standard/tests/strings/explode.phpt
+++ b/ext/standard/tests/strings/explode.phpt
@@ -8,21 +8,40 @@ error_reporting=2047
<?php
/* From http://bugs.php.net/19865 */
echo var_export(explode("\1", "a". chr(1). "b". chr(0). "d" . chr(1) . "f" . chr(1). "1" . chr(1) . "d"), TRUE);
+echo "\n";
echo md5(var_export(explode("\1", "a". chr(1). "b". chr(0). "d" . chr(1) . "f" . chr(1). "1" . chr(1) . "d"), TRUE));
echo "\n";
-var_dump(@explode("", ""));
-var_dump(@explode("", NULL));
-var_dump(@explode(NULL, ""));
-var_dump(@explode("a", ""));
-var_dump(@explode("a", "a"));
-var_dump(@explode("a", NULL));
-var_dump(@explode(NULL, "a"));
-var_dump(@explode("abc", "acb"));
-var_dump(@explode("somestring", "otherstring"));
-var_dump(@explode("somestring", "otherstring", -1));
-var_dump(@explode("a", "aaaaaa"));
-var_dump(@explode("==", str_repeat("-=".ord(0)."=-", 10)));
-var_dump(@explode("=", str_repeat("-=".ord(0)."=-", 10)));
+
+try {
+ var_dump(explode("", ""));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ var_dump(explode("", NULL));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ var_dump(explode(NULL, ""));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+var_dump(explode("a", ""));
+var_dump(explode("a", "a"));
+var_dump(explode("a", NULL));
+try {
+ var_dump(explode(NULL, "a"));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+var_dump(explode("abc", "acb"));
+var_dump(explode("somestring", "otherstring"));
+var_dump(explode("somestring", "otherstring", -1));
+var_dump(explode("a", "aaaaaa"));
+var_dump(explode("==", str_repeat("-=".ord(0)."=-", 10)));
+var_dump(explode("=", str_repeat("-=".ord(0)."=-", 10)));
//////////////////////////////////////
var_dump(explode(":","a lazy dog:jumps:over:",-1));
var_dump(explode(":","a lazy dog:jumps:over", -1));
@@ -39,10 +58,11 @@ array (
2 => 'f',
3 => '1',
4 => 'd',
-)d6bee42a771449205344c0938ad4f035
-bool(false)
-bool(false)
-bool(false)
+)
+d6bee42a771449205344c0938ad4f035
+Empty delimiter
+Empty delimiter
+Empty delimiter
array(1) {
[0]=>
string(0) ""
@@ -57,7 +77,7 @@ array(1) {
[0]=>
string(0) ""
}
-bool(false)
+Empty delimiter
array(1) {
[0]=>
string(3) "acb"
diff --git a/ext/standard/tests/strings/explode1.phpt b/ext/standard/tests/strings/explode1.phpt
index 6842947605..4d692e49e8 100644
--- a/ext/standard/tests/strings/explode1.phpt
+++ b/ext/standard/tests/strings/explode1.phpt
@@ -32,12 +32,29 @@ $string = "1234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND";
*/
$counter = 1;
foreach($delimiters as $delimiter) {
- echo "-- Iteration $counter --\n";
- var_dump( explode($delimiter, $string, -1) );
- var_dump( explode($delimiter, $string, 0) );
- var_dump( explode($delimiter, $string, 1) );
- var_dump( explode($delimiter, $string, 2) );
- $counter++;
+ echo "-- Iteration $counter --\n";
+
+ try {
+ var_dump( explode($delimiter, $string, -1) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ var_dump( explode($delimiter, $string, 0) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ var_dump( explode($delimiter, $string, 1) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ var_dump( explode($delimiter, $string, 2) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
+ $counter++;
}
echo "\n*** Testing explode() with miscelleneous input arguments ***\n";
@@ -77,41 +94,20 @@ class string1 {
$obj = new string1;
var_dump( explode("b", $obj) );
-echo "\n*** Testing error conditions ***\n";
-/* checking for arguments <2 and >3 */
-var_dump( explode(":", "array1:array2:array3", -1, -33) );
-var_dump( explode(":") );
-
echo "Done\n";
?>
--EXPECTF--
*** Testing explode() for basic operations ***
-- Iteration 1 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
+Empty delimiter
+Empty delimiter
+Empty delimiter
+Empty delimiter
-- Iteration 2 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
+Empty delimiter
+Empty delimiter
+Empty delimiter
+Empty delimiter
-- Iteration 3 --
array(1) {
[0]=>
@@ -213,18 +209,10 @@ array(2) {
string(56) "234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND"
}
-- Iteration 7 --
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
-
-Warning: explode(): Empty delimiter in %s on line %d
-bool(false)
+Empty delimiter
+Empty delimiter
+Empty delimiter
+Empty delimiter
-- Iteration 8 --
array(2) {
[0]=>
@@ -498,12 +486,4 @@ array(2) {
[1]=>
string(4) "ject"
}
-
-*** Testing error conditions ***
-
-Warning: explode() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: explode() expects at least 2 parameters, 1 given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/strings/explode_variation4.phpt b/ext/standard/tests/strings/explode_variation4.phpt
index 080531c6ec..9a6a862f8b 100644
--- a/ext/standard/tests/strings/explode_variation4.phpt
+++ b/ext/standard/tests/strings/explode_variation4.phpt
@@ -14,7 +14,6 @@ $pizza = "piece1 piece2 piece3 piece4 piece5 piece6 p";
$pieces = explode(" p", $pizza);
var_dump($pieces);
?>
-===DONE===
--EXPECT--
*** Testing explode() function: match longer string ***
array(7) {
@@ -33,4 +32,3 @@ array(7) {
[6]=>
string(0) ""
}
-===DONE===
diff --git a/ext/standard/tests/strings/explode_variation5.phpt b/ext/standard/tests/strings/explode_variation5.phpt
index e5e6dd75d9..d5c1938eaf 100644
--- a/ext/standard/tests/strings/explode_variation5.phpt
+++ b/ext/standard/tests/strings/explode_variation5.phpt
@@ -20,7 +20,6 @@ var_dump(explode('||', $str, -1));
echo "\n-- negative limit (since PHP 5.1) with null string -- \n";
var_dump(explode('||', "", -1));
?>
-===DONE===
--EXPECT--
*** Testing explode() function: positive and negative limits ***
@@ -45,4 +44,3 @@ array(3) {
-- negative limit (since PHP 5.1) with null string --
array(0) {
}
-===DONE===
diff --git a/ext/standard/tests/strings/explode_variation6.phpt b/ext/standard/tests/strings/explode_variation6.phpt
index 730e69ba13..2a823a4a3e 100644
--- a/ext/standard/tests/strings/explode_variation6.phpt
+++ b/ext/standard/tests/strings/explode_variation6.phpt
@@ -39,7 +39,6 @@ function test_explode($delim, $string, $limit)
}
}
?>
-===DONE===
--EXPECT--
*** Testing explode() function: misc tests ***
@@ -67,4 +66,3 @@ string(6) "6f6e65"
string(6) "74776f"
string(10) "7468726565"
string(8) "666f7572"
-===DONE===
diff --git a/ext/standard/tests/strings/fprintf_error.phpt b/ext/standard/tests/strings/fprintf_error.phpt
index ccc37407e8..1ffc188051 100644
--- a/ext/standard/tests/strings/fprintf_error.phpt
+++ b/ext/standard/tests/strings/fprintf_error.phpt
@@ -7,25 +7,31 @@ Test fprintf() function (errors)
echo "*** Testing Error Conditions ***\n";
/* zero argument */
-var_dump( fprintf() );
+try {
+ var_dump( fprintf() );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
/* scalar argument */
-var_dump( fprintf(3) );
+try {
+ var_dump( fprintf(3) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
/* NULL argument */
-var_dump( fprintf(NULL) );
+try {
+ var_dump( fprintf(NULL) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
--EXPECTF--
*** Testing Error Conditions ***
-
-Warning: Wrong parameter count for fprintf() in %sfprintf_error.php on line %d
-NULL
-
-Warning: Wrong parameter count for fprintf() in %sfprintf_error.php on line %d
-NULL
-
-Warning: Wrong parameter count for fprintf() in %sfprintf_error.php on line %d
-NULL
+Wrong parameter count for fprintf()
+Wrong parameter count for fprintf()
+Wrong parameter count for fprintf()
Done
diff --git a/ext/standard/tests/strings/hebrev_basic.phpt b/ext/standard/tests/strings/hebrev_basic.phpt
index cc32d654e8..83e2cc8a8f 100644
--- a/ext/standard/tests/strings/hebrev_basic.phpt
+++ b/ext/standard/tests/strings/hebrev_basic.phpt
@@ -16,7 +16,6 @@ var_dump(hebrev($hebrew_text));
var_dump(hebrev($hebrew_text, 15));
?>
-===DONE===
--EXPECT--
*** Testing hebrev() : basic functionality ***
string(109) ".The hebrev function converts logical Hebrew text to visual text
@@ -32,4 +31,3 @@ breaking words
tries to avoid
.The function
"
-===DONE===
diff --git a/ext/standard/tests/strings/hebrevc_basic.phpt b/ext/standard/tests/strings/hebrevc_basic.phpt
index 2af6c38f1e..22b3ba3d3e 100644
--- a/ext/standard/tests/strings/hebrevc_basic.phpt
+++ b/ext/standard/tests/strings/hebrevc_basic.phpt
@@ -16,7 +16,6 @@ var_dump(hebrevc($hebrew_text));
var_dump(hebrevc($hebrew_text, 15));
?>
-===DONE===
--EXPECTF--
*** Testing hebrevc() : basic functionality ***
@@ -48,4 +47,3 @@ breaking words<br />
tries to avoid<br />
.The function<br />
"
-===DONE===
diff --git a/ext/standard/tests/strings/highlight_file.phpt b/ext/standard/tests/strings/highlight_file.phpt
index 4eba32aebc..895e53358c 100644
--- a/ext/standard/tests/strings/highlight_file.phpt
+++ b/ext/standard/tests/strings/highlight_file.phpt
@@ -13,7 +13,6 @@ allow_url_fopen=1
$filename = __DIR__."/highlight_file.dat";
-var_dump(highlight_file());
var_dump(highlight_file($filename));
var_dump(highlight_file('data:,<?php echo "test"; ?>'));
@@ -39,9 +38,6 @@ echo "Done\n";
--EXPECTF--
Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
-Warning: highlight_file() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
Warning: highlight_file(%shighlight_file.dat): failed to open stream: No such file or directory in %s on line %d
Warning: highlight_file(): Failed opening '%shighlight_file.dat' for highlighting in %s on line %d
diff --git a/ext/standard/tests/strings/htmlentities09.phpt b/ext/standard/tests/strings/htmlentities09.phpt
index 655c6d7a26..11493b62a4 100644
--- a/ext/standard/tests/strings/htmlentities09.phpt
+++ b/ext/standard/tests/strings/htmlentities09.phpt
@@ -12,10 +12,8 @@ internal_encoding=Shift_JIS
print mb_internal_encoding()."\n";
var_dump(bin2hex(htmlentities("\x81\x41\x81\x42\x81\x43", ENT_QUOTES, '')));
?>
-===DONE===
--EXPECTF--
SJIS
Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
string(12) "814181428143"
-===DONE===
diff --git a/ext/standard/tests/strings/htmlentities16.phpt b/ext/standard/tests/strings/htmlentities16.phpt
index b253f4b1b2..1971f8340d 100644
--- a/ext/standard/tests/strings/htmlentities16.phpt
+++ b/ext/standard/tests/strings/htmlentities16.phpt
@@ -13,9 +13,7 @@ $str = "\x88\xa9\xf0\xee\xf1\xea\xee\xf8\xed\xfb\xe9";
var_dump(bin2hex($str), bin2hex(htmlentities($str, ENT_QUOTES, '')));
var_dump(htmlentities($str, ENT_QUOTES | ENT_HTML5, ''));
?>
-===DONE===
--EXPECT--
string(22) "88a9f0eef1eaeef8edfbe9"
string(42) "266575726f3b26636f70793bf0eef1eaeef8edfbe9"
string(58) "&euro;&copy;&rcy;&ocy;&scy;&kcy;&ocy;&shcy;&ncy;&ycy;&jcy;"
-===DONE===
diff --git a/ext/standard/tests/strings/htmlentities24.phpt b/ext/standard/tests/strings/htmlentities24.phpt
index 5a023df701..f2abfd5ba8 100644
--- a/ext/standard/tests/strings/htmlentities24.phpt
+++ b/ext/standard/tests/strings/htmlentities24.phpt
@@ -35,12 +35,6 @@ var_dump( htmlentities($str, ENT_QUOTES) );
var_dump( htmlentities($str, ENT_NOQUOTES) );
var_dump( htmlentities($str, ENT_COMPAT) );
-echo "\n*** Testing error conditions ***\n";
-/* zero argument */
-var_dump( htmlentities() );
-/* arguments more than expected */
-var_dump( htmlentities("\x84\x91",ENT_QUOTES, 'cp1252', "test1") );
-
echo "Done\n";
?>
--EXPECTF--
@@ -320,10 +314,4 @@ string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
string(46) "A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;"
string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
-
-*** Testing error conditions ***
-
-Warning: htmlentities() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-string(14) "&bdquo;&lsquo;"
Done
diff --git a/ext/standard/tests/strings/htmlspecialchars.phpt b/ext/standard/tests/strings/htmlspecialchars.phpt
index 8506c73e72..6e5c5fac36 100644
--- a/ext/standard/tests/strings/htmlspecialchars.phpt
+++ b/ext/standard/tests/strings/htmlspecialchars.phpt
@@ -35,13 +35,6 @@ var_dump( htmlspecialchars($str, ENT_QUOTES) );
var_dump( htmlspecialchars($str, ENT_NOQUOTES) );
var_dump( htmlspecialchars($str, ENT_COMPAT) );
-echo "\n*** Testing error conditions ***\n";
-/* zero argument */
-var_dump( htmlspecialchars() );
-
-/* giving arguments more than expected */
-var_dump( htmlspecialchars("<br>",ENT_QUOTES,'iso-8859-1', "test2") );
-
echo "Done\n"
?>
--EXPECTF--
@@ -321,10 +314,4 @@ string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
string(46) "A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;"
string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
-
-*** Testing error conditions ***
-
-Warning: htmlspecialchars() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-string(10) "&lt;br&gt;"
Done
diff --git a/ext/standard/tests/strings/htmlspecialchars_basic.phpt b/ext/standard/tests/strings/htmlspecialchars_basic.phpt
index 4ac7733702..9bb4e4f82c 100644
--- a/ext/standard/tests/strings/htmlspecialchars_basic.phpt
+++ b/ext/standard/tests/strings/htmlspecialchars_basic.phpt
@@ -55,7 +55,6 @@ echo "Test 28: " . htmlspecialchars ($s1, ENT_NOQUOTES, "ISO-8859-1", true);
echo "Test 29: " . htmlspecialchars ($s2, ENT_NOQUOTES, "ISO-8859-1", true);
?>
-===DONE===
--EXPECT--
*** Testing htmlspecialchars() : basic functionality ***
Basic tests
@@ -94,4 +93,3 @@ Test 27: "300 &lt; 400"
Try with double decode TRUE
Test 28: &amp;quot;&amp;amp;xyz&amp;gt;abc&amp;quot;
Test 29: &amp;quot;&amp;amp;123&amp;lt;456&amp;quot;
-===DONE===
diff --git a/ext/standard/tests/strings/implode.phpt b/ext/standard/tests/strings/implode.phpt
index 330ba2ff30..ec685586ef 100644
--- a/ext/standard/tests/strings/implode.phpt
+++ b/ext/standard/tests/strings/implode.phpt
@@ -12,5 +12,5 @@ echo implode(':', array('foo', array('bar', 'baz'), 'burp'))."\n";
foobarbaz
foo:bar:baz
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
foo:Array:burp
diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt
index 629f4ce60c..500bdc6dce 100644
--- a/ext/standard/tests/strings/implode1.phpt
+++ b/ext/standard/tests/strings/implode1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/join_error.phpt b/ext/standard/tests/strings/join_error.phpt
index 36ee9d7ba6..fa15b75da5 100644
--- a/ext/standard/tests/strings/join_error.phpt
+++ b/ext/standard/tests/strings/join_error.phpt
@@ -10,41 +10,21 @@ Test join() function: error conditions
echo "*** Testing join() : error conditions ***\n";
-// Zero argument
-echo "\n-- Testing join() function with Zero arguments --\n";
-var_dump( join() );
-
-// More than expected number of arguments
-echo "\n-- Testing join() function with more than expected no. of arguments --\n";
-$glue = 'string_val';
-$pieces = array(1, 2);
-$extra_arg = 10;
-
-var_dump( join($glue, $pieces, $extra_arg) );
-
// Less than expected number of arguments
echo "\n-- Testing join() with less than expected no. of arguments --\n";
$glue = 'string_val';
-var_dump( join($glue));
+try {
+ var_dump(join($glue));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing join() : error conditions ***
--- Testing join() function with Zero arguments --
-
-Warning: join() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing join() function with more than expected no. of arguments --
-
-Warning: join() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-- Testing join() with less than expected no. of arguments --
-
-Warning: join(): Argument must be an array in %s on line %d
-NULL
+Argument must be an array
Done
diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt
index 695ee2ddca..33c519f13e 100644
--- a/ext/standard/tests/strings/join_variation1.phpt
+++ b/ext/standard/tests/strings/join_variation1.phpt
@@ -122,31 +122,31 @@ string(29) "element11.07654321E-9element2"
string(19) "element10.5element2"
-- Iteration 10 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in %s on line %d
string(0) ""
-- Iteration 11 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in %s on line %d
string(1) "0"
-- Iteration 12 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in %s on line %d
string(1) "1"
-- Iteration 13 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in %s on line %d
string(7) "1Array2"
-- Iteration 14 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in %s on line %d
string(11) "redArraypen"
diff --git a/ext/standard/tests/strings/join_variation2.phpt b/ext/standard/tests/strings/join_variation2.phpt
index 03b3250b40..16e053cce1 100644
--- a/ext/standard/tests/strings/join_variation2.phpt
+++ b/ext/standard/tests/strings/join_variation2.phpt
@@ -86,12 +86,16 @@ $values = array (
echo "\n--- Testing join() by supplying different values for 'pieces' argument ---\n";
$counter = 1;
for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $pieces = $values [$index];
+ echo "-- Iteration $counter --\n";
+ $pieces = $values [$index];
- var_dump( join($glue, $pieces) );
+ try {
+ var_dump( join($glue, $pieces) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
- $counter ++;
+ $counter ++;
}
// close the resources used
@@ -99,100 +103,54 @@ fclose($fp);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing join() : usage variations ***
--- Testing join() by supplying different values for 'pieces' argument ---
-- Iteration 1 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 2 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 3 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 4 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 5 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 6 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 7 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 8 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 9 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 10 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 11 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 12 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 13 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 14 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 15 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 16 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 17 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 18 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 19 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 20 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 21 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 22 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
-- Iteration 23 --
-
-Warning: join(): Invalid arguments passed in %s on line %d
-NULL
+Invalid arguments passed
Done
diff --git a/ext/standard/tests/strings/join_variation3.phpt b/ext/standard/tests/strings/join_variation3.phpt
index c3799cc01a..a896123321 100644
--- a/ext/standard/tests/strings/join_variation3.phpt
+++ b/ext/standard/tests/strings/join_variation3.phpt
@@ -62,9 +62,9 @@ string(6) "1], [2"
string(10) "1.1], [2.2"
-- Iteration 3 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(14) "Array], [Array"
-- Iteration 4 --
string(5) "], [1"
diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt
index f6154f1e4d..49cbfa15bc 100644
--- a/ext/standard/tests/strings/join_variation4.phpt
+++ b/ext/standard/tests/strings/join_variation4.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/join_variation5.phpt b/ext/standard/tests/strings/join_variation5.phpt
index e3f3e7ec08..f81524543d 100644
--- a/ext/standard/tests/strings/join_variation5.phpt
+++ b/ext/standard/tests/strings/join_variation5.phpt
@@ -33,19 +33,19 @@ echo "Done\n";
--EXPECTF--
*** Testing implode() : usage variations - sub arrays ***
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(27) "ArrayTESTArrayTESTPHPTEST50"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in %s on line %d
string(19) "1Array2Array3Array4"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(18) "Array2Array2PHP250"
string(10) "1, 2, 3, 4"
string(8) "one, two"
diff --git a/ext/standard/tests/strings/lcfirst.phpt b/ext/standard/tests/strings/lcfirst.phpt
index 8178fa2eb5..109b8e5a5d 100644
--- a/ext/standard/tests/strings/lcfirst.phpt
+++ b/ext/standard/tests/strings/lcfirst.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/levenshtein.phpt b/ext/standard/tests/strings/levenshtein.phpt
index 1ac05cf2ae..b4b7c03e7f 100644
--- a/ext/standard/tests/strings/levenshtein.phpt
+++ b/ext/standard/tests/strings/levenshtein.phpt
@@ -63,10 +63,8 @@ $n += test_me("gt maxlength2", -1, "A", "AbcdefghijklmnopqrstuvwxyzAbcdefghijkl
echo ($n==0)?"all passed\n":"$n failed\n";
-var_dump(levenshtein(array(), array()));
var_dump(levenshtein("", "", -1, -1, -1));
var_dump(levenshtein("", "", 10, 10, 10));
-var_dump(levenshtein(""));
?>
--EXPECTF--
@@ -76,11 +74,5 @@ Warning: levenshtein(): Argument string(s) too long in %s on line %d
Warning: levenshtein(): Argument string(s) too long in %s on line %d
all passed
-
-Warning: levenshtein() expects parameter 1 to be string, array given in %s on line %d
-NULL
int(0)
int(0)
-
-Warning: Wrong parameter count for levenshtein() in %s on line %d
-NULL
diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt
index 638c93557f..51287e04d7 100644
--- a/ext/standard/tests/strings/ltrim.phpt
+++ b/ext/standard/tests/strings/ltrim.phpt
@@ -9,12 +9,6 @@ Test ltrim() function
echo "\n *** Output for Error Conditions ***\n";
- echo "\n *** Output for zero argument ***\n";
- var_dump( ltrim() );
-
- echo "\n *** Output for more than valid number of arguments (Valid are 1 or 2 arguments) ***\n";
- var_dump( ltrim("", " ", 1) );
-
/* heredoc string */
$str = <<<EOD
us
@@ -50,16 +44,6 @@ echo "\nDone\n";
--EXPECTF--
*** Output for Error Conditions ***
- *** Output for zero argument ***
-
-Warning: ltrim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
- *** Output for more than valid number of arguments (Valid are 1 or 2 arguments) ***
-
-Warning: ltrim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
*** Using heredoc string ***
string(17) "ng heredoc string"
diff --git a/ext/standard/tests/strings/ltrim_basic.phpt b/ext/standard/tests/strings/ltrim_basic.phpt
index 45967fa24b..61994364a8 100644
--- a/ext/standard/tests/strings/ltrim_basic.phpt
+++ b/ext/standard/tests/strings/ltrim_basic.phpt
@@ -32,7 +32,6 @@ echo "\n-- Trim the ASCII control characters at the beginning of a string --\n";
var_dump(ltrim($binary, "\x00..\x1F"));
?>
-===DONE===
--EXPECT--
*** Testing ltrim() : basic functionality ***
@@ -50,4 +49,3 @@ string(10) "0123456789"
-- Trim the ASCII control characters at the beginning of a string --
string(14) "Example string"
-===DONE===
diff --git a/ext/standard/tests/strings/ltrim_error.phpt b/ext/standard/tests/strings/ltrim_error.phpt
index 694d9fea18..9da128c890 100644
--- a/ext/standard/tests/strings/ltrim_error.phpt
+++ b/ext/standard/tests/strings/ltrim_error.phpt
@@ -11,14 +11,6 @@ Test ltrim() function : error conditions
echo "*** Testing ltrim() : error conditions ***\n";
-echo "\n-- Testing ltrim() function with no arguments --\n";
-var_dump( ltrim() );
-
-echo "\n-- Testing ltrim() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( ltrim("Hello World", "Heo", $extra_arg) );
-
-
$hello = " Hello World\n";
echo "\n-- Test ltrim function with various invalid charlists\n";
var_dump(ltrim($hello, "..a"));
@@ -27,20 +19,9 @@ var_dump(ltrim($hello, "z..a"));
var_dump(ltrim($hello, "a..b..c"));
?>
-===DONE===
--EXPECTF--
*** Testing ltrim() : error conditions ***
--- Testing ltrim() function with no arguments --
-
-Warning: ltrim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing ltrim() function with more than expected no. of arguments --
-
-Warning: ltrim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-- Test ltrim function with various invalid charlists
Warning: ltrim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
@@ -58,4 +39,3 @@ string(14) " Hello World
Warning: ltrim(): Invalid '..'-range in %s on line %d
string(14) " Hello World
"
-===DONE===
diff --git a/ext/standard/tests/strings/md5_basic1.phpt b/ext/standard/tests/strings/md5_basic1.phpt
index e9898cd0c0..6e8dfe7fde 100644
--- a/ext/standard/tests/strings/md5_basic1.phpt
+++ b/ext/standard/tests/strings/md5_basic1.phpt
@@ -10,8 +10,6 @@ Test md5() function : basic functionality
echo "*** Testing md5() : basic functionality ***\n";
var_dump(md5("apple"));
?>
-===DONE===
--EXPECT--
*** Testing md5() : basic functionality ***
string(32) "1f3870be274f6c49b3e31a0c6728957f"
-===DONE===
diff --git a/ext/standard/tests/strings/md5_basic2.phpt b/ext/standard/tests/strings/md5_basic2.phpt
index e72fd40077..f302753cd3 100644
--- a/ext/standard/tests/strings/md5_basic2.phpt
+++ b/ext/standard/tests/strings/md5_basic2.phpt
@@ -22,9 +22,7 @@ if (strcmp(bin2hex($md5_raw), $md5) == 0 ) {
}
?>
-===DONE===
--EXPECT--
*** Testing md5() : basic functionality - with raw output***
string(32) "b10a8db164e0754105b7a99be72e3fe5"
TEST PASSED
-===DONE===
diff --git a/ext/standard/tests/strings/md5_file.phpt b/ext/standard/tests/strings/md5_file.phpt
index 45009669f4..e56987cd6a 100644
--- a/ext/standard/tests/strings/md5_file.phpt
+++ b/ext/standard/tests/strings/md5_file.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/metaphone.phpt b/ext/standard/tests/strings/metaphone.phpt
index ef1d23d89a..c70b4846a1 100644
--- a/ext/standard/tests/strings/metaphone.phpt
+++ b/ext/standard/tests/strings/metaphone.phpt
@@ -3,7 +3,6 @@ metaphone() tests
--FILE--
<?php
-var_dump(metaphone());
var_dump(metaphone(""));
var_dump(metaphone(-1));
var_dump(metaphone(-1, -1));
@@ -26,8 +25,6 @@ foreach($array as $str) {
echo "Done\n";
?>
--EXPECTF--
-Warning: metaphone() expects at least 1 parameter, 0 given in %s on line %d
-NULL
string(0) ""
string(0) ""
bool(false)
diff --git a/ext/standard/tests/strings/money_format_basic1.phpt b/ext/standard/tests/strings/money_format_basic1.phpt
index a9e8f70818..abf7bcf508 100644
--- a/ext/standard/tests/strings/money_format_basic1.phpt
+++ b/ext/standard/tests/strings/money_format_basic1.phpt
@@ -55,7 +55,6 @@ echo gettype(money_format('%=*!14#8.2n', $value))."\n";
echo gettype(money_format('%=*!14#8.2n', $negative_value))."\n";
?>
-===DONE===
--EXPECTF--
*** Testing money_format() : basic functionality***
Format values with 14 positions, 8 digits to left, 2 to right using national format
@@ -100,4 +99,3 @@ string
Deprecated: Function money_format() is deprecated in %s on line %d
string
-===DONE===
diff --git a/ext/standard/tests/strings/money_format_error.phpt b/ext/standard/tests/strings/money_format_error.phpt
index da725a4131..b462f1b9db 100644
--- a/ext/standard/tests/strings/money_format_error.phpt
+++ b/ext/standard/tests/strings/money_format_error.phpt
@@ -23,47 +23,15 @@ $extra_arg = 10;
echo "*** Testing money_format() : error conditions ***\n";
-echo "\n-- Testing money_format() function with no arguments --\n";
-var_dump( money_format() );
-
-echo "\n-- Testing money_format() function with insufficient arguments --\n";
-var_dump( money_format($string) );
-
-echo "\n-- Testing money_format() function with more than expected no. of arguments --\n";
-var_dump( money_format($string, $value, $extra_arg) );
-
echo "\n-- Testing money_format() function with more than one token --\n";
var_dump( money_format($string . $string, $value) );
?>
-===DONE===
--EXPECTF--
*** Testing money_format() : error conditions ***
--- Testing money_format() function with no arguments --
-
-Deprecated: Function money_format() is deprecated in %s on line %d
-
-Warning: money_format() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing money_format() function with insufficient arguments --
-
-Deprecated: Function money_format() is deprecated in %s on line %d
-
-Warning: money_format() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing money_format() function with more than expected no. of arguments --
-
-Deprecated: Function money_format() is deprecated in %s on line %d
-
-Warning: money_format() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-- Testing money_format() function with more than one token --
Deprecated: Function money_format() is deprecated in %s on line %d
Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/nl_langinfo_basic.phpt b/ext/standard/tests/strings/nl_langinfo_basic.phpt
index c940479065..c686caf25d 100644
--- a/ext/standard/tests/strings/nl_langinfo_basic.phpt
+++ b/ext/standard/tests/strings/nl_langinfo_basic.phpt
@@ -26,7 +26,6 @@ var_dump(nl_langinfo(RADIXCHAR));
setlocale(LC_ALL, $original);
?>
-===DONE===
--EXPECT--
*** Testing nl_langinfo() : basic functionality ***
string(3) "Mon"
@@ -34,4 +33,3 @@ string(9) "Wednesday"
string(3) "Jul"
string(5) "April"
string(1) "."
-===DONE===
diff --git a/ext/standard/tests/strings/number_format_basic.phpt b/ext/standard/tests/strings/number_format_basic.phpt
index 79ec7b85ac..4eb4d51086 100644
--- a/ext/standard/tests/strings/number_format_basic.phpt
+++ b/ext/standard/tests/strings/number_format_basic.phpt
@@ -47,7 +47,6 @@ for ($i = 0; $i < count($values); $i++) {
var_dump($res);
}
?>
-===DONE===
--EXPECT--
*** Testing number_format() : basic functionality ***
@@ -106,4 +105,3 @@ string(6) "123,46"
string(4) "0,00"
string(4) "1,00"
string(4) "0,00"
-===DONE===
diff --git a/ext/standard/tests/strings/ord_basic.phpt b/ext/standard/tests/strings/ord_basic.phpt
index f49948206a..a7c93fc6d3 100644
--- a/ext/standard/tests/strings/ord_basic.phpt
+++ b/ext/standard/tests/strings/ord_basic.phpt
@@ -30,7 +30,6 @@ for ($i = 0; $i < 255; $i++) {
}
?>
-===DONE===
--EXPECT--
*** Testing ord() : basic functionality ***
int(97)
@@ -44,4 +43,3 @@ int(10)
int(10)
int(255)
int(72)
-===DONE===
diff --git a/ext/standard/tests/strings/parse_str_basic1.phpt b/ext/standard/tests/strings/parse_str_basic1.phpt
index b3f2fe5cfc..60277fa184 100644
--- a/ext/standard/tests/strings/parse_str_basic1.phpt
+++ b/ext/standard/tests/strings/parse_str_basic1.phpt
@@ -3,18 +3,13 @@ Test parse_str() function : basic functionality
--FILE--
<?php
-/* Prototype : void parse_str ( string $str [, array &$arr ] )
+/* Prototype : void parse_str ( string $str , array &$arr )
* Description: Parses the string into variables
* Source code: ext/standard/string.c
*/
echo "*** Testing parse_str() : basic functionality ***\n";
-echo "Basic test WITHOUT result arg\n";
-$s1 = "first=val1&second=val2&third=val3";
-var_dump(parse_str($s1));
-var_dump($first, $second, $third);
-
echo "\nBasic test WITH undefined var for result arg\n";
$s1 = "first=val1&second=val2&third=val3";
var_dump(parse_str($s1, $res1));
@@ -32,16 +27,8 @@ var_dump(parse_str($s1, $res3_array));
var_dump($res3_array);
?>
-===DONE===
--EXPECTF--
*** Testing parse_str() : basic functionality ***
-Basic test WITHOUT result arg
-
-Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in %s on line %d
-NULL
-string(4) "val1"
-string(4) "val2"
-string(4) "val3"
Basic test WITH undefined var for result arg
NULL
@@ -75,4 +62,3 @@ array(3) {
["third"]=>
string(4) "val3"
}
-===DONE===
diff --git a/ext/standard/tests/strings/parse_str_basic2.phpt b/ext/standard/tests/strings/parse_str_basic2.phpt
index 32a8fcd3fc..15bd3024d6 100644
--- a/ext/standard/tests/strings/parse_str_basic2.phpt
+++ b/ext/standard/tests/strings/parse_str_basic2.phpt
@@ -16,7 +16,6 @@ var_dump(parse_str($s1, $result));
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing parse_str() : non-default arg_separator.input specified ***
NULL
@@ -28,4 +27,3 @@ array(3) {
["third"]=>
string(4) "val3"
}
-===DONE===
diff --git a/ext/standard/tests/strings/parse_str_basic3.phpt b/ext/standard/tests/strings/parse_str_basic3.phpt
index 0368dea5f9..25b5f8745d 100644
--- a/ext/standard/tests/strings/parse_str_basic3.phpt
+++ b/ext/standard/tests/strings/parse_str_basic3.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/parse_str_basic4.phpt b/ext/standard/tests/strings/parse_str_basic4.phpt
index b6126e974b..5b128c7cfc 100644
--- a/ext/standard/tests/strings/parse_str_basic4.phpt
+++ b/ext/standard/tests/strings/parse_str_basic4.phpt
@@ -30,7 +30,6 @@ $str = "arr.test[1]=sid&arr test[4][two]=fred";
var_dump(parse_str($str, $res));
var_dump($res);
?>
-===DONE===
--EXPECTF--
Test string with badly formed strings
NULL
@@ -89,4 +88,3 @@ array(1) {
}
}
}
-===DONE===
diff --git a/ext/standard/tests/strings/pathinfo.phpt b/ext/standard/tests/strings/pathinfo.phpt
index a3d735069d..2bbea73588 100644
--- a/ext/standard/tests/strings/pathinfo.phpt
+++ b/ext/standard/tests/strings/pathinfo.phpt
@@ -3,7 +3,6 @@ pathinfo() tests
--FILE--
<?php
-var_dump(pathinfo());
var_dump(pathinfo(""));
var_dump(pathinfo("."));
var_dump(pathinfo(".."));
@@ -27,8 +26,6 @@ var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME|PATHINFO_BASENAME));
echo "Done\n";
?>
--EXPECTF--
-Warning: pathinfo() expects at least 1 parameter, 0 given in %s on line %d
-NULL
array(2) {
["basename"]=>
string(0) ""
diff --git a/ext/standard/tests/strings/php_strip_whitespace.phpt b/ext/standard/tests/strings/php_strip_whitespace.phpt
index 442672c6aa..5fb314c168 100644
--- a/ext/standard/tests/strings/php_strip_whitespace.phpt
+++ b/ext/standard/tests/strings/php_strip_whitespace.phpt
@@ -5,7 +5,6 @@ php_strip_whitespace() tests
$filename = __DIR__."/php_strip_whitespace.dat";
-var_dump(php_strip_whitespace());
var_dump(php_strip_whitespace($filename));
$data = '/* test comment */';
@@ -40,9 +39,6 @@ var_dump(php_strip_whitespace($filename));
echo "Done\n";
?>
--EXPECTF--
-Warning: php_strip_whitespace() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
Warning: php_strip_whitespace(%sphp_strip_whitespace.dat): failed to open stream: No such file or directory in %s on line %d
string(0) ""
string(18) "/* test comment */"
diff --git a/ext/standard/tests/strings/print_basic.phpt b/ext/standard/tests/strings/print_basic.phpt
index 0b75641991..9d8c8a618c 100644
--- a/ext/standard/tests/strings/print_basic.phpt
+++ b/ext/standard/tests/strings/print_basic.phpt
@@ -58,7 +58,6 @@ that the here document terminator must appear on a
line with just a semicolon no extra whitespace!\n
END;
?>
-===DONE===
--EXPECT--
*** Testing print() : basic functionality ***
@@ -89,4 +88,3 @@ This uses the "here document" syntax to output
multiple lines with VARIABLE interpolation. Note
that the here document terminator must appear on a
line with just a semicolon no extra whitespace!
-===DONE===
diff --git a/ext/standard/tests/strings/print_variation1.phpt b/ext/standard/tests/strings/print_variation1.phpt
index 19a28678f2..f06b83ee8f 100644
--- a/ext/standard/tests/strings/print_variation1.phpt
+++ b/ext/standard/tests/strings/print_variation1.phpt
@@ -81,7 +81,6 @@ foreach($inputs as $input) {
fclose($file_handle); //closing the file handle
?>
-===DONE===
--EXPECTF--
*** Testing print() function: with unexpected inputs for 'arg' argument ***
-- Iteration 1 --
@@ -110,17 +109,17 @@ int(1)
int(1)
-- Iteration 9 --
-Notice: Array to string conversion in %sprint_variation1.php on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(1)
-- Iteration 10 --
-Notice: Array to string conversion in %sprint_variation1.php on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(1)
-- Iteration 11 --
-Notice: Array to string conversion in %sprint_variation1.php on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(1)
-- Iteration 12 --
@@ -153,4 +152,3 @@ int(1)
-- Iteration 21 --
int(1)
-===DONE===
diff --git a/ext/standard/tests/strings/printf.phpt b/ext/standard/tests/strings/printf.phpt
index eab44a4a65..c409d1a8f9 100644
--- a/ext/standard/tests/strings/printf.phpt
+++ b/ext/standard/tests/strings/printf.phpt
@@ -28,14 +28,22 @@ $strings = array( NULL, "abc", 'aaa' );
/* Zero argument */
echo "\n*** Output for zero argument ***\n";
-printf();
+try {
+ printf();
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
/* Number of arguments not matching as specified in format field */
echo "\n*** Output for insufficient number of arguments ***\n";
$string = "dingy%sflem%dwombat";
$nbr = 5;
$name = "voudras";
-printf("%d $string %s", $nbr, $name);
+try {
+ printf("%d $string %s", $nbr, $name);
+} catch (\ArgumentCountError $e) {
+ print('Error found: '.$e->getMessage());
+}
/* Scalar argument */
@@ -226,13 +234,10 @@ printf("%d", $tempstring);
?>
--EXPECTF--
*** Output for zero argument ***
-
-Warning: printf() expects at least %d parameter, %d given in %s on line %d
+printf() expects at least %d parameter, %d given
*** Output for insufficient number of arguments ***
-
-Warning: printf(): Too few arguments in %s on line %d
-
+Error found: 5 parameters are required, 3 given
*** Output for scalar argument ***
3
*** Output for NULL as argument ***
diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt
index 1a90970371..9d3b448495 100644
--- a/ext/standard/tests/strings/printf_64bit.phpt
+++ b/ext/standard/tests/strings/printf_64bit.phpt
@@ -28,14 +28,22 @@ $strings = array( NULL, "abc", 'aaa' );
/* Zero argument */
echo "\n*** Output for zero argument ***\n";
-printf();
+try {
+ printf();
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
/* Number of arguments not matching as specified in format field */
echo "\n*** Output for insufficient number of arguments ***\n";
$string = "dingy%sflem%dwombat";
$nbr = 5;
$name = "voudras";
-printf("%d $string %s", $nbr, $name);
+try {
+ printf("%d $string %s", $nbr, $name);
+} catch (\ArgumentCountError $e) {
+ print('Error found: '.$e->getMessage());
+}
/* Scalar argument */
@@ -226,13 +234,10 @@ printf("%d", $tempstring);
?>
--EXPECTF--
*** Output for zero argument ***
-
-Warning: printf() expects at least 1 parameter, 0 given in %s on line %d
+printf() expects at least 1 parameter, 0 given
*** Output for insufficient number of arguments ***
-
-Warning: printf(): Too few arguments in %s on line %d
-
+Error found: 5 parameters are required, 3 given
*** Output for scalar argument ***
3
*** Output for NULL as argument ***
diff --git a/ext/standard/tests/strings/printf_basic1.phpt b/ext/standard/tests/strings/printf_basic1.phpt
index db6edf6374..b2cbe22375 100644
--- a/ext/standard/tests/strings/printf_basic1.phpt
+++ b/ext/standard/tests/strings/printf_basic1.phpt
@@ -40,7 +40,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using string format ***
@@ -59,4 +58,3 @@ int(27)
-- Calling printf() with string three arguments --
arg1 argument arg2 argument arg3 argument
int(41)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic2.phpt b/ext/standard/tests/strings/printf_basic2.phpt
index 6448fe6609..d7ed15e29e 100644
--- a/ext/standard/tests/strings/printf_basic2.phpt
+++ b/ext/standard/tests/strings/printf_basic2.phpt
@@ -40,7 +40,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using integer format ***
@@ -59,4 +58,3 @@ int(7)
-- Calling printf() with three arguments--
111 222 333
int(11)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic3.phpt b/ext/standard/tests/strings/printf_basic3.phpt
index 711327cd6d..b5ee1b82b0 100644
--- a/ext/standard/tests/strings/printf_basic3.phpt
+++ b/ext/standard/tests/strings/printf_basic3.phpt
@@ -54,7 +54,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using float format ***
@@ -79,4 +78,3 @@ int(19)
int(29)
11.110000 22.220000 33.330000
int(29)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic4.phpt b/ext/standard/tests/strings/printf_basic4.phpt
index e5c07fd03c..cc1b533db6 100644
--- a/ext/standard/tests/strings/printf_basic4.phpt
+++ b/ext/standard/tests/strings/printf_basic4.phpt
@@ -39,7 +39,6 @@ $result = printf($format3, $arg1, $arg2, $arg3);
echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using bool format ***
@@ -58,4 +57,3 @@ int(3)
-- Calling printf() with three arguments--
1 0 1
int(5)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic5.phpt b/ext/standard/tests/strings/printf_basic5.phpt
index e7bebd6df7..e50e9d58b8 100644
--- a/ext/standard/tests/strings/printf_basic5.phpt
+++ b/ext/standard/tests/strings/printf_basic5.phpt
@@ -39,7 +39,6 @@ $result = printf($format3, $arg1, $arg2, $arg3);
echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using char format ***
@@ -58,4 +57,3 @@ int(3)
-- Calling printf() with three arguments --
A B C
int(5)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic6.phpt b/ext/standard/tests/strings/printf_basic6.phpt
index b3872efdd0..f84d703089 100644
--- a/ext/standard/tests/strings/printf_basic6.phpt
+++ b/ext/standard/tests/strings/printf_basic6.phpt
@@ -38,7 +38,6 @@ $result = printf($format3, $arg1, $arg2, $arg3);
echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using exponential format ***
@@ -57,4 +56,3 @@ int(23)
-- Calling printf() with three arguments --
1.000000e+3 2.000000E+3 3.000000e+3
int(35)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic7.phpt b/ext/standard/tests/strings/printf_basic7.phpt
index 6675ddb29e..1a7c24d895 100644
--- a/ext/standard/tests/strings/printf_basic7.phpt
+++ b/ext/standard/tests/strings/printf_basic7.phpt
@@ -46,7 +46,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using unsigned format ***
@@ -65,4 +64,3 @@ int(21)
-- Calling printf() with three arguments --
4294966185 4293732729 2345432
int(29)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic8.phpt b/ext/standard/tests/strings/printf_basic8.phpt
index 3ec0eda5ec..5df156a553 100644
--- a/ext/standard/tests/strings/printf_basic8.phpt
+++ b/ext/standard/tests/strings/printf_basic8.phpt
@@ -45,7 +45,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using octal format ***
@@ -64,4 +63,3 @@ int(14)
-- Calling printf() with three arguments --
21 37777777431 567
int(18)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_basic9.phpt b/ext/standard/tests/strings/printf_basic9.phpt
index cb9513d975..b86da032e8 100644
--- a/ext/standard/tests/strings/printf_basic9.phpt
+++ b/ext/standard/tests/strings/printf_basic9.phpt
@@ -55,7 +55,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing printf() : basic functionality - using hexadecimal format ***
@@ -80,4 +79,3 @@ b 84 b1
int(7)
B 84 B1
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_error.phpt b/ext/standard/tests/strings/printf_error.phpt
index a88390bc04..62591e9e6f 100644
--- a/ext/standard/tests/strings/printf_error.phpt
+++ b/ext/standard/tests/strings/printf_error.phpt
@@ -11,7 +11,11 @@ echo "*** Testing printf() : error conditions ***\n";
// Zero arguments
echo "\n-- Testing printf() function with Zero arguments --\n";
-var_dump( printf() );
+try {
+ var_dump( printf() );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n-- Testing printf() function with less than expected no. of arguments --\n";
$format1 = '%s';
@@ -21,50 +25,58 @@ $arg1 = 'one';
$arg2 = 'two';
echo "\n-- Call printf with one argument less than expected --\n";
-var_dump( printf($format1) );
-var_dump( printf($format2,$arg1) );
-var_dump( printf($format3,$arg1,$arg2) );
+try {
+ var_dump( printf($format1) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( printf($format2,$arg1) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( printf($format3,$arg1,$arg2) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n-- Call printf with two argument less than expected --\n";
-var_dump( printf($format2) );
-var_dump( printf($format3,$arg1) );
+try {
+ var_dump( printf($format2) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( printf($format3,$arg1) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n-- Call printf with three argument less than expected --\n";
-var_dump( printf($format3) );
+try {
+ var_dump( printf($format3) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
--EXPECTF--
*** Testing printf() : error conditions ***
-- Testing printf() function with Zero arguments --
-
-Warning: printf() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
+printf() expects at least 1 parameter, 0 given
-- Testing printf() function with less than expected no. of arguments --
-- Call printf with one argument less than expected --
-
-Warning: printf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: printf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: printf(): Too few arguments in %s on line %d
-bool(false)
+2 parameters are required, 1 given
+3 parameters are required, 2 given
+4 parameters are required, 3 given
-- Call printf with two argument less than expected --
-
-Warning: printf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: printf(): Too few arguments in %s on line %d
-bool(false)
+3 parameters are required, 1 given
+4 parameters are required, 2 given
-- Call printf with three argument less than expected --
-
-Warning: printf(): Too few arguments in %s on line %d
-bool(false)
-===DONE===
+4 parameters are required, 1 given
diff --git a/ext/standard/tests/strings/printf_variation1.phpt b/ext/standard/tests/strings/printf_variation1.phpt
index fcf69ebaa7..0884a2ff71 100644
--- a/ext/standard/tests/strings/printf_variation1.phpt
+++ b/ext/standard/tests/strings/printf_variation1.phpt
@@ -110,7 +110,6 @@ foreach($values as $value) {
fclose($file_handle);
?>
-===DONE===
--EXPECTF--
*** Testing printf() : with unexpected values for format argument ***
@@ -188,71 +187,71 @@ int(3)
-- Iteration 10 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 11 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 12 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 13 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 14 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
@@ -351,4 +350,3 @@ Resource id #%d
int(%d)
Resource id #%d
int(%d)
-===DONE===
diff --git a/ext/standard/tests/strings/printf_variation2.phpt b/ext/standard/tests/strings/printf_variation2.phpt
index 8e7d5ec910..3c3d92cbe3 100644
--- a/ext/standard/tests/strings/printf_variation2.phpt
+++ b/ext/standard/tests/strings/printf_variation2.phpt
@@ -7,8 +7,6 @@ Test printf() function : usage variations - with all types of values for arg1 ar
* Source code: ext/standard/formatted_print.c
*/
-error_reporting(E_ALL & ~E_NOTICE);
-
echo "*** Testing printf() : with different types of values passed for arg1 argument ***\n";
// initialing required variables
@@ -107,7 +105,6 @@ foreach($values as $value) {
fclose($file_handle);
?>
-===DONE===
--EXPECTF--
*** Testing printf() : with different types of values passed for arg1 argument ***
@@ -166,32 +163,52 @@ int(3)
int(3)
-- Iteration 10 --
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 11 --
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 12 --
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 13 --
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 14 --
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
+
+Warning: Array to string conversion in %s on line %d
Array
int(5)
@@ -278,4 +295,3 @@ Resource id #%d
int(%d)
Resource id #%d
int(%d)
-===DONE===
diff --git a/ext/standard/tests/strings/quoted_printable_decode_basic.phpt b/ext/standard/tests/strings/quoted_printable_decode_basic.phpt
index 654c418dc4..09bcd343d0 100644
--- a/ext/standard/tests/strings/quoted_printable_decode_basic.phpt
+++ b/ext/standard/tests/strings/quoted_printable_decode_basic.phpt
@@ -18,8 +18,6 @@ $str = "=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A=
var_dump(bin2hex(quoted_printable_decode($str)));
?>
-===DONE===
--EXPECT--
*** Testing quoted_printable_decode() : basic functionality ***
string(76) "fa776f772d666163746f72c1d0d5ddc5ceced9c50a20d4cfd2c7cfd7d9c520d0d2cfc5cbd4d9"
-===DONE===
diff --git a/ext/standard/tests/strings/quoted_printable_encode_001.phpt b/ext/standard/tests/strings/quoted_printable_encode_001.phpt
index 1ce7d791dc..df26d5cf4b 100644
--- a/ext/standard/tests/strings/quoted_printable_encode_001.phpt
+++ b/ext/standard/tests/strings/quoted_printable_encode_001.phpt
@@ -3,30 +3,18 @@ quoted_printable_encode() tests - 1
--FILE--
<?php
-var_dump(quoted_printable_encode());
var_dump(quoted_printable_encode(""));
var_dump(quoted_printable_encode("test"));
-var_dump(quoted_printable_encode("test", "more"));
-$a = array("str");
-var_dump(quoted_printable_encode($a));
var_dump(quoted_printable_encode(1));
var_dump(quoted_printable_encode(NULL));
var_dump(quoted_printable_encode(false));
echo "Done\n";
?>
---EXPECTF--
-Warning: quoted_printable_encode() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
+--EXPECT--
string(0) ""
string(4) "test"
-
-Warning: quoted_printable_encode() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: quoted_printable_encode() expects parameter 1 to be string, array given in %s on line %d
-NULL
string(1) "1"
string(0) ""
string(0) ""
diff --git a/ext/standard/tests/strings/quotemeta_basic.phpt b/ext/standard/tests/strings/quotemeta_basic.phpt
index d2694db6b6..87b0718bd3 100644
--- a/ext/standard/tests/strings/quotemeta_basic.phpt
+++ b/ext/standard/tests/strings/quotemeta_basic.phpt
@@ -14,10 +14,8 @@ var_dump(quotemeta("Hello how are you ?"));
var_dump(quotemeta("(100 + 50) * 10"));
var_dump(quotemeta("\+*?[^]($)"));
?>
-===DONE===
--EXPECT--
*** Testing quotemeta() : basic functionality ***
string(20) "Hello how are you \?"
string(19) "\(100 \+ 50\) \* 10"
string(20) "\\\+\*\?\[\^\]\(\$\)"
-===DONE===
diff --git a/ext/standard/tests/strings/quotemeta_basic_1.phpt b/ext/standard/tests/strings/quotemeta_basic_1.phpt
index 4b479a9a60..4d1feb5ae1 100644
--- a/ext/standard/tests/strings/quotemeta_basic_1.phpt
+++ b/ext/standard/tests/strings/quotemeta_basic_1.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test function quotemeta() - using an empty string is given as str.
+Test function quotemeta() - using an empty string is given as str
--CREDITS--
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
User Group: PHPSP #PHPTestFestBrasil
@@ -9,4 +9,4 @@ $str = "";
var_dump(quotemeta($str));
?>
--EXPECT--
-bool(false)
+string(0) ""
diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt
index 5f57b0e850..223a839f58 100644
--- a/ext/standard/tests/strings/rtrim.phpt
+++ b/ext/standard/tests/strings/rtrim.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/rtrim_basic.phpt b/ext/standard/tests/strings/rtrim_basic.phpt
index 9946f90c6e..d58a9e4a95 100644
--- a/ext/standard/tests/strings/rtrim_basic.phpt
+++ b/ext/standard/tests/strings/rtrim_basic.phpt
@@ -33,7 +33,6 @@ echo "\n-- Trim the ASCII control characters at the beginning of a string --\n";
var_dump(rtrim($binary, "\x00..\x1F"));
?>
-===DONE===
--EXPECT--
*** Testing rtrim() : basic functionality ***
@@ -51,4 +50,3 @@ string(10) "0123456789"
-- Trim the ASCII control characters at the beginning of a string --
string(14) "Example string"
-===DONE===
diff --git a/ext/standard/tests/strings/rtrim_error.phpt b/ext/standard/tests/strings/rtrim_error.phpt
index 108f96a1f0..ef45f723f3 100644
--- a/ext/standard/tests/strings/rtrim_error.phpt
+++ b/ext/standard/tests/strings/rtrim_error.phpt
@@ -11,14 +11,6 @@ Test rtrim() function : error conditions
echo "*** Testing rtrim() : error conditions ***\n";
-echo "\n-- Testing rtrim() function with no arguments --\n";
-var_dump( rtrim() );
-
-echo "\n-- Testing rtrim() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( rtrim("Hello World", "Heo", $extra_arg) );
-
-
$hello = " Hello World\n";
echo "\n-- Test rtrim function with various invalid charlists\n";
var_dump(rtrim($hello, "..a"));
@@ -27,20 +19,9 @@ var_dump(rtrim($hello, "z..a"));
var_dump(rtrim($hello, "a..b..c"));
?>
-===DONE===
--EXPECTF--
*** Testing rtrim() : error conditions ***
--- Testing rtrim() function with no arguments --
-
-Warning: rtrim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing rtrim() function with more than expected no. of arguments --
-
-Warning: rtrim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-- Test rtrim function with various invalid charlists
Warning: rtrim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
@@ -58,4 +39,3 @@ string(14) " Hello World
Warning: rtrim(): Invalid '..'-range in %s on line %d
string(14) " Hello World
"
-===DONE===
diff --git a/ext/standard/tests/strings/setlocale-win32.phpt b/ext/standard/tests/strings/setlocale-win32.phpt
index fcfbce3579..e6aeda5f1c 100644
--- a/ext/standard/tests/strings/setlocale-win32.phpt
+++ b/ext/standard/tests/strings/setlocale-win32.phpt
@@ -14,7 +14,6 @@ var_dump(setlocale(LC_ALL, 'uk_US'));
var_dump(setlocale(LC_ALL, 'us_UK'));
var_dump(setlocale(LC_ALL, 'us_US'));
?>
-===DONE===
--EXPECT--
bool(false)
bool(false)
@@ -22,4 +21,3 @@ string(27) "English_United Kingdom.1252"
string(26) "English_United States.1252"
string(27) "English_United Kingdom.1252"
string(26) "English_United States.1252"
-===DONE===
diff --git a/ext/standard/tests/strings/setlocale_error.phpt b/ext/standard/tests/strings/setlocale_error.phpt
index 14bb7d7ed5..c2b18b1992 100644
--- a/ext/standard/tests/strings/setlocale_error.phpt
+++ b/ext/standard/tests/strings/setlocale_error.phpt
@@ -18,14 +18,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
echo "*** Testing setlocale() : error conditions ***\n";
-// Zero argument
-echo "\n-- Testing setlocale() function with Zero arguments --";
-var_dump( setlocale());
-
-// One argument
-echo "\n-- Testing setlocale() function with One argument, 'category' = LC_ALL --";
-var_dump( setlocale(LC_ALL) );
-
echo "\n-- Testing setlocale() function with invalid locale array, 'category' = LC_ALL --\n";
//Invalid array of locales
$invalid_locales = array("en_US.invalid", "en_AU.invalid", "ko_KR.invalid");
@@ -44,14 +36,6 @@ echo "\nDone";
--EXPECTF--
*** Testing setlocale() : error conditions ***
--- Testing setlocale() function with Zero arguments --
-Warning: setlocale() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing setlocale() function with One argument, 'category' = LC_ALL --
-Warning: setlocale() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-- Testing setlocale() function with invalid locale array, 'category' = LC_ALL --
bool(false)
diff --git a/ext/standard/tests/strings/sha1_basic.phpt b/ext/standard/tests/strings/sha1_basic.phpt
index 0761fe4cfd..1c179da202 100644
--- a/ext/standard/tests/strings/sha1_basic.phpt
+++ b/ext/standard/tests/strings/sha1_basic.phpt
@@ -37,7 +37,6 @@ var_dump(bin2hex(sha1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234
var_dump(bin2hex(sha1("12345678901234567890123456789012345678901234567890123456789012345678901234567890", true)));
?>
-===DONE===
--EXPECT--
*** Testing sha1() : basic functionality ***
@@ -67,4 +66,3 @@ string(40) "c12252ceda8be8994d5fa0290a47231c1d16aae3"
string(40) "32d10c7b8cf96570ca04ce37f2a19d84240d3a89"
string(40) "761c457bf73b14d27e9e9265c46f4b4dda11f940"
string(40) "50abf5706a150990a08b2c5ea40fa0e585554732"
-===DONE===
diff --git a/ext/standard/tests/strings/sha1_file.phpt b/ext/standard/tests/strings/sha1_file.phpt
index 102dab75ff..4b43eeee3c 100644
--- a/ext/standard/tests/strings/sha1_file.phpt
+++ b/ext/standard/tests/strings/sha1_file.phpt
@@ -46,12 +46,6 @@ var_dump( sha1_file(12) );
echo "\n-- NULL as filename --\n";
var_dump( sha1_file(NULL) );
-echo "\n-- Zero arguments --\n";
- var_dump ( sha1_file() );
-
-echo "\n-- More than valid number of arguments ( valid is 2) --\n";
-var_dump ( sha1_file("EmptyFileSHA1.txt", true, NULL) );
-
echo "\n-- Hexadecimal Output for Empty file as Argument --\n";
var_dump( sha1_file("EmptyFileSHA1.txt") );
@@ -69,7 +63,6 @@ unlink("DataFileSHA1.txt");
unlink("EmptyFileSHA1.txt");
?>
-===DONE===
--EXPECTF--
*** Testing sha1_file() : basic functionality ***
@@ -95,16 +88,6 @@ bool(false)
Warning: sha1_file(): Filename cannot be empty in %s on line %d
bool(false)
--- Zero arguments --
-
-Warning: sha1_file() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- More than valid number of arguments ( valid is 2) --
-
-Warning: sha1_file() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-- Hexadecimal Output for Empty file as Argument --
string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
@@ -116,4 +99,3 @@ string(40) "d16a568ab98233deff7ec8b1668eb4b3d9e53fee"
-- Raw Binary Output for a valid file with some contents --
string(40) "d16a568ab98233deff7ec8b1668eb4b3d9e53fee"
-===DONE===
diff --git a/ext/standard/tests/strings/similar_text_basic.phpt b/ext/standard/tests/strings/similar_text_basic.phpt
index ad8807f102..20ae4854ce 100644
--- a/ext/standard/tests/strings/similar_text_basic.phpt
+++ b/ext/standard/tests/strings/similar_text_basic.phpt
@@ -26,7 +26,6 @@ var_dump($percent);
similar_text("abcdefghabcdef", "zzzzabcdefggg", $percent);
var_dump($percent);
?>
-===DONE===
--EXPECT--
int(3)
int(0)
@@ -36,4 +35,3 @@ float(54.545454545455)
float(0)
float(18.181818181818)
float(51.851851851852)
-===DONE===
diff --git a/ext/standard/tests/strings/soundex.phpt b/ext/standard/tests/strings/soundex.phpt
index 650236c2e5..744f71c17a 100644
--- a/ext/standard/tests/strings/soundex.phpt
+++ b/ext/standard/tests/strings/soundex.phpt
@@ -5,7 +5,6 @@ soundex() tests
var_dump(soundex(""));
var_dump(soundex(-1));
-var_dump(soundex(array()));
$array = array(
"From",
@@ -34,9 +33,6 @@ echo "Done\n";
--EXPECTF--
bool(false)
string(4) "0000"
-
-Warning: soundex() expects parameter 1 to be string, array given in %s on line %d
-NULL
string(4) "F650"
string(4) "T300"
string(4) "T500"
diff --git a/ext/standard/tests/strings/soundex_basic.phpt b/ext/standard/tests/strings/soundex_basic.phpt
index 401eb67460..7c536f1d34 100644
--- a/ext/standard/tests/strings/soundex_basic.phpt
+++ b/ext/standard/tests/strings/soundex_basic.phpt
@@ -25,7 +25,6 @@ var_dump(soundex("Lukasiewicz") == soundex("Lissajous")); // L222
var_dump(soundex("Lukasiewicz") == soundex("Ghosh"));
var_dump(soundex("Hilbert") == soundex("Ladd"));
?>
-===DONE===
--EXPECT--
*** Testing soundex() : basic functionality ***
string(4) "E460"
@@ -42,4 +41,3 @@ bool(true)
bool(true)
bool(false)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/sprintf_error.phpt b/ext/standard/tests/strings/sprintf_error.phpt
index 1c12cd3168..4ba7a539fe 100644
--- a/ext/standard/tests/strings/sprintf_error.phpt
+++ b/ext/standard/tests/strings/sprintf_error.phpt
@@ -11,7 +11,11 @@ echo "*** Testing sprintf() : error conditions ***\n";
// Zero arguments
echo "\n-- Testing sprintf() function with Zero arguments --\n";
-var_dump( sprintf() );
+try {
+ var_dump( sprintf() );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "\n-- Testing sprintf() function with less than expected no. of arguments --\n";
$format1 = '%s';
@@ -21,16 +25,40 @@ $arg1 = 'one';
$arg2 = 'two';
// with one argument less than expected
-var_dump( sprintf($format1) );
-var_dump( sprintf($format2,$arg1) );
-var_dump( sprintf($format3,$arg1,$arg2) );
+try {
+ var_dump( sprintf($format1) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( sprintf($format2,$arg1) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( sprintf($format3,$arg1,$arg2) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// with two argument less than expected
-var_dump( sprintf($format2) );
-var_dump( sprintf($format3,$arg1) );
+try {
+ var_dump( sprintf($format2) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( sprintf($format3,$arg1) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
// with three argument less than expected
-var_dump( sprintf($format3) );
+try {
+ var_dump( sprintf($format3) );
+} catch (\ArgumentCountError $e) {
+ echo $e->getMessage(), "\n";
+}
echo "Done";
?>
@@ -38,27 +66,13 @@ echo "Done";
*** Testing sprintf() : error conditions ***
-- Testing sprintf() function with Zero arguments --
-
-Warning: sprintf() expects at least %d parameter, %d given in %s on line %d
-bool(false)
+sprintf() expects at least %d parameter, %d given
-- Testing sprintf() function with less than expected no. of arguments --
-
-Warning: sprintf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: sprintf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: sprintf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: sprintf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: sprintf(): Too few arguments in %s on line %d
-bool(false)
-
-Warning: sprintf(): Too few arguments in %s on line %d
-bool(false)
+2 parameters are required, 1 given
+3 parameters are required, 2 given
+4 parameters are required, 3 given
+3 parameters are required, 1 given
+4 parameters are required, 2 given
+4 parameters are required, 1 given
Done
diff --git a/ext/standard/tests/strings/sprintf_variation1.phpt b/ext/standard/tests/strings/sprintf_variation1.phpt
index bf77e3bc06..33320b9f1c 100644
--- a/ext/standard/tests/strings/sprintf_variation1.phpt
+++ b/ext/standard/tests/strings/sprintf_variation1.phpt
@@ -155,57 +155,57 @@ string(3) "0.5"
-- Iteration 10 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 11 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 12 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 13 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 14 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 15 --
diff --git a/ext/standard/tests/strings/sprintf_variation18.phpt b/ext/standard/tests/strings/sprintf_variation18.phpt
index 2bf9322c83..74547cf53e 100644
--- a/ext/standard/tests/strings/sprintf_variation18.phpt
+++ b/ext/standard/tests/strings/sprintf_variation18.phpt
@@ -7,8 +7,6 @@ Test sprintf() function : usage variations - string formats with array values
* Source code: ext/standard/formatted_print.c
*/
-error_reporting(E_ALL & ~E_NOTICE);
-
echo "*** Testing sprintf() : string formats with array values ***\n";
// different arrays used to test he function
@@ -47,185 +45,377 @@ foreach($array_values as $array_value) {
echo "Done";
?>
---EXPECT--
+--EXPECTF--
*** Testing sprintf() : string formats with array values ***
-- Iteration 1 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 2 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 3 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 4 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 5 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 6 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 7 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 8 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 9 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 10 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 11 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 12 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
string(1) "s"
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "Array "
+
+Warning: Array to string conversion in %s on line %d
string(6) " Array"
+
+Warning: Array to string conversion in %s on line %d
string(6) "
Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(30) " Array"
string(10) "a-zA-Z0-9]"
string(1) "s"
diff --git a/ext/standard/tests/strings/sprintf_variation2.phpt b/ext/standard/tests/strings/sprintf_variation2.phpt
index 1bab5dc862..0f8290a9a7 100644
--- a/ext/standard/tests/strings/sprintf_variation2.phpt
+++ b/ext/standard/tests/strings/sprintf_variation2.phpt
@@ -7,8 +7,6 @@ Test sprintf() function : usage variations - with all types of values for arg1 a
* Source code: ext/standard/formatted_print.c
*/
-error_reporting(E_ALL & ~E_NOTICE);
-
echo "*** Testing sprintf() : with different types of values passed for arg1 argument ***\n";
// initialing required variables
@@ -144,23 +142,43 @@ string(3) "0.5"
string(3) "0.5"
-- Iteration 10 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 11 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 12 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 13 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 14 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 15 --
diff --git a/ext/standard/tests/strings/sprintf_variation23.phpt b/ext/standard/tests/strings/sprintf_variation23.phpt
index 8a7a45e57a..b35d5cc849 100644
--- a/ext/standard/tests/strings/sprintf_variation23.phpt
+++ b/ext/standard/tests/strings/sprintf_variation23.phpt
@@ -42,7 +42,6 @@ fclose($fp);
closedir($dfp);
?>
-===DONE===
--EXPECTF--
*** Testing sprintf() : char formats with resource values ***
@@ -75,4 +74,3 @@ string(1) "%a"
string(1) "%a"
string(11) "a-bA-B@#$&]"
string(1) "c"
-===DONE===
diff --git a/ext/standard/tests/strings/sprintf_variation36.phpt b/ext/standard/tests/strings/sprintf_variation36.phpt
index b465e0cf9e..17869f0ade 100644
--- a/ext/standard/tests/strings/sprintf_variation36.phpt
+++ b/ext/standard/tests/strings/sprintf_variation36.phpt
@@ -42,7 +42,6 @@ fclose($fp);
closedir($dfp);
?>
-===DONE===
--EXPECTF--
*** Testing sprintf() : hexa formats with resource values ***
@@ -75,4 +74,3 @@ string(4) "%a"
string(30) "%a"
string(10) "0-9A-Fa-f]"
string(1) "x"
-===DONE===
diff --git a/ext/standard/tests/strings/sprintf_variation48.phpt b/ext/standard/tests/strings/sprintf_variation48.phpt
index 1f5504af4b..73dc5950a9 100644
--- a/ext/standard/tests/strings/sprintf_variation48.phpt
+++ b/ext/standard/tests/strings/sprintf_variation48.phpt
@@ -42,7 +42,6 @@ fclose($fp);
closedir($dfp);
?>
-===DONE===
--EXPECTF--
*** Testing sprintf() : scientific formats with resource values ***
@@ -75,4 +74,3 @@ string(%d) "%f"
string(30) "%s%f"
string(%d) "0-1]"
string(1) "e"
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic1.phpt b/ext/standard/tests/strings/sscanf_basic1.phpt
index 8a38f9d19e..388d80ea73 100644
--- a/ext/standard/tests/strings/sscanf_basic1.phpt
+++ b/ext/standard/tests/strings/sscanf_basic1.phpt
@@ -27,7 +27,6 @@ $res = sscanf($str, $format, $part, $number, $stock);
var_dump($res, $part, $number, $stock);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality - using string format ***
@@ -41,4 +40,3 @@ int(3)
string(6) "Widget"
string(7) "1234789"
string(2) "25"
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic2.phpt b/ext/standard/tests/strings/sscanf_basic2.phpt
index 92f4d1051e..2c29bcacce 100644
--- a/ext/standard/tests/strings/sscanf_basic2.phpt
+++ b/ext/standard/tests/strings/sscanf_basic2.phpt
@@ -27,7 +27,6 @@ $res = sscanf($str, $format, $part, $number, $stock);
var_dump($res, $part, $number, $stock);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality - using integer format ***
@@ -41,4 +40,3 @@ int(3)
string(6) "Widget"
int(1234789)
int(25)
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic3.phpt b/ext/standard/tests/strings/sscanf_basic3.phpt
index b728dea34d..e30f67aa44 100644
--- a/ext/standard/tests/strings/sscanf_basic3.phpt
+++ b/ext/standard/tests/strings/sscanf_basic3.phpt
@@ -24,7 +24,6 @@ $res = sscanf($str, $format, $part, $length, $width, $depth);
var_dump($res, $part, $length, $width, $depth);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality -- using float format ***
@@ -40,4 +39,3 @@ string(6) "Widget"
float(111.53)
float(22.345)
float(12.4)
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic4.phpt b/ext/standard/tests/strings/sscanf_basic4.phpt
index 726bc08a10..2cf05383d5 100644
--- a/ext/standard/tests/strings/sscanf_basic4.phpt
+++ b/ext/standard/tests/strings/sscanf_basic4.phpt
@@ -24,7 +24,6 @@ $res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4);
var_dump($res, $arg1, $arg2, $arg3, $arg4);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality - using char format ***
@@ -40,4 +39,3 @@ string(1) "X"
string(1) "A"
string(1) "B"
string(1) "C"
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic5.phpt b/ext/standard/tests/strings/sscanf_basic5.phpt
index 36c2feba9d..16012f26cf 100644
--- a/ext/standard/tests/strings/sscanf_basic5.phpt
+++ b/ext/standard/tests/strings/sscanf_basic5.phpt
@@ -30,7 +30,6 @@ var_dump($res, $arg1, $arg2, $arg3, $arg4);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality -using exponential format ***
@@ -55,4 +54,3 @@ float(10.12345)
float(10123.45)
float(10123.45)
float(-101234.5)
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic6.phpt b/ext/standard/tests/strings/sscanf_basic6.phpt
index 381ccc12c2..4b109b9584 100644
--- a/ext/standard/tests/strings/sscanf_basic6.phpt
+++ b/ext/standard/tests/strings/sscanf_basic6.phpt
@@ -30,7 +30,6 @@ $res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
var_dump($res, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality - using unsigned format ***
@@ -50,4 +49,3 @@ int(11)
string(10) "4294967285"
NULL
NULL
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic7.phpt b/ext/standard/tests/strings/sscanf_basic7.phpt
index 253dd1ba53..daa93715d6 100644
--- a/ext/standard/tests/strings/sscanf_basic7.phpt
+++ b/ext/standard/tests/strings/sscanf_basic7.phpt
@@ -24,7 +24,6 @@ $res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
var_dump($res, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality - using octal format ***
@@ -44,4 +43,3 @@ int(83)
int(10)
NULL
NULL
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_basic8.phpt b/ext/standard/tests/strings/sscanf_basic8.phpt
index f4f237fec4..0adcb3d516 100644
--- a/ext/standard/tests/strings/sscanf_basic8.phpt
+++ b/ext/standard/tests/strings/sscanf_basic8.phpt
@@ -29,7 +29,6 @@ $res = sscanf($str, $format2, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
var_dump($res, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
?>
-===DONE===
--EXPECT--
*** Testing sscanf() : basic functionality - - using hexadecimal format ***
@@ -62,4 +61,3 @@ int(4667)
int(-4667)
int(6844)
int(1)
-===DONE===
diff --git a/ext/standard/tests/strings/sscanf_error.phpt b/ext/standard/tests/strings/sscanf_error.phpt
index ca967758ab..25b6d889a9 100644
--- a/ext/standard/tests/strings/sscanf_error.phpt
+++ b/ext/standard/tests/strings/sscanf_error.phpt
@@ -12,33 +12,15 @@ echo "*** Testing sscanf() : error conditions ***\n";
$str = "Hello World";
$format = "%s %s";
-echo "\n-- Testing sscanf() function with no arguments --\n";
-var_dump( sscanf() );
-
-echo "\n-- Testing sscanf() function with one argument --\n";
-var_dump( sscanf($str) );
-
echo "\n-- Testing sscanf() function with more than expected no. of arguments --\n";
var_dump( sscanf($str, $format, $str1, $str2, $extra_str) );
?>
-===DONE===
--EXPECTF--
*** Testing sscanf() : error conditions ***
--- Testing sscanf() function with no arguments --
-
-Warning: sscanf() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing sscanf() function with one argument --
-
-Warning: sscanf() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-- Testing sscanf() function with more than expected no. of arguments --
Warning: sscanf(): Variable is not assigned by any conversion specifiers in %s on line %d
int(-1)
-===DONE===
diff --git a/ext/standard/tests/strings/str_getcsv_002.phpt b/ext/standard/tests/strings/str_getcsv_002.phpt
index a4ff87c206..de96e73913 100644
--- a/ext/standard/tests/strings/str_getcsv_002.phpt
+++ b/ext/standard/tests/strings/str_getcsv_002.phpt
@@ -7,7 +7,6 @@ $contents = <<<EOS
EOS;
print_r(str_getcsv($contents, ',', '"', ''));
?>
-===DONE===
--EXPECT--
Array
(
@@ -16,4 +15,3 @@ Array
[2] => cell3
[3] => cell4
)
-===DONE===
diff --git a/ext/standard/tests/strings/str_ireplace.phpt b/ext/standard/tests/strings/str_ireplace.phpt
index 526b8ac723..71a9d1e127 100644
--- a/ext/standard/tests/strings/str_ireplace.phpt
+++ b/ext/standard/tests/strings/str_ireplace.phpt
@@ -3,9 +3,6 @@ str_ireplace() tests
--FILE--
<?php
-var_dump(str_ireplace());
-var_dump(str_ireplace(""));
-var_dump(str_ireplace("", ""));
var_dump(str_ireplace("", "", ""));
var_dump(str_ireplace("tt", "a", "ttttTttttttttTT"));
@@ -48,14 +45,6 @@ var_dump($Data = str_ireplace("\n", "<br>", $Data));
echo "Done\n";
?>
--EXPECTF--
-Warning: str_ireplace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: str_ireplace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_ireplace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
string(0) ""
string(8) "aaaaaaaT"
string(8) "aaaaaaaT"
diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt
index b44a9517ab..a4f60bfa6a 100644
--- a/ext/standard/tests/strings/str_pad.phpt
+++ b/ext/standard/tests/strings/str_pad.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_pad_variation1.phpt b/ext/standard/tests/strings/str_pad_variation1.phpt
new file mode 100644
index 0000000000..6123bc60c9
--- /dev/null
+++ b/ext/standard/tests/strings/str_pad_variation1.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test str_pad() function : usage variations - large values for '$pad_length' argument
+--SKIPIF--
+<?php
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
+?>
+--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 large value for for 'pad_length' argument ***\n";
+
+//defining '$input' argument
+$input = "Test string";
+
+$extra_large_pad_length = PHP_INT_MAX*5;
+try {
+ var_dump( str_pad($input, $extra_large_pad_length) );
+} catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+}
+
+$php_int_max_pad_length = PHP_INT_MAX;
+var_dump( str_pad($input, $php_int_max_pad_length) );
+
+
+?>
+--EXPECTF--
+*** Testing str_pad() function: with large value for for 'pad_length' argument ***
+str_pad() expects parameter 2 to be int, float given
+
+Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
+
diff --git a/ext/standard/tests/strings/str_pad_variation2.phpt b/ext/standard/tests/strings/str_pad_variation2.phpt
new file mode 100644
index 0000000000..1ebf1b2825
--- /dev/null
+++ b/ext/standard/tests/strings/str_pad_variation2.phpt
@@ -0,0 +1,70 @@
+--TEST--
+str_pad() function: usage variations - Non printable chars
+--INI--
+precision=14
+--FILE--
+<?php
+// Split from str_pad for NUL Bytes
+// 7-bit ASCII
+$string = chr(0).chr(255).chr(128).chr(234).chr(143);
+
+/* different pad_lengths */
+$pad_lengths = [
+ -PHP_INT_MAX, // huge negative value
+ -1, // negative value
+ 0, // pad_length < sizeof(input_string)
+ 9, // pad_length <= sizeof(input_string)
+ 10, // pad_length > sizeof(input_string)
+ 16, // pad_length > sizeof(input_string)
+];
+
+$pad_string = "=";
+
+/*loop through to use each variant of $pad_length on
+ each element of $input_strings array */
+foreach ($pad_lengths as $pad_length ) {
+ // default pad_string & pad_type
+ var_dump( bin2hex( str_pad($string, $pad_length) ) );
+ // default pad_type
+ var_dump( bin2hex( str_pad($string, $pad_length, $pad_string) ) );
+ var_dump( bin2hex( str_pad($string, $pad_length, $pad_string, STR_PAD_LEFT) ) );
+ var_dump( bin2hex( str_pad($string, $pad_length, $pad_string, STR_PAD_RIGHT) ) );
+ var_dump( bin2hex( str_pad($string, $pad_length, $pad_string, STR_PAD_BOTH) ) );
+}
+
+?>
+
+DONE
+--EXPECT--
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(10) "00ff80ea8f"
+string(18) "00ff80ea8f20202020"
+string(18) "00ff80ea8f3d3d3d3d"
+string(18) "3d3d3d3d00ff80ea8f"
+string(18) "00ff80ea8f3d3d3d3d"
+string(18) "3d3d00ff80ea8f3d3d"
+string(20) "00ff80ea8f2020202020"
+string(20) "00ff80ea8f3d3d3d3d3d"
+string(20) "3d3d3d3d3d00ff80ea8f"
+string(20) "00ff80ea8f3d3d3d3d3d"
+string(20) "3d3d00ff80ea8f3d3d3d"
+string(32) "00ff80ea8f2020202020202020202020"
+string(32) "00ff80ea8f3d3d3d3d3d3d3d3d3d3d3d"
+string(32) "3d3d3d3d3d3d3d3d3d3d3d00ff80ea8f"
+string(32) "00ff80ea8f3d3d3d3d3d3d3d3d3d3d3d"
+string(32) "3d3d3d3d3d00ff80ea8f3d3d3d3d3d3d"
+
+DONE
diff --git a/ext/standard/tests/strings/str_pad_variation5.phpt b/ext/standard/tests/strings/str_pad_variation5.phpt
index 8eade37df3..41a70e675a 100644
--- a/ext/standard/tests/strings/str_pad_variation5.phpt
+++ b/ext/standard/tests/strings/str_pad_variation5.phpt
@@ -31,4 +31,4 @@ var_dump( str_pad($input, $pad_length) );
--EXPECTF--
*** Testing str_pad() function: with large value for for 'pad_length' argument ***
-Fatal error: Allowed memory size of 134217728 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
+Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt
index 306b7d381a..6e5f0cf68e 100644
--- a/ext/standard/tests/strings/str_repeat.phpt
+++ b/ext/standard/tests/strings/str_repeat.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_repeat_variation1.phpt b/ext/standard/tests/strings/str_repeat_variation1.phpt
new file mode 100644
index 0000000000..4740f7c5b8
--- /dev/null
+++ b/ext/standard/tests/strings/str_repeat_variation1.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test str_repeat() function: usage variations - complex strings containing other than 7-bit chars
+--INI--
+precision=14
+--FILE--
+<?php
+$str = chr(0).chr(128).chr(129).chr(234).chr(235).chr(254).chr(255);
+
+$withCodePoint = str_repeat($str, chr(51)); // ASCII value of '3' given
+$explicit = str_repeat($str, 3);
+
+var_dump($withCodePoint === $explicit);
+var_dump( bin2hex( $withCodePoint ) );
+var_dump( bin2hex( $explicit ) );
+
+?>
+DONE
+--EXPECT--
+bool(true)
+string(42) "008081eaebfeff008081eaebfeff008081eaebfeff"
+string(42) "008081eaebfeff008081eaebfeff008081eaebfeff"
+DONE
diff --git a/ext/standard/tests/strings/str_replace.phpt b/ext/standard/tests/strings/str_replace.phpt
index 7b411abac5..b0ca488f3c 100644
--- a/ext/standard/tests/strings/str_replace.phpt
+++ b/ext/standard/tests/strings/str_replace.phpt
@@ -223,15 +223,6 @@ var_dump( str_replace("worldS", "FOUND", "$strS") );
var_dump( str_replace("worldS", "FOUND", "${str}S") );
var_dump( str_replace("worldS", "FOUND", "{$str}S") );
-
-echo "\n*** Testing error conditions ***";
-/* Invalid arguments */
-var_dump( str_replace() );
-var_dump( str_replace("") );
-var_dump( str_replace(NULL) );
-var_dump( str_replace(1, 2) );
-var_dump( str_replace(1,2,3,$var,5) );
-
fclose($resource1);
closedir($resource2);
echo "Done\n";
@@ -885,7 +876,7 @@ array(2) {
}
int(6)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
array(2) {
[0]=>
string(15) "ArrayArrayArray"
@@ -934,24 +925,8 @@ int(0)
string(5) "FOUND"
string(5) "FOUND"
-Notice: Undefined variable: strS in %s on line %d
+Warning: Undefined variable: strS in %s on line %d
string(0) ""
string(5) "FOUND"
string(5) "FOUND"
-
-*** Testing error conditions ***
-Warning: str_replace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at most 4 parameters, 5 given in %s on line %d
-NULL
Done
diff --git a/ext/standard/tests/strings/str_replace_basic.phpt b/ext/standard/tests/strings/str_replace_basic.phpt
index 790a32fffd..22b674ea6f 100644
--- a/ext/standard/tests/strings/str_replace_basic.phpt
+++ b/ext/standard/tests/strings/str_replace_basic.phpt
@@ -33,7 +33,6 @@ var_dump( $fp_copy );
fclose($fp);
?>
-===DONE===
--EXPECTF--
*** Testing str_replace() on basic operations ***
string(0) ""
@@ -46,4 +45,3 @@ string(0) ""
int(0)
string(%d) "Resource id #%d"
int(1)
-===DONE===
diff --git a/ext/standard/tests/strings/str_replace_variation1.phpt b/ext/standard/tests/strings/str_replace_variation1.phpt
index 067e26307d..2e6dd18b94 100644
--- a/ext/standard/tests/strings/str_replace_variation1.phpt
+++ b/ext/standard/tests/strings/str_replace_variation1.phpt
@@ -27,7 +27,6 @@ foreach( $search_arr as $value ) {
}
?>
-===DONE===
--EXPECT--
*** Testing str_replace() with various search values ***
-- Iteration 0 --
@@ -389,4 +388,3 @@ array(12) {
string(0) ""
}
int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/str_replace_variation2.phpt b/ext/standard/tests/strings/str_replace_variation2.phpt
index cbb2e0e5ed..79d50d40ff 100644
--- a/ext/standard/tests/strings/str_replace_variation2.phpt
+++ b/ext/standard/tests/strings/str_replace_variation2.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_replace_variation3.phpt b/ext/standard/tests/strings/str_replace_variation3.phpt
index 8ae709745f..7c520b404d 100644
--- a/ext/standard/tests/strings/str_replace_variation3.phpt
+++ b/ext/standard/tests/strings/str_replace_variation3.phpt
@@ -141,7 +141,6 @@ fclose($resource1);
closedir($resource2);
?>
-===DONE===
--EXPECTF--
*** Testing Miscelleneous input data ***
string(3) "qqq"
@@ -173,7 +172,7 @@ array(2) {
}
int(6)
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
array(1) {
[0]=>
string(15) "ArrayArrayArray"
@@ -220,8 +219,7 @@ int(0)
string(5) "FOUND"
string(5) "FOUND"
-Notice: Undefined variable: strS in %s on line %d
+Warning: Undefined variable: strS in %s on line %d
string(0) ""
string(5) "FOUND"
string(5) "FOUND"
-===DONE===
diff --git a/ext/standard/tests/strings/str_rot13_basic.phpt b/ext/standard/tests/strings/str_rot13_basic.phpt
index 7f5fc1405c..b90e86fd4f 100644
--- a/ext/standard/tests/strings/str_rot13_basic.phpt
+++ b/ext/standard/tests/strings/str_rot13_basic.phpt
@@ -36,7 +36,6 @@ if (strcmp($str, $decode) == 0) {
echo "Strings unequal : TEST FAILED\n";
}
?>
-===DONE===
--EXPECT--
*** Testing str_rot13() : basic functionality ***
@@ -52,4 +51,3 @@ Strings unequal : TEST FAILED
Ensure strings round trip
Strings equal : TEST PASSED
-===DONE===
diff --git a/ext/standard/tests/strings/str_shuffle_basic.phpt b/ext/standard/tests/strings/str_shuffle_basic.phpt
index 350600891b..037d65ac0e 100644
--- a/ext/standard/tests/strings/str_shuffle_basic.phpt
+++ b/ext/standard/tests/strings/str_shuffle_basic.phpt
@@ -51,9 +51,7 @@ if ($combinations != 24) {
}
?>
-===DONE===
--EXPECTF--
*** Testing str_shuffle() : basic functionality ***
string(47) "%s"
TEST PASSED
-===DONE===
diff --git a/ext/standard/tests/strings/str_split_variation6.phpt b/ext/standard/tests/strings/str_split_variation6.phpt
index a477800a26..111eb11858 100644
--- a/ext/standard/tests/strings/str_split_variation6.phpt
+++ b/ext/standard/tests/strings/str_split_variation6.phpt
@@ -18,7 +18,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
* passing different integer values for 'split_length' argument to str_split()
*/
-echo "*** Testing str_split() : different intger values for 'split_length' ***\n";
+echo "*** Testing str_split() : different integer values for 'split_length' ***\n";
//Initialise variables
$str = 'This is a string with 123 & escape char \t';
@@ -30,23 +30,25 @@ $values = array (
0234, //octal number
0x1A, //hexadecimal number
2147483647, //max positive integer number
- 2147483648, //max positive integer+1
-2147483648, //min negative integer
);
//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]) );
+ echo "-- Iteration ".($count + 1)." --\n";
+
+ try {
+ var_dump( str_split($str, $values[$count]) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
echo "Done"
?>
---EXPECTF--
-*** Testing str_split() : different intger values for 'split_length' ***
+--EXPECT--
+*** Testing str_split() : different integer values for 'split_length' ***
-- Iteration 1 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 2 --
array(42) {
[0]=>
@@ -135,9 +137,7 @@ array(42) {
string(1) "t"
}
-- Iteration 3 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 4 --
array(1) {
[0]=>
@@ -156,11 +156,5 @@ array(1) {
string(42) "This is a string with 123 & escape char \t"
}
-- Iteration 7 --
-
-Warning: str_split() expects parameter 2 to be int, float given in %s line %d
-NULL
--- Iteration 8 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
Done
diff --git a/ext/standard/tests/strings/str_split_variation6_64bit.phpt b/ext/standard/tests/strings/str_split_variation6_64bit.phpt
index 583c7db3cf..e6893e9263 100644
--- a/ext/standard/tests/strings/str_split_variation6_64bit.phpt
+++ b/ext/standard/tests/strings/str_split_variation6_64bit.phpt
@@ -36,17 +36,19 @@ $values = array (
//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]) );
+ echo "-- Iteration ".($count + 1)." --\n";
+ try {
+ var_dump( str_split($str, $values[$count]) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
echo "Done"
?>
---EXPECTF--
+--EXPECT--
*** Testing str_split() : different intger values for 'split_length' ***
-- Iteration 1 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 2 --
array(42) {
[0]=>
@@ -135,9 +137,7 @@ array(42) {
string(1) "t"
}
-- Iteration 3 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 4 --
array(1) {
[0]=>
@@ -161,7 +161,5 @@ array(1) {
string(42) "This is a string with 123 & escape char \t"
}
-- Iteration 8 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
Done
diff --git a/ext/standard/tests/strings/str_split_variation7.phpt b/ext/standard/tests/strings/str_split_variation7.phpt
index 5082c7ba2f..a810dd7ecb 100644
--- a/ext/standard/tests/strings/str_split_variation7.phpt
+++ b/ext/standard/tests/strings/str_split_variation7.phpt
@@ -18,7 +18,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
* passing different integer values for 'split_length' and heredoc string as 'str' argument to str_split()
*/
-echo "*** Testing str_split() : different intger values for 'split_length' with heredoc 'str' ***\n";
+echo "*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' ***\n";
//Initialise variables
$str = <<<EOT
string with 123,escape char \t.
@@ -32,23 +32,25 @@ $values = array (
0234, //octal number
0x1A, //hexadecimal number
2147483647, //max positive integer number
- 2147483648, //max positive integer+1
-2147483648, //min negative integer
);
//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]) );
+ echo "-- Iteration ".($count + 1)." --\n";
+
+ try {
+ var_dump( str_split($str, $values[$count]) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
echo "Done"
?>
---EXPECTF--
-*** Testing str_split() : different intger values for 'split_length' with heredoc 'str' ***
+--EXPECT--
+*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' ***
-- Iteration 1 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 2 --
array(30) {
[0]=>
@@ -113,9 +115,7 @@ array(30) {
string(1) "."
}
-- Iteration 3 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 4 --
array(1) {
[0]=>
@@ -134,11 +134,5 @@ array(1) {
string(30) "string with 123,escape char ."
}
-- Iteration 7 --
-
-Warning: str_split() expects parameter 2 to be int, float given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
Done
diff --git a/ext/standard/tests/strings/str_split_variation7_64bit.phpt b/ext/standard/tests/strings/str_split_variation7_64bit.phpt
index bff61adb30..1a1980028a 100644
--- a/ext/standard/tests/strings/str_split_variation7_64bit.phpt
+++ b/ext/standard/tests/strings/str_split_variation7_64bit.phpt
@@ -18,7 +18,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
* passing different integer values for 'split_length' and heredoc string as 'str' argument to str_split()
*/
-echo "*** Testing str_split() : different intger values for 'split_length' with heredoc 'str' ***\n";
+echo "*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' ***\n";
//Initialise variables
$str = <<<EOT
string with 123,escape char \t.
@@ -38,17 +38,19 @@ $values = array (
//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]) );
+ echo "-- Iteration ".($count + 1)." --\n";
+ try {
+ var_dump( str_split($str, $values[$count]) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
echo "Done"
?>
---EXPECTF--
-*** Testing str_split() : different intger values for 'split_length' with heredoc 'str' ***
+--EXPECT--
+*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' ***
-- Iteration 1 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 2 --
array(30) {
[0]=>
@@ -113,9 +115,7 @@ array(30) {
string(1) "."
}
-- Iteration 3 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 4 --
array(1) {
[0]=>
@@ -139,7 +139,5 @@ array(1) {
string(30) "string with 123,escape char ."
}
-- Iteration 8 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
Done
diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt
index f88646370b..375f26dee0 100644
--- a/ext/standard/tests/strings/str_word_count.phpt
+++ b/ext/standard/tests/strings/str_word_count.phpt
@@ -2,39 +2,51 @@
str_word_count()
--FILE--
<?php
-error_reporting(E_ALL);
$str = "Hello friend, you're
looking good today!";
$b =& $str;
var_dump(str_word_count($str, 1));
var_dump(str_word_count($str, 2));
var_dump(str_word_count($str));
-var_dump(str_word_count($str, 3));
-var_dump(str_word_count($str, 123));
-var_dump(str_word_count($str, -1));
-var_dump(str_word_count($str, 999999999));
-var_dump(str_word_count($str, array()));
-var_dump(str_word_count($str, $b));
+
+try {
+ var_dump(str_word_count($str, 3));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(str_word_count($str, 123));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(str_word_count($str, -1));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(str_word_count($str, 999999999));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
var_dump($str);
$str2 = "F0o B4r 1s bar foo";
var_dump(str_word_count($str2, NULL, "04"));
var_dump(str_word_count($str2, NULL, "01"));
var_dump(str_word_count($str2, NULL, "014"));
-var_dump(str_word_count($str2, NULL, array()));
-var_dump(str_word_count($str2, NULL, new stdClass));
var_dump(str_word_count($str2, NULL, ""));
var_dump(str_word_count($str2, 1, "04"));
var_dump(str_word_count($str2, 1, "01"));
var_dump(str_word_count($str2, 1, "014"));
-var_dump(str_word_count($str2, 1, array()));
-var_dump(str_word_count($str2, 1, new stdClass));
var_dump(str_word_count($str2, 1, ""));
var_dump(str_word_count($str2, 2, "04"));
var_dump(str_word_count($str2, 2, "01"));
var_dump(str_word_count($str2, 2, "014"));
-var_dump(str_word_count($str2, 2, array()));
-var_dump(str_word_count($str2, 2, new stdClass));
var_dump(str_word_count($str2, 2, ""));
var_dump(str_word_count("foo'0 bar-0var", 2, "0"));
var_dump(str_word_count("'foo'", 2));
@@ -42,9 +54,10 @@ var_dump(str_word_count("'foo'", 2, "'"));
var_dump(str_word_count("-foo-", 2));
var_dump(str_word_count("-foo-", 2, "-"));
-echo "Done\n";
?>
---EXPECTF--
+
+DONE
+--EXPECT--
array(6) {
[0]=>
string(5) "Hello"
@@ -74,35 +87,15 @@ array(6) {
string(5) "today"
}
int(6)
-
-Warning: str_word_count(): Invalid format value 3 in %s on line %d
-bool(false)
-
-Warning: str_word_count(): Invalid format value 123 in %s on line %d
-bool(false)
-
-Warning: str_word_count(): Invalid format value -1 in %s on line %d
-bool(false)
-
-Warning: str_word_count(): Invalid format value 999999999 in %s on line %d
-bool(false)
-
-Warning: str_word_count() expects parameter 2 to be int, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 2 to be int, string given in %s on line %d
-NULL
+Invalid format value 3
+Invalid format value 123
+Invalid format value -1
+Invalid format value 999999999
string(55) "Hello friend, you're
looking good today!"
int(5)
int(6)
int(5)
-
-Warning: str_word_count() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 3 to be string, object given in %s on line %d
-NULL
int(7)
array(5) {
[0]=>
@@ -142,12 +135,6 @@ array(5) {
[4]=>
string(3) "foo"
}
-
-Warning: str_word_count() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 3 to be string, object given in %s on line %d
-NULL
array(7) {
[0]=>
string(1) "F"
@@ -202,12 +189,6 @@ array(5) {
[15]=>
string(3) "foo"
}
-
-Warning: str_word_count() expects parameter 3 to be string, array given in %s on line %d
-NULL
-
-Warning: str_word_count() expects parameter 3 to be string, object given in %s on line %d
-NULL
array(7) {
[0]=>
string(1) "F"
@@ -246,4 +227,5 @@ array(1) {
[0]=>
string(5) "-foo-"
}
-Done
+
+DONE
diff --git a/ext/standard/tests/strings/str_word_count1.phpt b/ext/standard/tests/strings/str_word_count1.phpt
index e942a17385..6ce8c38f22 100644
--- a/ext/standard/tests/strings/str_word_count1.phpt
+++ b/ext/standard/tests/strings/str_word_count1.phpt
@@ -4,23 +4,31 @@ str_word_count() and invalid arguments
<?php
var_dump(str_word_count(""));
-var_dump(str_word_count("", -1));
-var_dump(str_word_count("", -1, $a));
-var_dump($a);
-echo "Done\n";
+try {
+ var_dump(str_word_count("", -1));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ var_dump(str_word_count("", -1, $a));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+var_dump($a);
?>
+
+DONE
--EXPECTF--
int(0)
+Invalid format value -1
-Warning: str_word_count(): Invalid format value -1 in %s on line %d
-bool(false)
-
-Notice: Undefined variable: a in %s on line %d
+Warning: Undefined variable: a in %s on line %d
+Invalid format value -1
-Warning: str_word_count(): Invalid format value -1 in %s on line %d
-bool(false)
-
-Notice: Undefined variable: a in %s on line %d
+Warning: Undefined variable: a in %s on line %d
NULL
-Done
+
+DONE
diff --git a/ext/standard/tests/strings/strcasecmp.phpt b/ext/standard/tests/strings/strcasecmp.phpt
index 3086c2be92..4cca47ac96 100644
--- a/ext/standard/tests/strings/strcasecmp.phpt
+++ b/ext/standard/tests/strings/strcasecmp.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strcmp.phpt b/ext/standard/tests/strings/strcmp.phpt
index 397e072c52..1e0f5d18a2 100644
--- a/ext/standard/tests/strings/strcmp.phpt
+++ b/ext/standard/tests/strings/strcmp.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strcmp_unterminated.phpt b/ext/standard/tests/strings/strcmp_unterminated.phpt
index 215193567b..afc082a221 100644
--- a/ext/standard/tests/strings/strcmp_unterminated.phpt
+++ b/ext/standard/tests/strings/strcmp_unterminated.phpt
@@ -15,8 +15,6 @@ var_dump(
zend_terminate_string($a);
zend_terminate_string($b);
?>
-===DONE===
--EXPECT--
int(-1)
int(1)
-===DONE===
diff --git a/ext/standard/tests/strings/stripcslashes_basic.phpt b/ext/standard/tests/strings/stripcslashes_basic.phpt
index 493e669131..70538b75b0 100644
--- a/ext/standard/tests/strings/stripcslashes_basic.phpt
+++ b/ext/standard/tests/strings/stripcslashes_basic.phpt
@@ -22,7 +22,6 @@ var_dump(bin2hex(stripcslashes('\\f')));
var_dump(bin2hex(stripcslashes('\\t')));
var_dump(bin2hex(stripcslashes('\\v')));
?>
-===DONE===
--EXPECT--
*** Testing stripcslashes() : basic functionality ***
string(11) "Hello World"
@@ -36,4 +35,3 @@ string(2) "08"
string(2) "0c"
string(2) "09"
string(2) "0b"
-===DONE===
diff --git a/ext/standard/tests/strings/stripos.phpt b/ext/standard/tests/strings/stripos.phpt
index 057b8ca494..bc2a7bc8e5 100644
--- a/ext/standard/tests/strings/stripos.phpt
+++ b/ext/standard/tests/strings/stripos.phpt
@@ -25,10 +25,10 @@ stripos() function test
var_dump(stripos("0", false));
var_dump(stripos("1", true));
var_dump(stripos("\\\\a", "\\a"));
-
- echo "Done\n";
?>
---EXPECTF--
+
+DONE
+--EXPECT--
int(0)
int(5)
int(5)
@@ -37,31 +37,20 @@ int(10)
int(2)
int(0)
int(0)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
+int(0)
int(0)
bool(false)
bool(false)
+int(0)
bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
+int(0)
+int(0)
+int(0)
int(1)
-Done
+
+DONE
diff --git a/ext/standard/tests/strings/stripos_error.phpt b/ext/standard/tests/strings/stripos_error.phpt
index 324014cf6d..0420bb090b 100644
--- a/ext/standard/tests/strings/stripos_error.phpt
+++ b/ext/standard/tests/strings/stripos_error.phpt
@@ -8,14 +8,6 @@ Test stripos() function : error conditions
*/
echo "*** Testing stripos() function: error conditions ***\n";
-echo "\n-- With Zero arguments --";
-var_dump( stripos() );
-
-echo "\n-- With less than expected number of arguments --";
-var_dump( stripos("String") );
-
-echo "\n-- With more than expected number of arguments --";
-var_dump( stripos("string", "String", 1, 'extra_arg') );
echo "\n-- Offset beyond the end of the string --";
var_dump( stripos("Hello World", "o", 12) );
@@ -28,18 +20,6 @@ echo "*** Done ***";
--EXPECTF--
*** Testing stripos() function: error conditions ***
--- With Zero arguments --
-Warning: stripos() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- With less than expected number of arguments --
-Warning: stripos() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- With more than expected number of arguments --
-Warning: stripos() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-- Offset beyond the end of the string --
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
diff --git a/ext/standard/tests/strings/stripos_variation1.phpt b/ext/standard/tests/strings/stripos_variation1.phpt
index a3fc324dd7..c34917ffce 100644
--- a/ext/standard/tests/strings/stripos_variation1.phpt
+++ b/ext/standard/tests/strings/stripos_variation1.phpt
@@ -81,7 +81,7 @@ for($index=0; $index<count($needle); $index++) {
}
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing stripos() function: with double quoted strings ***
-- Iteration 1 --
int(2)
@@ -117,36 +117,20 @@ int(9)
int(8)
bool(false)
-- Iteration 12 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-int(8)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(11)
-- Iteration 13 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-int(8)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(12)
-- Iteration 14 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-int(8)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(13)
-- Iteration 15 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-int(8)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(14)
-- Iteration 16 --
-bool(false)
-bool(false)
+int(0)
+int(15)
-- Iteration 17 --
int(10)
int(47)
diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt
index 81b8f5adb1..879da88aa7 100644
--- a/ext/standard/tests/strings/stripos_variation10.phpt
+++ b/ext/standard/tests/strings/stripos_variation10.phpt
@@ -83,7 +83,11 @@ $needles = array (
$counter = 1;
for($index = 0; $index < count($needles); $index ++) {
echo "\n-- Iteration $counter --\n";
- var_dump( stripos($haystack, $needles[$index]) );
+ try {
+ var_dump( stripos($haystack, $needles[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -91,134 +95,84 @@ fclose($file_handle); //closing the file handle
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing stripos() function with unexpected values for needle ***
-- Iteration 1 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(7)
-- Iteration 2 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(9)
-- Iteration 3 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 4 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 5 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(16)
-- Iteration 6 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(21)
-- Iteration 7 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 8 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 9 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(17)
-- Iteration 10 --
-
-Warning: stripos(): needle is not a string or an integer in %s on line %d
-bool(false)
+stripos() expects parameter 2 to be string, array given
-- Iteration 11 --
-
-Warning: stripos(): needle is not a string or an integer in %s on line %d
-bool(false)
+stripos() expects parameter 2 to be string, array given
-- Iteration 12 --
-
-Warning: stripos(): needle is not a string or an integer in %s on line %d
-bool(false)
+stripos() expects parameter 2 to be string, array given
-- Iteration 13 --
-
-Warning: stripos(): needle is not a string or an integer in %s on line %d
-bool(false)
+stripos() expects parameter 2 to be string, array given
-- Iteration 14 --
-
-Warning: stripos(): needle is not a string or an integer in %s on line %d
-bool(false)
+stripos() expects parameter 2 to be string, array given
-- Iteration 15 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(9)
-- Iteration 16 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
-- Iteration 17 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(9)
-- Iteration 18 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
-- Iteration 19 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(64)
-- Iteration 20 --
-bool(false)
+int(0)
-- Iteration 21 --
-bool(false)
+int(0)
-- Iteration 22 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
-- Iteration 23 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
-- Iteration 24 --
-
-Warning: stripos(): needle is not a string or an integer in %s on line %d
-%s
+stripos() expects parameter 2 to be string, resource given
-- Iteration 25 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
-- Iteration 26 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
*** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation11.phpt b/ext/standard/tests/strings/stripos_variation11.phpt
index b4b83a1641..4f002ed0ca 100644
--- a/ext/standard/tests/strings/stripos_variation11.phpt
+++ b/ext/standard/tests/strings/stripos_variation11.phpt
@@ -81,8 +81,16 @@ $counter = 1;
for($index = 0; $index < count($values); $index ++) {
echo "-- Iteration $counter --\n";
$haystack = $values[$index];
- var_dump( stripos($values[$index], $values[$index]) );
- var_dump( stripos($values[$index], $values[$index], 1) );
+ try {
+ var_dump( stripos($values[$index], $values[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( stripos($values[$index], $values[$index], 1) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -91,172 +99,96 @@ echo "*** Done ***";
--EXPECTF--
*** Testing stripos() function with unexpected values for haystack and needle ***
-- Iteration 1 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 2 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 3 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 4 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 5 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 6 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 7 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 8 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 9 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 10 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
-- Iteration 11 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
-- Iteration 12 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
-- Iteration 13 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
-- Iteration 14 --
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, array given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, array given
+stripos() expects parameter 1 to be string, array given
-- Iteration 15 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 16 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 17 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 18 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 19 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+int(0)
bool(false)
-- Iteration 20 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 21 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 22 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 23 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 24 --
-
-Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d
-NULL
+stripos() expects parameter 1 to be string, resource given
+stripos() expects parameter 1 to be string, resource given
-- Iteration 25 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 26 --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
diff --git a/ext/standard/tests/strings/stripos_variation2.phpt b/ext/standard/tests/strings/stripos_variation2.phpt
index bb77d1becb..294b088d02 100644
--- a/ext/standard/tests/strings/stripos_variation2.phpt
+++ b/ext/standard/tests/strings/stripos_variation2.phpt
@@ -83,7 +83,7 @@ for($index=0; $index<count($needle); $index++) {
}
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing stripos() function: with single quoted strings ***
-- Iteration 1 --
int(2)
@@ -119,36 +119,20 @@ bool(false)
int(10)
int(10)
-- Iteration 12 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(11)
-- Iteration 13 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(12)
-- Iteration 14 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(13)
-- Iteration 15 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+int(0)
+int(14)
-- Iteration 16 --
-bool(false)
-bool(false)
+int(0)
+int(15)
-- Iteration 17 --
int(14)
int(51)
@@ -234,11 +218,7 @@ bool(false)
bool(false)
bool(false)
-- Iteration 45 --
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-int(26)
-
-Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+bool(false)
bool(false)
-- Iteration 46 --
int(0)
diff --git a/ext/standard/tests/strings/stripos_variation3.phpt b/ext/standard/tests/strings/stripos_variation3.phpt
index 936f870579..32faf63871 100644
--- a/ext/standard/tests/strings/stripos_variation3.phpt
+++ b/ext/standard/tests/strings/stripos_variation3.phpt
@@ -32,6 +32,6 @@ echo "*** Done ***";
int(14)
int(23)
int(23)
-bool(false)
+int(0)
int(7)
*** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation7.phpt b/ext/standard/tests/strings/stripos_variation7.phpt
index 04c636365f..a21686876d 100644
--- a/ext/standard/tests/strings/stripos_variation7.phpt
+++ b/ext/standard/tests/strings/stripos_variation7.phpt
@@ -25,10 +25,10 @@ echo "*** Done ***";
--EXPECTF--
*** Testing stripos() function: with heredoc strings ***
-- With empty heredoc string --
-bool(false)
+int(0)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-bool(false)
-bool(false)
+int(0)
+int(0)
*** Done ***
diff --git a/ext/standard/tests/strings/stristr.phpt b/ext/standard/tests/strings/stristr.phpt
index 8fca54b082..0d47e80bcb 100644
--- a/ext/standard/tests/strings/stristr.phpt
+++ b/ext/standard/tests/strings/stristr.phpt
@@ -2,42 +2,27 @@
stristr() function
--FILE--
<?php
- var_dump(stristr());
- var_dump(stristr(array(), ""));
- var_dump(stristr("", array()));
- var_dump(stristr(array(), array()));
var_dump(stristr("tEsT sTrInG", "tEsT"));
var_dump(stristr("tEsT sTrInG", "stRiNg"));
var_dump(stristr("tEsT sTrInG", "stRiN"));
var_dump(stristr("tEsT sTrInG", "t S"));
var_dump(stristr("tEsT sTrInG", "g"));
var_dump(md5(stristr("te".chr(0)."st", chr(0))));
- var_dump(@stristr("", ""));
- var_dump(@stristr("a", ""));
- var_dump(@stristr("", "a"));
- var_dump(md5(@stristr("\\\\a\\", "\\a")));
+ var_dump(stristr("", ""));
+ var_dump(stristr("a", ""));
+ var_dump(stristr("", "a"));
+ var_dump(md5(stristr("\\\\a\\", "\\a")));
var_dump(stristr("tEsT sTrInG", " "));
?>
--EXPECTF--
-Warning: stristr() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: stristr(): needle is not a string or an integer in %s on line %d
-bool(false)
-
-Warning: stristr() expects parameter 1 to be string, array given in %s on line %d
-NULL
string(11) "tEsT sTrInG"
string(6) "sTrInG"
string(6) "sTrInG"
string(8) "T sTrInG"
string(1) "G"
string(32) "7272696018bdeb2c9a3f8d01fc2a9273"
-bool(false)
-bool(false)
+string(0) ""
+string(1) "a"
bool(false)
string(32) "6ec19f52f0766c463f3bb240f4396913"
string(7) " sTrInG"
diff --git a/ext/standard/tests/strings/stristr2.phpt b/ext/standard/tests/strings/stristr2.phpt
index b899b4739d..ae2c8e93cf 100644
--- a/ext/standard/tests/strings/stristr2.phpt
+++ b/ext/standard/tests/strings/stristr2.phpt
@@ -16,14 +16,10 @@ var_dump(stristr($email, 97));
var_dump(stristr($email, 97, 1));
?>
---EXPECTF--
+--EXPECT--
string(7) "cCdEfGh"
string(2) "Ab"
string(5) "eEfGh"
string(4) "AbCd"
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-string(11) "azAbCdeEfGh"
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-string(1) "w"
+bool(false)
+bool(false)
diff --git a/ext/standard/tests/strings/stristr_basic.phpt b/ext/standard/tests/strings/stristr_basic.phpt
index 73cbbbe17d..f95f9d2b1e 100644
--- a/ext/standard/tests/strings/stristr_basic.phpt
+++ b/ext/standard/tests/strings/stristr_basic.phpt
@@ -20,7 +20,6 @@ var_dump( stristr("teSt", "test") );
var_dump( stristr("Test String", "String", false) );
var_dump( stristr("Test String", "String", true) );
?>
-===DONE===
--EXPECT--
*** Testing stristr() : basic functionality ***
string(11) "Test string"
@@ -33,4 +32,3 @@ string(4) "tEst"
string(4) "teSt"
string(6) "String"
string(5) "Test "
-===DONE===
diff --git a/ext/standard/tests/strings/stristr_error.phpt b/ext/standard/tests/strings/stristr_error.phpt
deleted file mode 100644
index a0057574f9..0000000000
--- a/ext/standard/tests/strings/stristr_error.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-Test stristr() function : error conditions
---FILE--
-<?php
-
-/* Prototype: string stristr ( string $haystack , mixed $needle [, bool $before_needle ] )
- Description: Case-insensitive strstr()
-*/
-echo "*** Testing stristr() : error conditions ***\n";
-
-echo "\n-- Testing stristr() function with no arguments --\n";
-var_dump( stristr() );
-var_dump( stristr("") );
-
-echo "\n-- Testing stristr() function with no needle --\n";
-var_dump( stristr("Hello World") ); // without "needle"
-
-echo "\n-- Testing stristr() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( stristr("Hello World", "World", true, $extra_arg) );
-
-echo "\n-- Testing stristr() function with empty haystack --\n";
-var_dump( stristr(NULL, "") );
-
-echo "\n-- Testing stristr() function with empty needle --\n";
-var_dump( stristr("Hello World", "") );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing stristr() : error conditions ***
-
--- Testing stristr() function with no arguments --
-
-Warning: stristr() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: stristr() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing stristr() function with no needle --
-
-Warning: stristr() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing stristr() function with more than expected no. of arguments --
-
-Warning: stristr() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing stristr() function with empty haystack --
-
-Warning: stristr(): Empty needle in %s on line %d
-bool(false)
-
--- Testing stristr() function with empty needle --
-
-Warning: stristr(): Empty needle in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt
index 4a0b62f261..553c462097 100644
--- a/ext/standard/tests/strings/stristr_variation2.phpt
+++ b/ext/standard/tests/strings/stristr_variation2.phpt
@@ -72,96 +72,56 @@ $pad_length = "20";
$count = 1;
foreach($inputs as $input) {
echo "-- Iteration $count --\n";
- var_dump( stristr("Hello World", $input) );
+ try {
+ var_dump( stristr("Hello World", $input) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count ++;
}
fclose($file_handle); //closing the file handle
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing stristr() function: with unexpected inputs for 'needle' argument ***
-- Iteration 1 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 2 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 3 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 4 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 5 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 6 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 7 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 8 --
-
-Warning: stristr(): needle is not a string or an integer in %s on line %d
-bool(false)
+stristr() expects parameter 2 to be string, array given
-- Iteration 9 --
-
-Warning: stristr(): needle is not a string or an integer in %s on line %d
-bool(false)
+stristr() expects parameter 2 to be string, array given
-- Iteration 10 --
-
-Warning: stristr(): needle is not a string or an integer in %s on line %d
-bool(false)
+stristr() expects parameter 2 to be string, array given
-- Iteration 11 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 12 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+string(11) "Hello World"
-- Iteration 13 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 14 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+string(11) "Hello World"
-- Iteration 15 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+string(11) "Hello World"
-- Iteration 16 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+string(11) "Hello World"
-- Iteration 17 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
-- Iteration 18 --
-
-Warning: stristr(): needle is not a string or an integer in %s on line %d
-bool(false)
+stristr() expects parameter 2 to be string, resource given
-- Iteration 19 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
+string(11) "Hello World"
-- Iteration 20 --
-
-Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-===DONE===
+string(11) "Hello World"
diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt
index a546bdb8d2..0db36eea22 100644
--- a/ext/standard/tests/strings/strlen.phpt
+++ b/ext/standard/tests/strings/strlen.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strlen_basic.phpt b/ext/standard/tests/strings/strlen_basic.phpt
index 721e4f1d26..fce6d70da0 100644
--- a/ext/standard/tests/strings/strlen_basic.phpt
+++ b/ext/standard/tests/strings/strlen_basic.phpt
@@ -14,11 +14,9 @@ var_dump(strlen(" ab de "));
var_dump(strlen(""));
var_dump(strlen("\x90\x91\x00\x93\x94\x90\x91\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"));
?>
-===DONE===
--EXPECT--
*** Testing strlen() : basic functionality ***
int(6)
int(7)
int(0)
int(18)
-===DONE===
diff --git a/ext/standard/tests/strings/strnatcasecmp_basic.phpt b/ext/standard/tests/strings/strnatcasecmp_basic.phpt
index 5b58e2331e..043ad43d37 100644
--- a/ext/standard/tests/strings/strnatcasecmp_basic.phpt
+++ b/ext/standard/tests/strings/strnatcasecmp_basic.phpt
@@ -32,7 +32,6 @@ str_dump('pIc 6', 'pic 7');
str_dump(0xFFF, 0Xfff);
?>
-===DONE===
--EXPECT--
*** Testing strnatcasecmp() : basic functionality ***
int(0)
@@ -48,4 +47,3 @@ int(-1)
int(0)
int(-1)
int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
index ac2cbb69f9..7f6d4579c3 100644
--- a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
+++ b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
@@ -44,7 +44,6 @@ str_dump("\x0", "\0");
str_dump($a, $b);
?>
-===DONE===
--EXPECT--
*** Testing strnatcasecmp() : variation ***
int(1)
@@ -53,4 +52,3 @@ int(-1)
int(-1)
int(0)
int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/strnatcmp_basic.phpt b/ext/standard/tests/strings/strnatcmp_basic.phpt
index 734e5f57da..8f303e7395 100644
--- a/ext/standard/tests/strings/strnatcmp_basic.phpt
+++ b/ext/standard/tests/strings/strnatcmp_basic.phpt
@@ -49,7 +49,6 @@ var_dump(strnatcmp($d1, $a2));
var_dump(strnatcmp($c1, $b2));
var_dump(strnatcmp($c1, $d2));
?>
-===DONE===
--EXPECT--
*** Testing strnatcmp() : basic functionality ***
Less than tests
@@ -77,4 +76,3 @@ int(1)
int(1)
int(1)
int(1)
-===DONE===
diff --git a/ext/standard/tests/strings/strncasecmp_error.phpt b/ext/standard/tests/strings/strncasecmp_error.phpt
index d443f8113b..00ddfaed9b 100644
--- a/ext/standard/tests/strings/strncasecmp_error.phpt
+++ b/ext/standard/tests/strings/strncasecmp_error.phpt
@@ -10,18 +10,6 @@ Test strncasecmp() function : error conditions
echo "*** Testing strncasecmp() function: error conditions ***\n";
$str1 = 'string_val';
$str2 = 'string_val';
-$len = 10;
-$extra_arg = 10;
-
-echo "\n-- Testing strncasecmp() function with Zero arguments --";
-var_dump( strncasecmp() );
-
-echo "\n-- Testing strncasecmp() function with less than expected number of arguments --";
-var_dump( strncasecmp($str1) );
-var_dump( strncasecmp($str1, $str2) );
-
-echo "\n-- Testing strncasecmp() function with more than expected number of arguments --";
-var_dump( strncasecmp($str1, $str2, $len, $extra_arg) );
echo "\n-- Testing strncasecmp() function with invalid argument --";
$len = -10;
@@ -31,21 +19,6 @@ echo "*** Done ***\n";
--EXPECTF--
*** Testing strncasecmp() function: error conditions ***
--- Testing strncasecmp() function with Zero arguments --
-Warning: strncasecmp() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
--- Testing strncasecmp() function with less than expected number of arguments --
-Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: strncasecmp() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing strncasecmp() function with more than expected number of arguments --
-Warning: strncasecmp() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
-
-- Testing strncasecmp() function with invalid argument --
Warning: Length must be greater than or equal to 0 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/strings/strncmp_error.phpt b/ext/standard/tests/strings/strncmp_error.phpt
index 4eb73eb318..13a4cb0350 100644
--- a/ext/standard/tests/strings/strncmp_error.phpt
+++ b/ext/standard/tests/strings/strncmp_error.phpt
@@ -12,13 +12,6 @@ Test strncmp() function : error conditions
echo "*** Testing strncmp() function: error conditions ***\n";
$str1 = 'string_val';
$str2 = 'string_val';
-$len = 10;
-$extra_arg = 10;
-
-var_dump( strncmp() ); //Zero argument
-var_dump( strncmp($str1) ); //One argument, less than expected no. of args
-var_dump( strncmp($str1, $str2) ); //Two arguments, less than expected no. of args
-var_dump( strncmp($str1, $str2, $len, $extra_arg) ); //Four arguments, greater than expected no. of args
/* Invalid argument for $len */
$len = -10;
@@ -28,18 +21,6 @@ echo "*** Done ***\n";
--EXPECTF--
*** Testing strncmp() function: error conditions ***
-Warning: strncmp() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: strncmp() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: strncmp() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
-
Warning: Length must be greater than or equal to 0 in %s on line %d
bool(false)
*** Done ***
diff --git a/ext/standard/tests/strings/strpbrk_basic.phpt b/ext/standard/tests/strings/strpbrk_basic.phpt
index 9a92b8b4b5..f5a0306eaf 100644
--- a/ext/standard/tests/strings/strpbrk_basic.phpt
+++ b/ext/standard/tests/strings/strpbrk_basic.phpt
@@ -27,7 +27,6 @@ var_dump( strpbrk(5, 5) );
var_dump( strpbrk(5, "5") );
?>
-===DONE===
--EXPECT--
*** Testing strpbrk() : basic functionality ***
string(20) "is is a Simple text."
@@ -38,4 +37,3 @@ bool(false)
string(12) " aaa aaaSLR"
string(1) "5"
string(1) "5"
-===DONE===
diff --git a/ext/standard/tests/strings/strpbrk_error.phpt b/ext/standard/tests/strings/strpbrk_error.phpt
index 658e2f429e..93f1ac4295 100644
--- a/ext/standard/tests/strings/strpbrk_error.phpt
+++ b/ext/standard/tests/strings/strpbrk_error.phpt
@@ -8,50 +8,16 @@ Test strpbrk() function : error conditions
* Alias to functions:
*/
-echo "*** Testing strpbrk() : error conditions ***\n";
-
$haystack = 'This is a Simple text.';
-$char_list = 'string_val';
-$extra_arg = 10;
-
-echo "\n-- Testing strpbrk() function with more than expected no. of arguments --\n";
-var_dump( strpbrk($haystack, $char_list, $extra_arg) );
-
-echo "\n-- Testing strpbrk() function with less than expected no. of arguments --\n";
-var_dump( strpbrk($haystack) );
-
-echo "\n-- Testing strpbrk() function with empty second argument --\n";
-var_dump( strpbrk($haystack, '') );
-echo "\n-- Testing strpbrk() function with arrays --\n";
-var_dump( strpbrk($haystack, array('a', 'b', 'c') ) );
-var_dump( strpbrk(array('foo', 'bar'), 'b') );
+echo "-- Testing strpbrk() function with empty second argument --\n";
+try {
+ strpbrk($haystack, '');
+} catch (\ValueError $e) {
+ echo $e->getMessage() . "\n";
+}
?>
-===DONE===
---EXPECTF--
-*** Testing strpbrk() : error conditions ***
-
--- Testing strpbrk() function with more than expected no. of arguments --
-
-Warning: strpbrk() expects exactly 2 parameters, 3 given in %s on line %d
-bool(false)
-
--- Testing strpbrk() function with less than expected no. of arguments --
-
-Warning: strpbrk() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-
+--EXPECT--
-- Testing strpbrk() function with empty second argument --
-
-Warning: strpbrk(): The character list cannot be empty in %s on line %d
-bool(false)
-
--- Testing strpbrk() function with arrays --
-
-Warning: strpbrk() expects parameter 2 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strpbrk() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-===DONE===
+The character list cannot be empty
diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt
index 578539804d..8e1a1a7472 100644
--- a/ext/standard/tests/strings/strpos.phpt
+++ b/ext/standard/tests/strings/strpos.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strpos_number.phpt b/ext/standard/tests/strings/strpos_number.phpt
index fd045c64d3..76cf8e59ef 100644
--- a/ext/standard/tests/strings/strpos_number.phpt
+++ b/ext/standard/tests/strings/strpos_number.phpt
@@ -9,10 +9,7 @@ var_dump(strpos("foo bar", 111));
// string("11") is contained
var_dump(strpos("foo 11", "11"));
?>
---EXPECTF--
-Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
+--EXPECT--
+int(4)
bool(false)
-
-Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-int(1)
int(4)
diff --git a/ext/standard/tests/strings/strpos_variation1.phpt b/ext/standard/tests/strings/strpos_variation1.phpt
new file mode 100644
index 0000000000..f28517316d
--- /dev/null
+++ b/ext/standard/tests/strings/strpos_variation1.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Test strpos() function : usage variations - complex strings containing other than 7-bit chars
+--FILE--
+<?php
+$string = chr(0).chr(128).chr(129).chr(234).chr(235).chr(254).chr(255);
+$stringAsHex = bin2hex($string);
+echo "-- Positions of some chars in the string '$stringAsHex' are as follows --\n";
+echo bin2hex( chr(128) ) ." => ";
+var_dump( strpos($string, chr(128)) );
+echo bin2hex( chr(255) ) ." => ";
+var_dump( strpos($string, chr(255), 3) );
+echo bin2hex( chr(256) ) ." => ";
+var_dump( strpos($string, chr(256)) );
+?>
+
+DONE
+--EXPECT--
+-- Positions of some chars in the string '008081eaebfeff' are as follows --
+80 => int(1)
+ff => int(6)
+00 => int(0)
+
+DONE
diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt
index 5043128945..a75dd96bbf 100644
--- a/ext/standard/tests/strings/strrchr_variation1.phpt
+++ b/ext/standard/tests/strings/strrchr_variation1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt
index 3b06b20be1..1004a3d915 100644
--- a/ext/standard/tests/strings/strrchr_variation10.phpt
+++ b/ext/standard/tests/strings/strrchr_variation10.phpt
@@ -121,7 +121,11 @@ $needles = array (
$count = 1;
for($index = 0; $index < count($haystacks); $index++) {
echo "-- Iteration $count --\n";
- var_dump( strrchr($haystacks[$index], $needles[$index]) );
+ try {
+ var_dump( strrchr($haystacks[$index], $needles[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$count ++;
}
@@ -129,108 +133,58 @@ fclose($file_handle); //closing the file handle
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrchr() function with unexpected inputs for needle ***
-- Iteration 1 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "0"
-- Iteration 2 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "1"
-- Iteration 3 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 4 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(2) "-2"
-- Iteration 5 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(4) "10.5"
-- Iteration 6 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "-10.5"
-- Iteration 7 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(2) "10"
-- Iteration 8 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(2) "10"
-- Iteration 9 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 10 --
-
-Warning: strrchr(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrchr() expects parameter 2 to be string, array given
-- Iteration 11 --
-
-Warning: strrchr(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrchr() expects parameter 2 to be string, array given
-- Iteration 12 --
-
-Warning: strrchr(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrchr() expects parameter 2 to be string, array given
-- Iteration 13 --
-
-Warning: strrchr(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrchr() expects parameter 2 to be string, array given
-- Iteration 14 --
-
-Warning: strrchr(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrchr() expects parameter 2 to be string, array given
-- Iteration 15 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 16 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 17 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 18 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 19 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 20 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 21 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(6) "object"
-- Iteration 22 --
bool(false)
-- Iteration 23 --
bool(false)
-- Iteration 24 --
-
-Warning: strrchr(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrchr() expects parameter 2 to be string, resource given
-- Iteration 25 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 26 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
*** Done ***
diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt
index 108ba2e0f2..79ffe4c2ec 100644
--- a/ext/standard/tests/strings/strrchr_variation11.phpt
+++ b/ext/standard/tests/strings/strrchr_variation11.phpt
@@ -80,7 +80,11 @@ $values = array (
$counter = 1;
for($index = 0; $index < count($values); $index ++) {
echo "-- Iteration $counter --\n";
- var_dump( strrchr($values[$index], $values[$index]) );
+ try {
+ var_dump( strrchr($values[$index], $values[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -88,108 +92,58 @@ fclose($file_handle); //closing the file handle
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrchr() function: with unexpected inputs for haystack and needle ***
-- Iteration 1 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "0"
-- Iteration 2 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "1"
-- Iteration 3 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "12345"
-- Iteration 4 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "-2345"
-- Iteration 5 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(4) "10.5"
-- Iteration 6 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(5) "-10.5"
-- Iteration 7 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(10) "1234567000"
-- Iteration 8 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(4) "1E-9"
-- Iteration 9 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(3) "0.5"
-- Iteration 10 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 11 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 12 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 13 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 14 --
-
-Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, array given
-- Iteration 15 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "1"
-- Iteration 16 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 17 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(1) "1"
-- Iteration 18 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 19 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+string(6) "object"
-- Iteration 20 --
bool(false)
-- Iteration 21 --
bool(false)
-- Iteration 22 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 23 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 24 --
-
-Warning: strrchr() expects parameter 1 to be string, resource given in %s on line %d
-NULL
+strrchr() expects parameter 1 to be string, resource given
-- Iteration 25 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 26 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
*** Done ***
diff --git a/ext/standard/tests/strings/strrchr_variation12.phpt b/ext/standard/tests/strings/strrchr_variation12.phpt
index 730811ea47..a17902604a 100644
--- a/ext/standard/tests/strings/strrchr_variation12.phpt
+++ b/ext/standard/tests/strings/strrchr_variation12.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt
index ddce2c2ccb..2ff6720fb9 100644
--- a/ext/standard/tests/strings/strrchr_variation2.phpt
+++ b/ext/standard/tests/strings/strrchr_variation2.phpt
@@ -117,23 +117,15 @@ bool(false)
string(5) "\101 "
-- Iteration 12 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 13 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 14 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 15 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 16 --
@@ -221,9 +213,7 @@ bool(false)
string(7) "4 \101 "
-- Iteration 44 --
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
-string(37) "*+-./:;<=>?@hello123456he \x234 \101 "
+string(7) "4 \101 "
-- Iteration 45 --
string(63) "Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
diff --git a/ext/standard/tests/strings/strrchr_variation8.phpt b/ext/standard/tests/strings/strrchr_variation8.phpt
index 6b49b698f4..31a727ed6f 100644
--- a/ext/standard/tests/strings/strrchr_variation8.phpt
+++ b/ext/standard/tests/strings/strrchr_variation8.phpt
@@ -30,15 +30,11 @@ foreach($needles as $needle) {
}
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrchr() function: with heredoc strings ***
bool(false)
bool(false)
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-
-Deprecated: strrchr(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
bool(false)
bool(false)
diff --git a/ext/standard/tests/strings/strripos.phpt b/ext/standard/tests/strings/strripos.phpt
index 291ff78cd7..c343e92731 100644
--- a/ext/standard/tests/strings/strripos.phpt
+++ b/ext/standard/tests/strings/strripos.phpt
@@ -10,14 +10,11 @@ strripos() function
var_dump(strripos("te".chr(0)."st", chr(0)));
var_dump(strripos("tEst", "test"));
var_dump(strripos("teSt", "test"));
- var_dump(@strripos("foo", "f", 1));
- var_dump(@strripos("", ""));
- var_dump(@strripos("a", ""));
- var_dump(@strripos("", "a"));
- var_dump(@strripos("\\\\a", "\\a"));
-
- $fp = fopen(__FILE__, "r");
- var_dump(@strripos("", $fp));
+ var_dump(strripos("foo", "f", 1));
+ var_dump(strripos("", ""));
+ var_dump(strripos("a", ""));
+ var_dump(strripos("", "a"));
+ var_dump(strripos("\\\\a", "\\a"));
?>
--EXPECT--
int(5)
@@ -29,8 +26,7 @@ int(2)
int(0)
int(0)
bool(false)
-bool(false)
-bool(false)
-bool(false)
+int(0)
int(1)
bool(false)
+int(1)
diff --git a/ext/standard/tests/strings/strripos_basic1.phpt b/ext/standard/tests/strings/strripos_basic1.phpt
index 70bbdf94e5..4f8f8e8451 100644
--- a/ext/standard/tests/strings/strripos_basic1.phpt
+++ b/ext/standard/tests/strings/strripos_basic1.phpt
@@ -29,7 +29,6 @@ var_dump( strripos($heredoc_str, 'HelLO') );
var_dump( strripos($heredoc_str, $heredoc_str) );
?>
-===DONE===
--EXPECT--
*** Testing strripos() function: basic functionality ***
@@ -48,4 +47,3 @@ int(5)
int(0)
int(0)
int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_basic2.phpt b/ext/standard/tests/strings/strripos_basic2.phpt
index 72d02d5c80..e13a8e5747 100644
--- a/ext/standard/tests/strings/strripos_basic2.phpt
+++ b/ext/standard/tests/strings/strripos_basic2.phpt
@@ -35,7 +35,6 @@ var_dump( strripos("Hello, World", "O", -1) );
var_dump( strripos("Hello, World", "O", -5) );
var_dump( strripos("Hello, World", "O", -9) );
?>
-===DONE===
--EXPECT--
*** Testing strripos() function: basic functionality ***
@@ -61,4 +60,3 @@ bool(false)
int(8)
int(4)
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_offset.phpt b/ext/standard/tests/strings/strripos_offset.phpt
index 70a9534ebd..7dc0ce0d61 100644
--- a/ext/standard/tests/strings/strripos_offset.phpt
+++ b/ext/standard/tests/strings/strripos_offset.phpt
@@ -3,11 +3,12 @@ strripos() offset integer overflow
--FILE--
<?php
-var_dump(strripos("t", "t", PHP_INT_MAX+1));
-var_dump(strripos("tttt", "tt", PHP_INT_MAX+1));
-var_dump(strripos(100, 101, PHP_INT_MAX+1));
-var_dump(strripos(1024, 1024, PHP_INT_MAX+1));
-var_dump(strripos(array(), array(), PHP_INT_MAX+1));
+try {
+ var_dump(strripos("t", "t", PHP_INT_MAX+1));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+
var_dump(strripos(1024, 1024, -PHP_INT_MAX));
var_dump(strripos(1024, "te", -PHP_INT_MAX));
var_dump(strripos(1024, 1024, -PHP_INT_MAX-1));
@@ -16,34 +17,17 @@ var_dump(strripos(1024, "te", -PHP_INT_MAX-1));
echo "Done\n";
?>
--EXPECTF--
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
+strripos() expects parameter 3 to be int, float given
-Warning: strripos() expects parameter 3 to be int, float given in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strripos() expects parameter 1 to be string, array given in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
-Deprecated: strripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/strings/strripos_variation1.phpt b/ext/standard/tests/strings/strripos_variation1.phpt
index 59d7a64686..5c143d2564 100644
--- a/ext/standard/tests/strings/strripos_variation1.phpt
+++ b/ext/standard/tests/strings/strripos_variation1.phpt
@@ -73,8 +73,7 @@ foreach ($needles as $needle) {
$count++;
}
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing strripos() function: with double quoted strings ***
-- Iteration 1 --
int(28)
@@ -132,62 +131,30 @@ int(8)
bool(false)
int(8)
-- Iteration 12 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
+int(44)
+int(44)
+int(44)
+int(43)
-- Iteration 13 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
+int(44)
+int(44)
+int(44)
+int(43)
-- Iteration 14 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
+int(44)
+int(44)
+int(44)
+int(43)
-- Iteration 15 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
+int(44)
+int(44)
+int(44)
+int(43)
-- Iteration 16 --
-bool(false)
-bool(false)
-bool(false)
-bool(false)
+int(44)
+int(44)
+int(44)
+int(43)
-- Iteration 17 --
int(43)
int(43)
@@ -283,4 +250,3 @@ int(0)
bool(false)
bool(false)
int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_variation2.phpt b/ext/standard/tests/strings/strripos_variation2.phpt
index 7b47b787be..273215b616 100644
--- a/ext/standard/tests/strings/strripos_variation2.phpt
+++ b/ext/standard/tests/strings/strripos_variation2.phpt
@@ -74,8 +74,7 @@ foreach ($needles as $needle) {
$count++;
}
?>
-===DONE===
---EXPECTF--
+--EXPECT--
*** Testing strripos() function: with single quoted strings ***
-- Iteration 1 --
int(32)
@@ -133,62 +132,30 @@ int(10)
bool(false)
int(10)
-- Iteration 12 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
+int(54)
+int(53)
-- Iteration 13 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
+int(54)
+int(53)
-- Iteration 14 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
+int(54)
+int(53)
-- Iteration 15 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
+int(54)
+int(53)
-- Iteration 16 --
-bool(false)
-bool(false)
-bool(false)
-bool(false)
+int(54)
+int(54)
+int(54)
+int(53)
-- Iteration 17 --
int(53)
int(53)
@@ -280,21 +247,12 @@ bool(false)
bool(false)
bool(false)
-- Iteration 35 --
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(23)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(23)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(23)
-
-Deprecated: strripos(): Non-string needles will be interpreted as strings in %s on line %d
-int(23)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
-- Iteration 36 --
int(0)
bool(false)
bool(false)
int(0)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_variation3.phpt b/ext/standard/tests/strings/strripos_variation3.phpt
index 4fccaeb47e..f7a1f0ab20 100644
--- a/ext/standard/tests/strings/strripos_variation3.phpt
+++ b/ext/standard/tests/strings/strripos_variation3.phpt
@@ -36,7 +36,6 @@ var_dump( strripos($multi_line_str, "") );
var_dump( strripos($multi_line_str, " ") );
?>
-===DONE===
--EXPECT--
*** Testing strripos() function: with heredoc strings ***
-- With heredoc string containing multi lines --
@@ -54,6 +53,5 @@ bool(false)
-- Multi line strings with no offset --
int(18)
int(31)
-bool(false)
+int(63)
int(55)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_variation4.phpt b/ext/standard/tests/strings/strripos_variation4.phpt
index 3583f3646c..c9b1d0256d 100644
--- a/ext/standard/tests/strings/strripos_variation4.phpt
+++ b/ext/standard/tests/strings/strripos_variation4.phpt
@@ -27,7 +27,6 @@ var_dump( strripos($special_chars_str, "$*", 10) );
var_dump( strripos($special_chars_str, "(speCIal)") );
?>
-===DONE===
--EXPECT--
*** Testing strripos() function: with heredoc strings ***
-- With heredoc string containing special chars --
@@ -38,4 +37,3 @@ int(39)
int(55)
int(55)
int(57)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_variation5.phpt b/ext/standard/tests/strings/strripos_variation5.phpt
index 677e108e33..18572cc8d1 100644
--- a/ext/standard/tests/strings/strripos_variation5.phpt
+++ b/ext/standard/tests/strings/strripos_variation5.phpt
@@ -23,7 +23,6 @@ var_dump( strripos($control_char_str, "\n", 12) );
var_dump( strripos($control_char_str, "\t", 15) );
?>
-===DONE===
--EXPECT--
*** Testing strripos() function: with heredoc strings ***
-- With heredoc string containing escape characters --
@@ -31,4 +30,3 @@ int(13)
int(19)
int(13)
int(19)
-===DONE===
diff --git a/ext/standard/tests/strings/strripos_variation6.phpt b/ext/standard/tests/strings/strripos_variation6.phpt
new file mode 100644
index 0000000000..92bb70440a
--- /dev/null
+++ b/ext/standard/tests/strings/strripos_variation6.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Test strrpos() function : usage variations - negative offset with empty needle
+--FILE--
+<?php
+$haystack = "Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 ";
+
+var_dump(strlen($haystack));
+
+var_dump( strripos($haystack, "", -1) );
+var_dump( strripos($haystack, "", -10) );
+var_dump( strripos($haystack, "", -26) );
+var_dump( strripos($haystack, "", -44) );
+?>
+
+DONE
+--EXPECT--
+int(44)
+int(43)
+int(34)
+int(18)
+int(0)
+
+DONE
diff --git a/ext/standard/tests/strings/strrpos.phpt b/ext/standard/tests/strings/strrpos.phpt
index 691f67e599..f672d93a2a 100644
--- a/ext/standard/tests/strings/strrpos.phpt
+++ b/ext/standard/tests/strings/strrpos.phpt
@@ -10,11 +10,11 @@ strrpos() function
var_dump(strrpos("te".chr(0)."st", chr(0)));
var_dump(strrpos("tEst", "test"));
var_dump(strrpos("teSt", "test"));
- var_dump(@strrpos("foo", "f", 1));
- var_dump(@strrpos("", ""));
- var_dump(@strrpos("a", ""));
- var_dump(@strrpos("", "a"));
- var_dump(@strrpos("\\\\a", "\\a"));
+ var_dump(strrpos("foo", "f", 1));
+ var_dump(strrpos("", ""));
+ var_dump(strrpos("a", ""));
+ var_dump(strrpos("", "a"));
+ var_dump(strrpos("\\\\a", "\\a"));
?>
--EXPECT--
int(5)
@@ -26,7 +26,7 @@ int(2)
bool(false)
bool(false)
bool(false)
-bool(false)
-bool(false)
+int(0)
+int(1)
bool(false)
int(1)
diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt
index 9ef4f42d18..fdff39fdb2 100644
--- a/ext/standard/tests/strings/strrpos_offset.phpt
+++ b/ext/standard/tests/strings/strrpos_offset.phpt
@@ -3,10 +3,12 @@ strrpos() offset integer overflow
--FILE--
<?php
-var_dump(strrpos("t", "t", PHP_INT_MAX+1));
-var_dump(strrpos("tttt", "tt", PHP_INT_MAX+1));
-var_dump(strrpos(100, 101, PHP_INT_MAX+1));
-var_dump(strrpos(1024, 1024, PHP_INT_MAX+1));
+try {
+ var_dump(strrpos("t", "t", PHP_INT_MAX+1));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+
var_dump(strrpos(1024, 1024, -PHP_INT_MAX));
var_dump(strrpos(1024, "te", -PHP_INT_MAX));
var_dump(strrpos(1024, 1024, -PHP_INT_MAX-1));
@@ -15,31 +17,17 @@ var_dump(strrpos(1024, "te", -PHP_INT_MAX-1));
echo "Done\n";
?>
--EXPECTF--
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
+strrpos() expects parameter 3 to be int, float given
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/strings/strrpos_variation1.phpt b/ext/standard/tests/strings/strrpos_variation1.phpt
index fd236d04d4..d54adaec73 100644
--- a/ext/standard/tests/strings/strrpos_variation1.phpt
+++ b/ext/standard/tests/strings/strrpos_variation1.phpt
@@ -72,7 +72,7 @@ for($index=0; $index<count($needle); $index++) {
}
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrpos() function: with double quoted strings ***
-- Iteration 1 --
int(28)
@@ -108,36 +108,20 @@ int(9)
int(8)
bool(false)
-- Iteration 12 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(44)
+int(44)
-- Iteration 13 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(44)
+int(44)
-- Iteration 14 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(44)
+int(44)
-- Iteration 15 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-int(8)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(44)
+int(44)
-- Iteration 16 --
-bool(false)
-bool(false)
+int(44)
+int(44)
-- Iteration 17 --
int(43)
int(43)
diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt
index b9b24b9cb1..2a6b84337c 100644
--- a/ext/standard/tests/strings/strrpos_variation10.phpt
+++ b/ext/standard/tests/strings/strrpos_variation10.phpt
@@ -83,7 +83,11 @@ $needles = array (
$counter = 1;
for($index = 0; $index < count($needles); $index ++) {
echo "-- Iteration $counter --\n";
- var_dump( strrpos($haystack, $needles[$index]) );
+ try {
+ var_dump( strrpos($haystack, $needles[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -91,108 +95,58 @@ fclose($file_handle); //closing the file handle
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrpos() function with unexpected values for needle ***
-- Iteration 1 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(42)
-- Iteration 2 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(41)
-- Iteration 3 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 4 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 5 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(27)
-- Iteration 6 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(21)
-- Iteration 7 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 8 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
bool(false)
-- Iteration 9 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(28)
-- Iteration 10 --
-
-Warning: strrpos(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
-- Iteration 11 --
-
-Warning: strrpos(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
-- Iteration 12 --
-
-Warning: strrpos(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
-- Iteration 13 --
-
-Warning: strrpos(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
-- Iteration 14 --
-
-Warning: strrpos(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, array given
-- Iteration 15 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(41)
-- Iteration 16 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(87)
-- Iteration 17 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(41)
-- Iteration 18 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(87)
-- Iteration 19 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(64)
-- Iteration 20 --
-bool(false)
+int(87)
-- Iteration 21 --
-bool(false)
+int(87)
-- Iteration 22 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(87)
-- Iteration 23 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(87)
-- Iteration 24 --
-
-Warning: strrpos(): needle is not a string or an integer in %s on line %d
-bool(false)
+strrpos() expects parameter 2 to be string, resource given
-- Iteration 25 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(87)
-- Iteration 26 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(87)
*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt
index 94c1b9d96d..2fbe78e30a 100644
--- a/ext/standard/tests/strings/strrpos_variation11.phpt
+++ b/ext/standard/tests/strings/strrpos_variation11.phpt
@@ -81,8 +81,16 @@ $counter = 1;
for($index = 0; $index < count($values); $index ++) {
echo "-- Iteration $counter --\n";
$haystack = $values[$index];
- var_dump( strrpos($values[$index], $values[$index]) );
- var_dump( strrpos($values[$index], $values[$index], 1) );
+ try {
+ var_dump( strrpos($values[$index], $values[$index]) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ var_dump( strrpos($values[$index], $values[$index], 1) );
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter ++;
}
@@ -91,181 +99,97 @@ echo "*** Done ***";
--EXPECTF--
*** Testing strrpos() function with unexpected values for haystack and needle ***
-- Iteration 1 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 2 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 3 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 4 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 5 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 6 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 7 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 8 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 9 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 10 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
-- Iteration 11 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
-- Iteration 12 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
-- Iteration 13 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
-- Iteration 14 --
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, array given
+strrpos() expects parameter 1 to be string, array given
-- Iteration 15 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 16 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 17 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 18 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 19 --
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Notice: Object of class sample could not be converted to int in %s on line %d
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+int(0)
bool(false)
-- Iteration 20 --
-bool(false)
+int(0)
+
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 21 --
-bool(false)
-bool(false)
--- Iteration 22 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
+-- Iteration 22 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 23 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 24 --
-
-Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-
-Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
+strrpos() expects parameter 1 to be string, resource given
+strrpos() expects parameter 1 to be string, resource given
-- Iteration 25 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 26 --
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation14.phpt b/ext/standard/tests/strings/strrpos_variation14.phpt
new file mode 100644
index 0000000000..d244a19e47
--- /dev/null
+++ b/ext/standard/tests/strings/strrpos_variation14.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Test strrpos() function : usage variations - negative offset with empty needle
+--FILE--
+<?php
+$haystack = "Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 ";
+
+var_dump(strlen($haystack));
+
+var_dump( strrpos($haystack, "", -1) );
+var_dump( strrpos($haystack, "", -10) );
+var_dump( strrpos($haystack, "", -26) );
+var_dump( strrpos($haystack, "", -44) );
+?>
+
+DONE
+--EXPECT--
+int(44)
+int(43)
+int(34)
+int(18)
+int(0)
+
+DONE
diff --git a/ext/standard/tests/strings/strrpos_variation15.phpt b/ext/standard/tests/strings/strrpos_variation15.phpt
deleted file mode 100644
index 798a6877e4..0000000000
--- a/ext/standard/tests/strings/strrpos_variation15.phpt
+++ /dev/null
@@ -1,205 +0,0 @@
---TEST--
-Test strrpos() function : usage variations - unexpected inputs for 'haystack', 'needle' & 'offset' arguments
---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 'haystack', 'needle' & 'offset' arguments */
-
-echo "*** Testing strrpos() function: with unexpected values for haystack, needle & 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");
-
-// 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,
-
- //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($values); $index ++) {
- echo "-- Iteration $counter --\n";
- var_dump( strrpos($values[$index], $values[$index], $values[$index]) );
- $counter ++;
-}
-
-echo "*** Done ***";
-?>
---EXPECTF--
-*** Testing strrpos() function: with unexpected values for haystack, needle & offset ***
--- Iteration 1 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-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 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: strrpos() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: strrpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: strrpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 24 --
-
-Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
--- Iteration 25 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
--- Iteration 26 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
-bool(false)
-*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation2.phpt b/ext/standard/tests/strings/strrpos_variation2.phpt
index 9c0a320785..3accd165bb 100644
--- a/ext/standard/tests/strings/strrpos_variation2.phpt
+++ b/ext/standard/tests/strings/strrpos_variation2.phpt
@@ -73,7 +73,7 @@ for($index=0; $index<count($needle); $index++) {
}
echo "*** Done ***";
?>
---EXPECTF--
+--EXPECT--
*** Testing strrpos() function: with single quoted strings ***
-- Iteration 1 --
int(32)
@@ -109,36 +109,20 @@ bool(false)
int(10)
int(10)
-- Iteration 12 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
-- Iteration 13 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
-- Iteration 14 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
-- Iteration 15 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(54)
+int(54)
-- Iteration 16 --
-bool(false)
-bool(false)
+int(54)
+int(54)
-- Iteration 17 --
int(53)
int(53)
@@ -194,11 +178,7 @@ bool(false)
bool(false)
bool(false)
-- Iteration 35 --
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-int(23)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+bool(false)
bool(false)
-- Iteration 36 --
int(0)
diff --git a/ext/standard/tests/strings/strrpos_variation3.phpt b/ext/standard/tests/strings/strrpos_variation3.phpt
index 460f18cca5..1ebe9e7a21 100644
--- a/ext/standard/tests/strings/strrpos_variation3.phpt
+++ b/ext/standard/tests/strings/strrpos_variation3.phpt
@@ -32,6 +32,6 @@ echo "*** Done ***";
int(44)
int(44)
int(44)
-bool(false)
+int(63)
int(55)
*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation7.phpt b/ext/standard/tests/strings/strrpos_variation7.phpt
index 54db4b372e..d5aa8b561c 100644
--- a/ext/standard/tests/strings/strrpos_variation7.phpt
+++ b/ext/standard/tests/strings/strrpos_variation7.phpt
@@ -25,12 +25,10 @@ echo "*** Done ***";
--EXPECTF--
*** Testing strrpos() function: with heredoc strings ***
-- With empty heredoc string --
-bool(false)
-bool(false)
-
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
-bool(false)
+int(0)
-Deprecated: strrpos(): Non-string needles will be interpreted as strings in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
+int(0)
+int(0)
*** Done ***
diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt
index 2908de7a27..22fe2d0da9 100644
--- a/ext/standard/tests/strings/strstr.phpt
+++ b/ext/standard/tests/strings/strstr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strstr_variation1.phpt b/ext/standard/tests/strings/strstr_variation1.phpt
new file mode 100644
index 0000000000..aade1fd5f8
--- /dev/null
+++ b/ext/standard/tests/strings/strstr_variation1.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Test strstr() function : usage variations - complex strings containing other than 7-bit chars
+--FILE--
+<?php
+$string = chr(0).chr(128).chr(129).chr(234).chr(235).chr(254).chr(255);
+$stringAsHex = bin2hex($string);
+echo "-- Positions of some chars in the string '$stringAsHex' are as follows --\n";
+echo bin2hex( chr(128) ) ." => ";
+var_dump( bin2hex( strstr($string, chr(128) ) ) );
+echo bin2hex( chr(255) ) ." => ";
+var_dump( bin2hex( strstr($string, chr(255) ) ) );
+echo bin2hex( chr(256) ) ." => ";
+var_dump( bin2hex( strstr($string, chr(256) ) ) );
+?>
+
+DONE
+--EXPECT--
+-- Positions of some chars in the string '008081eaebfeff' are as follows --
+80 => string(12) "8081eaebfeff"
+ff => string(2) "ff"
+00 => string(14) "008081eaebfeff"
+
+DONE
diff --git a/ext/standard/tests/strings/strtolower-win32.phpt b/ext/standard/tests/strings/strtolower-win32.phpt
index c0ad1d0115..ff631754df 100644
--- a/ext/standard/tests/strings/strtolower-win32.phpt
+++ b/ext/standard/tests/strings/strtolower-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt
index 47dfe09762..7c7e2bb4c7 100644
--- a/ext/standard/tests/strings/strtolower.phpt
+++ b/ext/standard/tests/strings/strtolower.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtoupper1-win32.phpt b/ext/standard/tests/strings/strtoupper1-win32.phpt
index 60701652e1..7240e5c021 100644
--- a/ext/standard/tests/strings/strtoupper1-win32.phpt
+++ b/ext/standard/tests/strings/strtoupper1-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt
index e0ebf42ea7..c243ff10c7 100644
--- a/ext/standard/tests/strings/strtoupper1.phpt
+++ b/ext/standard/tests/strings/strtoupper1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtr_empty_search_string.phpt b/ext/standard/tests/strings/strtr_empty_search_string.phpt
new file mode 100644
index 0000000000..3c861600ff
--- /dev/null
+++ b/ext/standard/tests/strings/strtr_empty_search_string.phpt
@@ -0,0 +1,15 @@
+--TEST--
+strtr() trying to replace an empty string
+--FILE--
+<?php
+
+var_dump(strtr("foo", ["" => "bar"]));
+var_dump(strtr("foo", ["" => "bar", "x" => "y"]));
+
+?>
+--EXPECTF--
+Warning: strtr(): Ignoring replacement of empty string in %s on line %d
+string(3) "foo"
+
+Warning: strtr(): Ignoring replacement of empty string in %s on line %d
+string(3) "foo"
diff --git a/ext/standard/tests/strings/strtr_variation6.phpt b/ext/standard/tests/strings/strtr_variation6.phpt
index 5e06da6178..7deffa12fd 100644
--- a/ext/standard/tests/strings/strtr_variation6.phpt
+++ b/ext/standard/tests/strings/strtr_variation6.phpt
@@ -86,7 +86,6 @@ for($index = 0; $index < count($from_arr); $index++) {
fclose($file_handle); //closing the file handle
?>
-===DONE===
--EXPECTF--
*** Testing strtr() function: with unexpected inputs for 'from' ***
-- Iteration 1 --
@@ -103,15 +102,15 @@ string(6) "m1tatm"
string(6) "tm0atm"
-- Iteration 7 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(6) "0120tm"
-- Iteration 8 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(6) "0120tm"
-- Iteration 9 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(6) "0120tm"
-- Iteration 10 --
string(6) "0a2atm"
@@ -133,4 +132,3 @@ string(6) "012atm"
string(6) "012atm"
-- Iteration 19 --
string(6) "012atm"
-===DONE===
diff --git a/ext/standard/tests/strings/strtr_variation8.phpt b/ext/standard/tests/strings/strtr_variation8.phpt
index 8d29db1cc3..2e2843335d 100644
--- a/ext/standard/tests/strings/strtr_variation8.phpt
+++ b/ext/standard/tests/strings/strtr_variation8.phpt
@@ -75,10 +75,15 @@ $replace_pairs_arr = array (
// loop through with each element of the $replace_pairs array to test strtr() function
$count = 1;
for($index = 0; $index < count($replace_pairs_arr); $index++) {
- echo "\n-- Iteration $count --\n";
- $replace_pairs = $replace_pairs_arr[$index];
- var_dump( strtr($str, $replace_pairs) );
- $count ++;
+ echo "\n-- Iteration $count --\n";
+ $replace_pairs = $replace_pairs_arr[$index];
+ try {
+ var_dump( strtr($str, $replace_pairs) );
+ } catch (\TypeError $e) {
+ echo $e->getMessage() . "\n";
+ }
+
+ $count ++;
}
fclose($file_handle); //closing the file handle
@@ -89,34 +94,22 @@ echo "*** Done ***";
*** Testing strtr() function: with unexpected inputs for 'replace_pairs' ***
-- Iteration 1 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 2 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 3 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 4 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 5 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 6 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 7 --
string(6) "012atm"
@@ -128,52 +121,32 @@ string(6) "012atm"
string(6) "122atm"
-- Iteration 10 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 11 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 12 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 13 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 14 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 15 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 16 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 17 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 18 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
-- Iteration 19 --
-
-Warning: strtr(): The second argument is not an array in %s on line %d
-bool(false)
+The second argument is not an array
*** Done ***
diff --git a/ext/standard/tests/strings/strval.phpt b/ext/standard/tests/strings/strval.phpt
index b837a079d4..8f01cbfc0b 100644
--- a/ext/standard/tests/strings/strval.phpt
+++ b/ext/standard/tests/strings/strval.phpt
@@ -22,5 +22,5 @@ string(3) "1.1"
string(1) "1"
string(0) ""
-Notice: Array to string conversion in %sstrval.php on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
diff --git a/ext/standard/tests/strings/strval_basic.phpt b/ext/standard/tests/strings/strval_basic.phpt
index 65f1c98366..ac89554527 100644
--- a/ext/standard/tests/strings/strval_basic.phpt
+++ b/ext/standard/tests/strings/strval_basic.phpt
@@ -46,7 +46,6 @@ foreach($values as $value) {
$iterator++;
};
?>
-===DONE===
--EXPECT--
*** Testing strval() : basic variations ***
@@ -74,4 +73,3 @@ string(5) "0xABC"
-- Iteration 7 --
string(21) "Simple HEREDOC string"
-===DONE===
diff --git a/ext/standard/tests/strings/strval_error.phpt b/ext/standard/tests/strings/strval_error.phpt
index 4e1ece6016..18d502eb2b 100644
--- a/ext/standard/tests/strings/strval_error.phpt
+++ b/ext/standard/tests/strings/strval_error.phpt
@@ -16,17 +16,6 @@ class MyClass
// no toString() method defined
}
-$string = "Hello";
-$extra_arg = 10;
-
-//Test strval with one more than the expected number of arguments
-echo "\n-- Testing strval() function with more than expected no. of arguments --\n";
-var_dump( strval($string, $extra_arg) );
-
-// Testing strval with one less than the expected number of arguments
-echo "\n-- Testing strval() function with less than expected no. of arguments --\n";
-var_dump( strval() );
-
// Testing strval with a object which has no toString() method
echo "\n-- Testing strval() function with object which has not toString() method --\n";
try {
@@ -36,20 +25,8 @@ try {
}
?>
-===DONE===
--EXPECTF--
*** Testing strval() : error conditions ***
--- Testing strval() function with more than expected no. of arguments --
-
-Warning: strval() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
--- Testing strval() function with less than expected no. of arguments --
-
-Warning: strval() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-- Testing strval() function with object which has not toString() method --
Object of class MyClass could not be converted to string
-===DONE===
diff --git a/ext/standard/tests/strings/strval_variation1.phpt b/ext/standard/tests/strings/strval_variation1.phpt
index 5918c286e2..068e1e2649 100644
--- a/ext/standard/tests/strings/strval_variation1.phpt
+++ b/ext/standard/tests/strings/strval_variation1.phpt
@@ -9,8 +9,6 @@ Test strval() function : usage variations - Pass different data types as strval
echo "*** Testing strval() : usage variations ***\n";
-error_reporting(E_ALL ^ E_NOTICE);
-
//get an unset variable
$unset_var = 10;
unset ($unset_var);
@@ -91,7 +89,6 @@ foreach($values as $value) {
$iterator++;
};
?>
-===DONE===
--EXPECTF--
*** Testing strval() : usage variations ***
@@ -147,9 +144,13 @@ string(14) "1.007654321E-8"
string(3) "0.5"
-- Iteration 18 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 19 --
+
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 20 --
@@ -187,4 +188,3 @@ string(0) ""
-- Iteration 31 --
string(0) ""
-===DONE===
diff --git a/ext/standard/tests/strings/strval_variation2.phpt b/ext/standard/tests/strings/strval_variation2.phpt
index 3fa99f7718..cf635294d0 100644
--- a/ext/standard/tests/strings/strval_variation2.phpt
+++ b/ext/standard/tests/strings/strval_variation2.phpt
@@ -60,7 +60,6 @@ echo bin2hex(strval($sf));
echo "\n";
?>
-===DONE===
--EXPECT--
*** Testing strval() : usage variations - Pass all valid char codes ***
000102030405060708090a0b0c0d0e0f
@@ -79,4 +78,3 @@ c0c1c2c3c4c5c6c7c8c9cacbcccdcecf
d0d1d2d3d4d5d6d7d8d9dadbdcdddedf
e0e1e2e3e4e5e6e7e8e9eaebecedeeef
f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
-===DONE===
diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt
index 0901d2082e..fe687ed1ae 100644
--- a/ext/standard/tests/strings/substr.phpt
+++ b/ext/standard/tests/strings/substr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/substr_compare.phpt b/ext/standard/tests/strings/substr_compare.phpt
index f1edf0afdf..6a0bca4336 100644
--- a/ext/standard/tests/strings/substr_compare.phpt
+++ b/ext/standard/tests/strings/substr_compare.phpt
@@ -4,6 +4,7 @@ substr_compare()
<?php
var_dump(substr_compare("abcde", "df", -2) < 0);
+var_dump(substr_compare("abcde", "df", -2, null) < 0);
var_dump(substr_compare("abcde", "bc", 1, 2));
var_dump(substr_compare("abcde", "bcg", 1, 2));
var_dump(substr_compare("abcde", "BC", 1, 2, true));
@@ -12,16 +13,20 @@ var_dump(substr_compare("abcde", "cd", 1, 2) < 0);
var_dump(substr_compare("abcde", "abc", 5, 1));
var_dump(substr_compare("abcde", "abcdef", -10, 10) < 0);
var_dump(substr_compare("abcde", "abc", 0, 0));
-var_dump(substr_compare("abcde", -1, 0, NULL, new stdClass));
echo "Test\n";
-var_dump(substr_compare("abcde", "abc", 0, -1));
+
+try {
+ substr_compare("abcde", "abc", 0, -1);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
var_dump(substr_compare("abcde", "abc", -1, NULL, -5) > 0);
-var_dump(substr_compare("abcde", -1, 0, "str", new stdClass));
echo "Done\n";
?>
--EXPECTF--
bool(true)
+bool(true)
int(0)
int(0)
int(0)
@@ -30,15 +35,7 @@ bool(true)
int(-1)
bool(true)
int(0)
-
-Warning: substr_compare() expects parameter 5 to be bool, object given in %s on line %d
-bool(false)
Test
-
-Warning: substr_compare(): The length must be greater than or equal to zero in %s on line %d
-bool(false)
+The length must be greater than or equal to zero
bool(true)
-
-Warning: substr_compare() expects parameter 4 to be int, string given in %s on line %d
-bool(false)
Done
diff --git a/ext/standard/tests/strings/substr_count_basic.phpt b/ext/standard/tests/strings/substr_count_basic.phpt
index 4023a774d8..a6d715ed67 100644
--- a/ext/standard/tests/strings/substr_count_basic.phpt
+++ b/ext/standard/tests/strings/substr_count_basic.phpt
@@ -4,20 +4,30 @@ Test substr_count() function (basic)
<?php
echo "***Testing basic operations ***\n";
-var_dump(@substr_count("", ""));
-var_dump(@substr_count("a", ""));
-var_dump(@substr_count("", "a"));
-var_dump(@substr_count("", "a"));
-var_dump(@substr_count("", chr(0)));
+try {
+ substr_count("", "");
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ substr_count("a", "");
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+var_dump(substr_count("", "a"));
+var_dump(substr_count("", "a"));
+var_dump(substr_count("", chr(0)));
$a = str_repeat("abcacba", 100);
-var_dump(@substr_count($a, "bca"));
+var_dump(substr_count($a, "bca"));
$a = str_repeat("abcacbabca", 100);
-var_dump(@substr_count($a, "bca"));
+var_dump(substr_count($a, "bca"));
var_dump(substr_count($a, "bca", 200));
+var_dump(substr_count($a, "bca", 200, null));
var_dump(substr_count($a, "bca", 200, 50));
var_dump(substr_count($a, "bca", -200));
+var_dump(substr_count($a, "bca", -200, null));
var_dump(substr_count($a, "bca", -200, 50));
var_dump(substr_count($a, "bca", -200, -50));
@@ -26,16 +36,18 @@ echo "Done\n";
?>
--EXPECT--
***Testing basic operations ***
-bool(false)
-bool(false)
+Empty substring
+Empty substring
int(0)
int(0)
int(0)
int(100)
int(200)
int(160)
+int(160)
int(10)
int(40)
+int(40)
int(10)
int(30)
Done
diff --git a/ext/standard/tests/strings/substr_count_error.phpt b/ext/standard/tests/strings/substr_count_error.phpt
index eecc251e6c..246963d13b 100644
--- a/ext/standard/tests/strings/substr_count_error.phpt
+++ b/ext/standard/tests/strings/substr_count_error.phpt
@@ -6,12 +6,6 @@ Test substr_count() function (error conditions)
echo "\n*** Testing error conditions ***\n";
$str = 'abcdefghik';
-/* Zero argument */
-var_dump( substr_count() );
-
-/* more than expected no. of args */
-var_dump( substr_count($str, "t", 0, 15, 30) );
-
/* offset before start */
var_dump(substr_count($str, "t", -20));
@@ -22,9 +16,6 @@ var_dump(substr_count($str, "t", 25));
Warning message expected, as length+offset > length of string */
var_dump( substr_count($str, "i", 5, 7) );
-/* Invalid offset argument */
-var_dump( substr_count($str, "t", "") );
-
/* length too small */
var_dump( substr_count($str, "t", 2, -20) );
@@ -34,12 +25,6 @@ echo "Done\n";
--EXPECTF--
*** Testing error conditions ***
-Warning: substr_count() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: substr_count() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
Warning: substr_count(): Offset not contained in string in %s on line %d
bool(false)
@@ -49,9 +34,6 @@ bool(false)
Warning: substr_count(): Invalid length value in %s on line %d
bool(false)
-Warning: substr_count() expects parameter 3 to be int, string given in %s on line %d
-NULL
-
Warning: substr_count(): Invalid length value in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/strings/substr_count_variation_001.phpt b/ext/standard/tests/strings/substr_count_variation_001.phpt
index 71f2d223e1..19a9a0310d 100644
--- a/ext/standard/tests/strings/substr_count_variation_001.phpt
+++ b/ext/standard/tests/strings/substr_count_variation_001.phpt
@@ -12,9 +12,6 @@ var_dump( substr_count($str, "i", "5t") );
var_dump( substr_count($str, "i", "5t", "10t") );
echo "\n-- 3rd or 4th arg as NULL --\n";
-var_dump( substr_count($str, "t", "") );
-var_dump( substr_count($str, "T", "") );
-var_dump( substr_count($str, "t", "", 15) );
var_dump( substr_count($str, "I", NULL) );
var_dump( substr_count($str, "i", NULL, 10) );
@@ -67,15 +64,6 @@ Notice: A non well formed numeric value encountered in %s on line %d
int(2)
-- 3rd or 4th arg as NULL --
-
-Warning: substr_count() expects parameter 3 to be int, string given %s on line %d
-NULL
-
-Warning: substr_count() expects parameter 3 to be int, string given %s on line %d
-NULL
-
-Warning: substr_count() expects parameter 3 to be int, string given %s on line %d
-NULL
int(0)
int(2)
diff --git a/ext/standard/tests/strings/substr_replace_error.phpt b/ext/standard/tests/strings/substr_replace_error.phpt
index ac945349fe..5e22fccb88 100644
--- a/ext/standard/tests/strings/substr_replace_error.phpt
+++ b/ext/standard/tests/strings/substr_replace_error.phpt
@@ -15,13 +15,6 @@ echo "*** Testing substr_replace() : error conditions ***\n";
$s1 = "Good morning";
-echo "\n-- Testing substr_replace() function with less than expected no. of arguments --\n";
-var_dump(substr_replace());
-var_dump(substr_replace($s1, "evening"));
-
-echo "\n-- Testing substr_replace() function with more than expected no. of arguments --\n";
-var_dump(substr_replace($s1, "evening", 5, 7, true));
-
echo "\n-- Testing substr_replace() function with start and length different types --\n";
var_dump(substr_replace($s1, "evening", array(5)));
var_dump(substr_replace($s1, "evening", 5, array(8)));
@@ -33,23 +26,9 @@ echo "\n-- Testing substr_replace() function with start and length as arrays but
var_dump(substr_replace($s1, "evening", array(5), array(8)));
?>
-===DONE===
--EXPECTF--
*** Testing substr_replace() : error conditions ***
--- Testing substr_replace() function with less than expected no. of arguments --
-
-Warning: substr_replace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: substr_replace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
--- Testing substr_replace() function with more than expected no. of arguments --
-
-Warning: substr_replace() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
-- Testing substr_replace() function with start and length different types --
Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d
@@ -67,4 +46,3 @@ string(12) "Good morning"
Warning: substr_replace(): Functionality of 'start' and 'length' as arrays is not implemented in %s on line %d
string(12) "Good morning"
-===DONE===
diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt
index d0e4070d80..1ad504c61d 100644
--- a/ext/standard/tests/strings/trim1.phpt
+++ b/ext/standard/tests/strings/trim1.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/trim_basic.phpt b/ext/standard/tests/strings/trim_basic.phpt
index 08f75846a5..53fd4c7cc3 100644
--- a/ext/standard/tests/strings/trim_basic.phpt
+++ b/ext/standard/tests/strings/trim_basic.phpt
@@ -27,7 +27,6 @@ echo "\n-- Trim the ASCII control characters at the beginning of a string --\n";
var_dump(trim($binary, "\x00..\x1F"));
?>
-===DONE===
--EXPECT--
*** Testing trim() : basic functionality ***
@@ -42,4 +41,3 @@ string(19) "!===Hello World===!"
-- Trim the ASCII control characters at the beginning of a string --
string(14) "Example string"
-===DONE===
diff --git a/ext/standard/tests/strings/trim_error.phpt b/ext/standard/tests/strings/trim_error.phpt
index b845cee1ac..c9b92bc5c9 100644
--- a/ext/standard/tests/strings/trim_error.phpt
+++ b/ext/standard/tests/strings/trim_error.phpt
@@ -11,14 +11,6 @@ Test trim() function : error conditions
echo "*** Testing trim() : error conditions ***\n";
-echo "\n-- Testing trim() function with no arguments --\n";
-var_dump( trim() );
-
-echo "\n-- Testing trim() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( trim("Hello World", "Heo", $extra_arg) );
-
-
$hello = " Hello World\n";
echo "\n-- Test trim function with various invalid charlists --\n";
var_dump(trim($hello, "..a"));
@@ -27,20 +19,9 @@ var_dump(trim($hello, "z..a"));
var_dump(trim($hello, "a..b..c"));
?>
-===DONE===
--EXPECTF--
*** Testing trim() : error conditions ***
--- Testing trim() function with no arguments --
-
-Warning: trim() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing trim() function with more than expected no. of arguments --
-
-Warning: trim() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-- Test trim function with various invalid charlists --
Warning: trim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
@@ -58,4 +39,3 @@ string(14) " Hello World
Warning: trim(): Invalid '..'-range in %s on line %d
string(14) " Hello World
"
-===DONE===
diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt
index b524b45e59..ea575f6f11 100644
--- a/ext/standard/tests/strings/ucfirst.phpt
+++ b/ext/standard/tests/strings/ucfirst.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/unpack_bug68225.phpt b/ext/standard/tests/strings/unpack_bug68225.phpt
index b02b0383bf..c3d1692c37 100644
--- a/ext/standard/tests/strings/unpack_bug68225.phpt
+++ b/ext/standard/tests/strings/unpack_bug68225.phpt
@@ -15,7 +15,6 @@ $result = unpack('V1a/X4/V1b/V1c/X4/V1d', $data);
var_dump($result);
?>
-===DONE===
--EXPECT--
array(1) {
["a"]=>
@@ -35,4 +34,3 @@ array(4) {
["d"]=>
int(2)
}
-===DONE===
diff --git a/ext/standard/tests/strings/unpack_error.phpt b/ext/standard/tests/strings/unpack_error.phpt
index f04e493772..9308eef25e 100644
--- a/ext/standard/tests/strings/unpack_error.phpt
+++ b/ext/standard/tests/strings/unpack_error.phpt
@@ -10,33 +10,14 @@ Test unpack() function : error conditions
echo "*** Testing unpack() : error conditions ***\n";
-echo "\n-- Testing unpack() function with no arguments --\n";
-var_dump( unpack() );
-
-echo "\n-- Testing unpack() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump(unpack("I", pack("I", 65534), 0, $extra_arg));
-
echo "\n-- Testing unpack() function with invalid format character --\n";
$extra_arg = 10;
var_dump(unpack("B", pack("I", 65534)));
?>
-===DONE===
--EXPECTF--
*** Testing unpack() : error conditions ***
--- Testing unpack() function with no arguments --
-
-Warning: unpack() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing unpack() function with more than expected no. of arguments --
-
-Warning: unpack() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-- Testing unpack() function with invalid format character --
Warning: unpack(): Invalid format type B in %s on line %d
bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/uuencode.phpt b/ext/standard/tests/strings/uuencode.phpt
index 5a1f3d2a24..8199a2ed05 100644
--- a/ext/standard/tests/strings/uuencode.phpt
+++ b/ext/standard/tests/strings/uuencode.phpt
@@ -3,9 +3,6 @@ uuencode family tests
--FILE--
<?php
-var_dump(convert_uuencode(array()));
-var_dump(convert_uudecode(array()));
-
var_dump(convert_uuencode(""));
var_dump(convert_uudecode(""));
var_dump($enc = convert_uuencode("~!@#$%^&*()_}{POIUYTREWQQSDFGHJKL:<MNBVCXZ"));
@@ -18,11 +15,6 @@ var_dump(convert_uudecode(substr($enc, 0, -10)));
echo "Done\n";
?>
--EXPECTF--
-Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
bool(false)
bool(false)
string(60) "J?B%`(R0E7B8J*"E??7M03TE5651215=145-$1D=(2DM,.CQ-3D)60UA:
diff --git a/ext/standard/tests/strings/vfprintf_basic.phpt b/ext/standard/tests/strings/vfprintf_basic.phpt
index 30cd5348bf..16a0014425 100644
--- a/ext/standard/tests/strings/vfprintf_basic.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic.phpt
@@ -42,7 +42,6 @@ writeAndDump( $fp, "Testing %b %d %f %s %x %X", array( 9, 6, 2.5502, "foobar", 1
fclose( $fp );
?>
-===DONE===
--CLEAN--
<?php
@@ -68,4 +67,3 @@ string(2) "50"
int(2)
string(35) "Testing 1001 6 2.550200 foobar f 41"
int(35)
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic1.phpt b/ext/standard/tests/strings/vfprintf_basic1.phpt
index aa8d2eb850..0c64784bc4 100644
--- a/ext/standard/tests/strings/vfprintf_basic1.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic1.phpt
@@ -37,7 +37,6 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using string format ***
int(4)
@@ -46,4 +45,3 @@ int(14)
one
one two
one two three
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic2.phpt b/ext/standard/tests/strings/vfprintf_basic2.phpt
index 4593dbb1b6..770b41b5bc 100644
--- a/ext/standard/tests/strings/vfprintf_basic2.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic2.phpt
@@ -42,10 +42,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using integer format ***
111
111 222
111 222 333
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic3.phpt b/ext/standard/tests/strings/vfprintf_basic3.phpt
index b303f196f8..142a7fdaa7 100644
--- a/ext/standard/tests/strings/vfprintf_basic3.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic3.phpt
@@ -51,7 +51,6 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using float format ***
11.110000
@@ -60,4 +59,3 @@ unlink($data_file);
11.110000 22.220000
11.110000 22.220000 33.330000
11.110000 22.220000 33.330000
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic4.phpt b/ext/standard/tests/strings/vfprintf_basic4.phpt
index a0780c160b..c698c9776d 100644
--- a/ext/standard/tests/strings/vfprintf_basic4.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic4.phpt
@@ -37,10 +37,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using bool format ***
1
1 0
1 0 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic5.phpt b/ext/standard/tests/strings/vfprintf_basic5.phpt
index 56dd2c67fc..be35af7809 100644
--- a/ext/standard/tests/strings/vfprintf_basic5.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic5.phpt
@@ -37,10 +37,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using char format ***
A
A B
A B C
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic6.phpt b/ext/standard/tests/strings/vfprintf_basic6.phpt
index 0590810e31..9cc0bc6a7a 100644
--- a/ext/standard/tests/strings/vfprintf_basic6.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic6.phpt
@@ -39,10 +39,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using exponential format ***
1.000000e+3
1.000000e+3 2.000000e+3
1.000000e+3 2.000000e+3 3.000000e+3
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic7.phpt b/ext/standard/tests/strings/vfprintf_basic7.phpt
index f7cc0ed0b3..f1c36768e0 100644
--- a/ext/standard/tests/strings/vfprintf_basic7.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic7.phpt
@@ -42,10 +42,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using unsigned format ***
4294966185
4294966185 4293732729
4294966185 4293732729 4292621864
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt b/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt
index 3587792d81..54df744ff8 100644
--- a/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt
@@ -42,10 +42,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using unsigned format ***
18446744073709550505
18446744073709550505 18446744073708317049
18446744073709550505 18446744073708317049 18446744073707206184
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic8.phpt b/ext/standard/tests/strings/vfprintf_basic8.phpt
index ced87284f8..a5ac35600e 100644
--- a/ext/standard/tests/strings/vfprintf_basic8.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic8.phpt
@@ -37,10 +37,8 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : basic functionality - using octal format ***
21
21 347
21 347 567
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_basic9.phpt b/ext/standard/tests/strings/vfprintf_basic9.phpt
index db98c442e8..81cc8e0d9a 100644
--- a/ext/standard/tests/strings/vfprintf_basic9.phpt
+++ b/ext/standard/tests/strings/vfprintf_basic9.phpt
@@ -48,7 +48,6 @@ print_r(file_get_contents($data_file));
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf) : basic functionality - using hexadecimal format ***
b
@@ -57,4 +56,3 @@ b 84
B 84
b 84 b1
B 84 B1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_error1.phpt b/ext/standard/tests/strings/vfprintf_error1.phpt
index c56631ecd7..f2057ea388 100644
--- a/ext/standard/tests/strings/vfprintf_error1.phpt
+++ b/ext/standard/tests/strings/vfprintf_error1.phpt
@@ -20,14 +20,21 @@ echo "\n-- Testing vfprintf() function with more than expected no. of arguments
$format = 'string_val';
$args = array( 1, 2 );
$extra_arg = 10;
-var_dump( vfprintf( $fp, $format, $args, $extra_arg ) );
-var_dump( vfprintf( $fp, "Foo %d", array(6), "bar" ) );
+try {
+ var_dump( vfprintf( $fp, $format, $args, $extra_arg ) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( vfprintf( $fp, "Foo %d", array(6), "bar" ) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
// Close handle
fclose($fp);
?>
-===DONE===
--CLEAN--
<?php
@@ -37,10 +44,5 @@ unlink( $file );
?>
--EXPECTF--
-- Testing vfprintf() function with more than expected no. of arguments --
-
-Warning: Wrong parameter count for vfprintf() in %s on line %d
-NULL
-
-Warning: Wrong parameter count for vfprintf() in %s on line %d
-NULL
-===DONE===
+Wrong parameter count for vfprintf()
+Wrong parameter count for vfprintf()
diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt
index 8be51e1798..06103878a6 100644
--- a/ext/standard/tests/strings/vfprintf_error3.phpt
+++ b/ext/standard/tests/strings/vfprintf_error3.phpt
@@ -35,7 +35,6 @@ rewind( $fp );
fclose( $fp );
?>
-===DONE===
--CLEAN--
<?php
@@ -46,9 +45,8 @@ unlink( $file );
--EXPECTF--
-- Testing vfprintf() function with wrong variable types as argument --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
int(5)
string(5) "Array"
int(9)
string(9) "Foo fake"
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_error4.phpt b/ext/standard/tests/strings/vfprintf_error4.phpt
index 2865d42a9e..53eba8f415 100644
--- a/ext/standard/tests/strings/vfprintf_error4.phpt
+++ b/ext/standard/tests/strings/vfprintf_error4.phpt
@@ -17,14 +17,20 @@ $file = 'vfprintf_error4.txt';
$fp = fopen( $file, "a+" );
echo "\n-- Testing vfprintf() function with other strangeties --\n";
-var_dump( vfprintf( 'foo', 'bar', array( 'baz' ) ) );
-var_dump( vfprintf( $fp, 'Foo %$c-0202Sd', array( 2 ) ) );
-
+try {
+ var_dump( vfprintf( 'foo', 'bar', array( 'baz' ) ) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ var_dump( vfprintf( $fp, 'Foo %$c-0202Sd', array( 2 ) ) );
+} catch(\ValueError $e) {
+ print('Error found: '.$e->getMessage().".\n");
+}
// Close handle
fclose( $fp );
?>
-===DONE===
--CLEAN--
<?php
@@ -34,10 +40,5 @@ unlink( $file );
?>
--EXPECTF--
-- Testing vfprintf() function with other strangeties --
-
-Warning: vfprintf() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
-
-Warning: vfprintf(): Argument number must be greater than zero in %s on line %d
-bool(false)
-===DONE===
+vfprintf() expects parameter 1 to be resource, string given
+Error found: Argument number must be greater than zero.
diff --git a/ext/standard/tests/strings/vfprintf_variation1.phpt b/ext/standard/tests/strings/vfprintf_variation1.phpt
index 76422011c2..744d9e2fd8 100644
--- a/ext/standard/tests/strings/vfprintf_variation1.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation1.phpt
@@ -48,14 +48,11 @@ writeAndDump( $fp, "%s %s %s", array( 'bar', 'bar', 'bar' ) );
writeAndDump( $fp, "%02d", array( 50 ) );
writeAndDump( $fp, "", array() );
writeAndDump( $fp, "Testing %b %d %f %o %s %x %X", array( 9, 6, 2.5502, 24, "foobar", 15, 65 ) );
-@writeAndDump( $funset, "Foo with %s", array( 'string' ) );
-@writeAndDump( new FooClass(), "Foo with %s", array( 'string' ) );
// Close handle
fclose( $fp );
?>
-===DONE===
--CLEAN--
<?php
@@ -79,8 +76,3 @@ string(0) ""
int(0)
string(38) "Testing 1001 6 2.550200 30 foobar f 41"
int(38)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation10.phpt b/ext/standard/tests/strings/vfprintf_variation10.phpt
index dda2105dcd..91bb67ef6e 100644
--- a/ext/standard/tests/strings/vfprintf_variation10.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation10.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vfprintf_variation11.phpt b/ext/standard/tests/strings/vfprintf_variation11.phpt
index 6c93875c75..2c4134f3b7 100644
--- a/ext/standard/tests/strings/vfprintf_variation11.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation11.phpt
@@ -65,7 +65,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : octal formats with octal values ***
@@ -85,4 +84,3 @@ unlink($data_file);
% %o o
-- Iteration 8 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt
index 5217442ff9..355d14d185 100644
--- a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt
@@ -65,7 +65,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : octal formats with octal values ***
@@ -85,4 +84,3 @@ unlink($data_file);
% %o o
-- Iteration 8 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation12.phpt b/ext/standard/tests/strings/vfprintf_variation12.phpt
index a655da5367..3bd46f8899 100644
--- a/ext/standard/tests/strings/vfprintf_variation12.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation12.phpt
@@ -88,7 +88,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : octal formats and non-octal values ***
@@ -122,4 +121,3 @@ unlink($data_file);
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt
index 651ff7b70d..8e4cb71e82 100644
--- a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt
@@ -88,7 +88,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : octal formats and non-octal values ***
@@ -122,4 +121,3 @@ unlink($data_file);
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation13.phpt b/ext/standard/tests/strings/vfprintf_variation13.phpt
index dca1d4c169..6331172a0d 100644
--- a/ext/standard/tests/strings/vfprintf_variation13.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation13.phpt
@@ -65,7 +65,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : hexa formats with hexa values ***
@@ -85,4 +84,3 @@ ffffffff 1 22
%34 x
-- Iteration 8 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt
index 7288abc485..aaad2512a4 100644
--- a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt
@@ -65,7 +65,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : hexa formats with hexa values ***
@@ -85,4 +84,3 @@ ffffffffffffffff 1 22
%34 x
-- Iteration 8 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation14.phpt b/ext/standard/tests/strings/vfprintf_variation14.phpt
index 7e0ab0193f..36fd10c31e 100644
--- a/ext/standard/tests/strings/vfprintf_variation14.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation14.phpt
@@ -88,7 +88,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : hexa formats and non-hexa values ***
@@ -122,4 +121,3 @@ unlink($data_file);
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt
index 83576b1d34..6560c67398 100644
--- a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt
@@ -88,7 +88,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : hexa formats and non-hexa values ***
@@ -122,4 +121,3 @@ unlink($data_file);
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation15.phpt b/ext/standard/tests/strings/vfprintf_variation15.phpt
index b0d7091c09..6ffcf7323c 100644
--- a/ext/standard/tests/strings/vfprintf_variation15.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation15.phpt
@@ -58,7 +58,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : unsigned formats and unsigned values ***
@@ -72,4 +71,3 @@ unlink($data_file);
#1 0 $0 10
-- Iteration 5 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt
index 53dd105123..15332b7b32 100644
--- a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt
@@ -58,7 +58,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : unsigned formats and unsigned values ***
@@ -72,4 +71,3 @@ unlink($data_file);
#1 0 $0 10
-- Iteration 5 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation16.phpt b/ext/standard/tests/strings/vfprintf_variation16.phpt
index 1d2858cbab..875af5838e 100644
--- a/ext/standard/tests/strings/vfprintf_variation16.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation16.phpt
@@ -81,7 +81,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : unsigned formats and signed & other types of values ***
@@ -109,4 +108,3 @@ unlink($data_file);
1 1 0
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt
index f65998aeef..79a36bcbd9 100644
--- a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt
@@ -81,7 +81,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : unsigned formats and signed & other types of values ***
@@ -109,4 +108,3 @@ unlink($data_file);
1 1 0
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation17.phpt b/ext/standard/tests/strings/vfprintf_variation17.phpt
index 3c9d82025f..060b8c3e6b 100644
--- a/ext/standard/tests/strings/vfprintf_variation17.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation17.phpt
@@ -53,7 +53,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : scientific formats and scientific values ***
@@ -67,4 +66,3 @@ unlink($data_file);
#########1.000000e+1 1.000000e+2 $$$$$$$$-1.000000e+3 _________1.000000e+2
-- Iteration 5 --
1.000000e+3 2.000000e+3 3.000000e+3 4.000000e+3
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation18.phpt b/ext/standard/tests/strings/vfprintf_variation18.phpt
index 71277ca3d8..2bd2c4e924 100644
--- a/ext/standard/tests/strings/vfprintf_variation18.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation18.phpt
@@ -76,7 +76,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : scientific formats and non-scientific values ***
@@ -104,4 +103,3 @@ unlink($data_file);
1.0000e+0 0.0000e+0 1.000000e+0 0.0000e+0
0.000000e+0 1.000000e+0 1.000000e+0 0.000000e+0
0.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation19.phpt b/ext/standard/tests/strings/vfprintf_variation19.phpt
index b3d5eed82b..f8ce7ec55d 100644
--- a/ext/standard/tests/strings/vfprintf_variation19.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation19.phpt
@@ -65,7 +65,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : with white spaces in format strings ***
@@ -91,4 +90,3 @@ A B C
11 FFFFFFDE 33
-- Iteration 11 --
2.000000E+1 2.000000E-1 -2.000000E+1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt
index 0ae053ac98..4f7e0ee53b 100644
--- a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt
@@ -65,7 +65,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : with white spaces in format strings ***
@@ -91,4 +90,3 @@ A B C
11 FFFFFFFFFFFFFFDE 33
-- Iteration 11 --
2.000000E+1 2.000000E-1 -2.000000E+1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation20.phpt b/ext/standard/tests/strings/vfprintf_variation20.phpt
index 1f8dfefca4..c831674bcd 100644
--- a/ext/standard/tests/strings/vfprintf_variation20.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation20.phpt
@@ -104,19 +104,18 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECTF--
*** Testing vfprintf() : with unexpected values for format argument ***
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
*** Testing vprintf() with with unexpected values for format argument ***
@@ -172,4 +171,3 @@ object
-- Iteration 26 --
Resource id #%d
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation21.phpt b/ext/standard/tests/strings/vfprintf_variation21.phpt
index 11f29e87ac..9b9c3c12ae 100644
--- a/ext/standard/tests/strings/vfprintf_variation21.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation21.phpt
@@ -90,7 +90,11 @@ fprintf($fp, "\n*** Testing vprintf() with unexpected values for args argument *
$counter = 1;
foreach( $values as $value ) {
fprintf($fp, "\n-- Iteration %d --\n",$counter);
- vfprintf($fp, $format, $value);
+ try {
+ vfprintf($fp, $format, $value);
+ } catch (\ValueError $e) {
+ fwrite($fp, $e->getMessage() . "\n");
+ }
$counter++;
}
@@ -102,20 +106,9 @@ unlink($data_file);
?>
-===DONE===
--EXPECTF--
*** Testing vfprintf() : with unexpected values for args argument ***
-Warning: vfprintf(): Too few arguments in %s on line %d
-
-Warning: vfprintf(): Too few arguments in %s on line %d
-
-Warning: vfprintf(): Too few arguments in %s on line %d
-
-Warning: vfprintf(): Too few arguments in %s on line %d
-
-Warning: vfprintf(): Too few arguments in %s on line %d
-
*** Testing vprintf() with unexpected values for args argument ***
-- Iteration 1 --
@@ -137,8 +130,10 @@ Warning: vfprintf(): Too few arguments in %s on line %d
-- Iteration 9 --
0.5
-- Iteration 10 --
+The arguments array must contain 1 items, 0 given
-- Iteration 11 --
+The arguments array must contain 1 items, 0 given
-- Iteration 12 --
1
@@ -157,11 +152,13 @@ string
-- Iteration 19 --
string
-- Iteration 20 --
+The arguments array must contain 1 items, 0 given
-- Iteration 21 --
+The arguments array must contain 1 items, 0 given
-- Iteration 22 --
+The arguments array must contain 1 items, 0 given
-- Iteration 23 --
Resource id #%d
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation3.phpt b/ext/standard/tests/strings/vfprintf_variation3.phpt
index 7cb8e83d0d..3f43709b4e 100644
--- a/ext/standard/tests/strings/vfprintf_variation3.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation3.phpt
@@ -63,7 +63,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : int formats with int values ***
@@ -83,4 +82,3 @@ unlink($data_file);
%-5678 d
-- Iteration 8 --
1 2 3 4
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation4.phpt b/ext/standard/tests/strings/vfprintf_variation4.phpt
index 312ec6f18a..488adccfda 100644
--- a/ext/standard/tests/strings/vfprintf_variation4.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation4.phpt
@@ -82,7 +82,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : int formats and non-integer values ***
@@ -110,4 +109,3 @@ unlink($data_file);
1 0 1 0000
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt
index 690e2633f2..fea15a9552 100644
--- a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt
@@ -82,7 +82,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : int formats and non-integer values ***
@@ -110,4 +109,3 @@ unlink($data_file);
1 0 1 0000
#0 1 $1 _0
0 1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation5.phpt b/ext/standard/tests/strings/vfprintf_variation5.phpt
index a9139ce6af..71f9b78fbf 100644
--- a/ext/standard/tests/strings/vfprintf_variation5.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation5.phpt
@@ -62,7 +62,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : int formats with float values ***
@@ -82,4 +81,3 @@ unlink($data_file);
%-5678.567800 f
-- Iteration 8 --
1.110000 2.220000 3.330000 4.440000
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation6.phpt b/ext/standard/tests/strings/vfprintf_variation6.phpt
index e586a074f2..7652e64325 100644
--- a/ext/standard/tests/strings/vfprintf_variation6.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation6.phpt
@@ -77,7 +77,6 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
--EXPECT--
*** Testing vfprintf() : float formats and non-float values ***
@@ -105,4 +104,3 @@ unlink($data_file);
1.0000 0.0000 1.000000 0.0000
0.000000 1.000000 1.000000 0.000000
0.000000 1.000000 1.000000 1.000000
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation7.phpt b/ext/standard/tests/strings/vfprintf_variation7.phpt
index 54b4ef4505..d6becb602d 100644
--- a/ext/standard/tests/strings/vfprintf_variation7.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation7.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vfprintf_variation8.phpt b/ext/standard/tests/strings/vfprintf_variation8.phpt
index ff806154f4..b32dfbc54f 100644
--- a/ext/standard/tests/strings/vfprintf_variation8.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation8.phpt
@@ -12,8 +12,6 @@ Test vfprintf() function : usage variations - string formats with non-string val
* the '$format' and '$args' arguments of the function
*/
-error_reporting(E_ALL & ~E_NOTICE);
-
echo "*** Testing vfprintf() : string formats and non-string values ***\n";
// defining array of string formats
@@ -80,10 +78,45 @@ echo "\n";
unlink($data_file);
?>
-===DONE===
---EXPECT--
+--EXPECTF--
*** Testing vfprintf() : string formats and non-string values ***
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
-- Iteration 1 --
2.2 0.2 10.2
123456.234 s -1234.6789 1234.6789
@@ -108,4 +141,3 @@ Array Array Array
1 0001 0000
#0 1 $1 _0
1 1 1
-===DONE===
diff --git a/ext/standard/tests/strings/vfprintf_variation9.phpt b/ext/standard/tests/strings/vfprintf_variation9.phpt
index 30509d9119..cd5a2653bc 100644
--- a/ext/standard/tests/strings/vfprintf_variation9.phpt
+++ b/ext/standard/tests/strings/vfprintf_variation9.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vprintf_basic1.phpt b/ext/standard/tests/strings/vprintf_basic1.phpt
index 280649f70d..bfe287052c 100644
--- a/ext/standard/tests/strings/vprintf_basic1.phpt
+++ b/ext/standard/tests/strings/vprintf_basic1.phpt
@@ -30,7 +30,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using string format ***
one
@@ -39,4 +38,3 @@ one two
int(7)
one two three
int(13)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic2.phpt b/ext/standard/tests/strings/vprintf_basic2.phpt
index 854d6eaeee..e8bdb80738 100644
--- a/ext/standard/tests/strings/vprintf_basic2.phpt
+++ b/ext/standard/tests/strings/vprintf_basic2.phpt
@@ -35,7 +35,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using integer format ***
111
@@ -44,4 +43,3 @@ int(3)
int(7)
111 222 333
int(11)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic3.phpt b/ext/standard/tests/strings/vprintf_basic3.phpt
index 616399eed7..c052008666 100644
--- a/ext/standard/tests/strings/vprintf_basic3.phpt
+++ b/ext/standard/tests/strings/vprintf_basic3.phpt
@@ -48,7 +48,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using float format ***
11.110000
@@ -63,4 +62,3 @@ int(19)
int(29)
11.110000 22.220000 33.330000
int(29)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic4.phpt b/ext/standard/tests/strings/vprintf_basic4.phpt
index d8cfa80452..c884e9c3eb 100644
--- a/ext/standard/tests/strings/vprintf_basic4.phpt
+++ b/ext/standard/tests/strings/vprintf_basic4.phpt
@@ -31,7 +31,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using bool format ***
1
@@ -40,4 +39,3 @@ int(1)
int(3)
1 0 1
int(5)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic5.phpt b/ext/standard/tests/strings/vprintf_basic5.phpt
index 67922eaa5e..94a71bedba 100644
--- a/ext/standard/tests/strings/vprintf_basic5.phpt
+++ b/ext/standard/tests/strings/vprintf_basic5.phpt
@@ -31,7 +31,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using char format ***
A
@@ -40,4 +39,3 @@ A B
int(3)
A B C
int(5)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic6.phpt b/ext/standard/tests/strings/vprintf_basic6.phpt
index 9ddead58c4..29189ce944 100644
--- a/ext/standard/tests/strings/vprintf_basic6.phpt
+++ b/ext/standard/tests/strings/vprintf_basic6.phpt
@@ -31,7 +31,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using exponential format ***
1.000000e+3
@@ -40,4 +39,3 @@ int(11)
int(23)
1.000000e+3 2.000000e+3 3.000000e+3
int(35)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic7.phpt b/ext/standard/tests/strings/vprintf_basic7.phpt
index 7633e08f51..14f00a8b2d 100644
--- a/ext/standard/tests/strings/vprintf_basic7.phpt
+++ b/ext/standard/tests/strings/vprintf_basic7.phpt
@@ -35,7 +35,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using unsigned format ***
4294966185
@@ -44,4 +43,3 @@ int(10)
int(21)
4294966185 4293732729 4292621864
int(32)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic7_64bit.phpt b/ext/standard/tests/strings/vprintf_basic7_64bit.phpt
index 564e6f1168..2d4424b2df 100644
--- a/ext/standard/tests/strings/vprintf_basic7_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_basic7_64bit.phpt
@@ -34,7 +34,6 @@ $result = vprintf($format3,$arg3);
echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using unsigned format ***
18446744073709550505
@@ -43,4 +42,3 @@ int(20)
int(41)
18446744073709550505 18446744073708317049 18446744073707206184
int(62)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic8.phpt b/ext/standard/tests/strings/vprintf_basic8.phpt
index 6fa89a1ea2..873feb1a8f 100644
--- a/ext/standard/tests/strings/vprintf_basic8.phpt
+++ b/ext/standard/tests/strings/vprintf_basic8.phpt
@@ -31,7 +31,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using octal format ***
21
@@ -40,4 +39,3 @@ int(2)
int(6)
21 347 567
int(10)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_basic9.phpt b/ext/standard/tests/strings/vprintf_basic9.phpt
index 8521d82ec4..46b9cb94b8 100644
--- a/ext/standard/tests/strings/vprintf_basic9.phpt
+++ b/ext/standard/tests/strings/vprintf_basic9.phpt
@@ -44,7 +44,6 @@ echo "\n";
var_dump($result);
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using hexadecimal format ***
b
@@ -59,4 +58,3 @@ b 84 b1
int(7)
B 84 B1
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation1.phpt b/ext/standard/tests/strings/vprintf_variation1.phpt
index 5cf50105ab..146a4e44f2 100644
--- a/ext/standard/tests/strings/vprintf_variation1.phpt
+++ b/ext/standard/tests/strings/vprintf_variation1.phpt
@@ -99,7 +99,6 @@ foreach($values as $value) {
fclose($file_handle);
?>
-===DONE===
--EXPECTF--
*** Testing vprintf() : with unexpected values for format argument ***
@@ -141,31 +140,31 @@ int(3)
-- Iteration 10 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 11 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 12 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 13 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
-- Iteration 14 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
Array
int(5)
@@ -216,4 +215,3 @@ int(0)
-- Iteration 26 --
Resource id #%d
int(%d)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation10.phpt b/ext/standard/tests/strings/vprintf_variation10.phpt
index 747b8c40c5..4a5b759c5e 100644
--- a/ext/standard/tests/strings/vprintf_variation10.phpt
+++ b/ext/standard/tests/strings/vprintf_variation10.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vprintf_variation11.phpt b/ext/standard/tests/strings/vprintf_variation11.phpt
index 99f5c80386..21b6a27a55 100644
--- a/ext/standard/tests/strings/vprintf_variation11.phpt
+++ b/ext/standard/tests/strings/vprintf_variation11.phpt
@@ -56,7 +56,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : octal formats with octal values ***
@@ -91,4 +90,3 @@ int(6)
-- Iteration 8 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt
index 22e1d83840..e2ffb93ac4 100644
--- a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt
@@ -56,7 +56,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : octal formats with octal values ***
@@ -91,4 +90,3 @@ int(6)
-- Iteration 8 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation12.phpt b/ext/standard/tests/strings/vprintf_variation12.phpt
index a4c6139144..26c355752d 100644
--- a/ext/standard/tests/strings/vprintf_variation12.phpt
+++ b/ext/standard/tests/strings/vprintf_variation12.phpt
@@ -79,7 +79,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : octal formats and non-octal values ***
@@ -122,4 +121,3 @@ int(75)
#0 1 $1 _0
0 1 1 1
int(75)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vprintf_variation12_64bit.phpt
index 27b420a7b0..21a76587cc 100644
--- a/ext/standard/tests/strings/vprintf_variation12_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation12_64bit.phpt
@@ -79,7 +79,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : octal formats and non-octal values ***
@@ -122,4 +121,3 @@ int(75)
#0 1 $1 _0
0 1 1 1
int(75)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation13.phpt b/ext/standard/tests/strings/vprintf_variation13.phpt
index 6f9ab49b98..c598118285 100644
--- a/ext/standard/tests/strings/vprintf_variation13.phpt
+++ b/ext/standard/tests/strings/vprintf_variation13.phpt
@@ -56,7 +56,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : hexa formats with hexa values ***
@@ -91,4 +90,3 @@ int(5)
-- Iteration 8 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt
index af5a76eded..b5b750b542 100644
--- a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt
@@ -56,7 +56,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : hexa formats with hexa values ***
@@ -91,4 +90,3 @@ int(5)
-- Iteration 8 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation14.phpt b/ext/standard/tests/strings/vprintf_variation14.phpt
index 830b7f8e15..5410056608 100644
--- a/ext/standard/tests/strings/vprintf_variation14.phpt
+++ b/ext/standard/tests/strings/vprintf_variation14.phpt
@@ -80,7 +80,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : hexa formats and non-hexa values ***
@@ -123,4 +122,3 @@ int(75)
#0 1 $1 _0
0 1 1 1
int(75)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vprintf_variation14_64bit.phpt
index 74b57f4ae8..83cabce0d3 100644
--- a/ext/standard/tests/strings/vprintf_variation14_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation14_64bit.phpt
@@ -80,7 +80,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : hexa formats and non-hexa values ***
@@ -123,4 +122,3 @@ int(75)
#0 1 $1 _0
0 1 1 1
int(75)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation15.phpt b/ext/standard/tests/strings/vprintf_variation15.phpt
index d27bb6270a..751dc5f6cb 100644
--- a/ext/standard/tests/strings/vprintf_variation15.phpt
+++ b/ext/standard/tests/strings/vprintf_variation15.phpt
@@ -49,7 +49,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : unsigned formats and unsigned values ***
@@ -72,4 +71,3 @@ int(10)
-- Iteration 5 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vprintf_variation15_64bit.phpt
index 6e27b55dd3..3bf70f4cf1 100644
--- a/ext/standard/tests/strings/vprintf_variation15_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation15_64bit.phpt
@@ -49,7 +49,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : unsigned formats and unsigned values ***
@@ -72,4 +71,3 @@ int(10)
-- Iteration 5 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation16.phpt b/ext/standard/tests/strings/vprintf_variation16.phpt
index 78e03644cc..999feefaab 100644
--- a/ext/standard/tests/strings/vprintf_variation16.phpt
+++ b/ext/standard/tests/strings/vprintf_variation16.phpt
@@ -71,7 +71,6 @@ foreach($args_array as $args) {
$counter++;
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : unsigned formats and signed & other types of values ***
@@ -106,4 +105,3 @@ int(76)
#0 1 $1 _0
0 1 1 1
int(76)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vprintf_variation16_64bit.phpt
index 5189d58abc..27716be175 100644
--- a/ext/standard/tests/strings/vprintf_variation16_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation16_64bit.phpt
@@ -72,7 +72,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : unsigned formats and signed & other types of values ***
@@ -107,4 +106,3 @@ int(76)
#0 1 $1 _0
0 1 1 1
int(76)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation17.phpt b/ext/standard/tests/strings/vprintf_variation17.phpt
index e86f80551c..d8b69c5b75 100644
--- a/ext/standard/tests/strings/vprintf_variation17.phpt
+++ b/ext/standard/tests/strings/vprintf_variation17.phpt
@@ -45,7 +45,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : scientific formats and scientific values ***
@@ -68,4 +67,3 @@ int(74)
-- Iteration 5 --
1.000000e+3 2.000000e+3 3.000000e+3 4.000000e+3
int(47)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation18.phpt b/ext/standard/tests/strings/vprintf_variation18.phpt
index 91f5d13694..a1128d3667 100644
--- a/ext/standard/tests/strings/vprintf_variation18.phpt
+++ b/ext/standard/tests/strings/vprintf_variation18.phpt
@@ -68,7 +68,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : scientific formats and non-scientific values ***
@@ -103,4 +102,3 @@ int(227)
0.000000e+0 1.000000e+0 1.000000e+0 0.000000e+0
0.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0
int(227)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation19.phpt b/ext/standard/tests/strings/vprintf_variation19.phpt
index 6ceda77022..446eb43383 100644
--- a/ext/standard/tests/strings/vprintf_variation19.phpt
+++ b/ext/standard/tests/strings/vprintf_variation19.phpt
@@ -54,7 +54,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : with white spaces in format strings ***
@@ -101,4 +100,3 @@ int(16)
-- Iteration 11 --
2.000000E+1 2.000000E-1 -2.000000E+1
int(38)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vprintf_variation19_64bit.phpt
index 9d059569f2..779ed87740 100644
--- a/ext/standard/tests/strings/vprintf_variation19_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation19_64bit.phpt
@@ -54,7 +54,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : with white spaces in format strings ***
@@ -101,4 +100,3 @@ int(24)
-- Iteration 11 --
2.000000E+1 2.000000E-1 -2.000000E+1
int(38)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation2.phpt b/ext/standard/tests/strings/vprintf_variation2.phpt
index 69e17d21a7..4b59a5046d 100644
--- a/ext/standard/tests/strings/vprintf_variation2.phpt
+++ b/ext/standard/tests/strings/vprintf_variation2.phpt
@@ -84,9 +84,13 @@ $values = array(
$counter = 1;
foreach($values as $value) {
echo "\n-- Iteration $counter --\n";
- $result = vprintf($format,$value);
- echo "\n";
- var_dump($result);
+ try {
+ $result = vprintf($format,$value);
+ echo "\n";
+ var_dump($result);
+ } catch (\ValueError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
};
@@ -94,7 +98,6 @@ foreach($values as $value) {
fclose($file_handle);
?>
-===DONE===
--EXPECTF--
*** Testing vprintf() : with unexpected values for args argument ***
@@ -135,16 +138,10 @@ int(13)
int(3)
-- Iteration 10 --
-
-Warning: vprintf(): Too few arguments in %s on line %d
-
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 11 --
-
-Warning: vprintf(): Too few arguments in %s on line %d
-
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 12 --
1
@@ -179,24 +176,14 @@ string
int(6)
-- Iteration 20 --
-
-Warning: vprintf(): Too few arguments in %s on line %d
-
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 21 --
-
-Warning: vprintf(): Too few arguments in %s on line %d
-
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 22 --
-
-Warning: vprintf(): Too few arguments in %s on line %d
-
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 23 --
Resource id #%d
int(%d)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation3.phpt b/ext/standard/tests/strings/vprintf_variation3.phpt
index 6967679715..035b81a799 100644
--- a/ext/standard/tests/strings/vprintf_variation3.phpt
+++ b/ext/standard/tests/strings/vprintf_variation3.phpt
@@ -53,7 +53,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : int formats with int values ***
@@ -88,4 +87,3 @@ int(8)
-- Iteration 8 --
1 2 3 4
int(7)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation4.phpt b/ext/standard/tests/strings/vprintf_variation4.phpt
index aab27337d9..6adb3f19af 100644
--- a/ext/standard/tests/strings/vprintf_variation4.phpt
+++ b/ext/standard/tests/strings/vprintf_variation4.phpt
@@ -72,7 +72,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : int formats and non-integer values ***
@@ -107,4 +106,3 @@ int(81)
#0 1 $1 _0
0 1 1 1
int(81)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vprintf_variation4_64bit.phpt
index 76c079d69a..9172644dd1 100644
--- a/ext/standard/tests/strings/vprintf_variation4_64bit.phpt
+++ b/ext/standard/tests/strings/vprintf_variation4_64bit.phpt
@@ -72,7 +72,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : int formats and non-integer values ***
@@ -107,4 +106,3 @@ int(81)
#0 1 $1 _0
0 1 1 1
int(81)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation5.phpt b/ext/standard/tests/strings/vprintf_variation5.phpt
index dde6170e9f..44e2d23607 100644
--- a/ext/standard/tests/strings/vprintf_variation5.phpt
+++ b/ext/standard/tests/strings/vprintf_variation5.phpt
@@ -53,7 +53,6 @@ foreach($formats as $format) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : int formats with float values ***
@@ -88,4 +87,3 @@ int(15)
-- Iteration 8 --
1.110000 2.220000 3.330000 4.440000
int(35)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation6.phpt b/ext/standard/tests/strings/vprintf_variation6.phpt
index 0283bc4541..bad2cbb7e5 100644
--- a/ext/standard/tests/strings/vprintf_variation6.phpt
+++ b/ext/standard/tests/strings/vprintf_variation6.phpt
@@ -68,7 +68,6 @@ foreach($args_array as $args) {
}
?>
-===DONE===
--EXPECT--
*** Testing vprintf() : float formats and non-float values ***
@@ -103,4 +102,3 @@ int(179)
0.000000 1.000000 1.000000 0.000000
0.000000 1.000000 1.000000 1.000000
int(179)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation7.phpt b/ext/standard/tests/strings/vprintf_variation7.phpt
index d7c81fca14..ef17df59c2 100644
--- a/ext/standard/tests/strings/vprintf_variation7.phpt
+++ b/ext/standard/tests/strings/vprintf_variation7.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vprintf_variation8.phpt b/ext/standard/tests/strings/vprintf_variation8.phpt
index f635b1d4c0..31577bf1b6 100644
--- a/ext/standard/tests/strings/vprintf_variation8.phpt
+++ b/ext/standard/tests/strings/vprintf_variation8.phpt
@@ -12,8 +12,6 @@ Test vprintf() function : usage variations - string formats with non-string valu
* the '$format' and '$args' arguments of the function
*/
-error_reporting(E_ALL & ~E_NOTICE);
-
echo "*** Testing vprintf() : string formats and non-string values ***\n";
// defining array of string formats
@@ -71,8 +69,7 @@ foreach($args_array as $args) {
}
?>
-===DONE===
---EXPECT--
+--EXPECTF--
*** Testing vprintf() : string formats and non-string values ***
-- Iteration 1 --
@@ -92,6 +89,42 @@ int(172)
int(132)
-- Iteration 3 --
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
Array Array Array
Array s Array Array
Arra Arra Array Arra
@@ -106,4 +139,3 @@ int(131)
#0 1 $1 _0
1 1 1
int(81)
-===DONE===
diff --git a/ext/standard/tests/strings/vprintf_variation9.phpt b/ext/standard/tests/strings/vprintf_variation9.phpt
index 128af1a692..a1c99a9098 100644
--- a/ext/standard/tests/strings/vprintf_variation9.phpt
+++ b/ext/standard/tests/strings/vprintf_variation9.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/vsprintf_variation1.phpt b/ext/standard/tests/strings/vsprintf_variation1.phpt
index 15c749d3f8..33bc043927 100644
--- a/ext/standard/tests/strings/vsprintf_variation1.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation1.phpt
@@ -130,27 +130,27 @@ string(3) "0.5"
-- Iteration 10 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 11 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 12 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 13 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 14 --
-Notice: Array to string conversion in %s on line %d
+Warning: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 15 --
diff --git a/ext/standard/tests/strings/vsprintf_variation15.phpt b/ext/standard/tests/strings/vsprintf_variation15.phpt
index 62688be727..f31aadfb46 100644
--- a/ext/standard/tests/strings/vsprintf_variation15.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation15.phpt
@@ -47,7 +47,6 @@ foreach($formats as $format) {
}
?>
-===Done===
--EXPECT--
*** Testing vsprintf() : unsigned formats and unsigned values ***
@@ -65,4 +64,3 @@ string(10) "#1 0 $0 10"
-- Iteration 5 --
string(7) "1 2 3 4"
-===Done===
diff --git a/ext/standard/tests/strings/vsprintf_variation2.phpt b/ext/standard/tests/strings/vsprintf_variation2.phpt
index 838093cdb1..3af9b854fe 100644
--- a/ext/standard/tests/strings/vsprintf_variation2.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation2.phpt
@@ -84,7 +84,11 @@ $values = array(
$counter = 1;
foreach($values as $value) {
echo "\n-- Iteration $counter --\n";
- var_dump( vsprintf($format,$value) );
+ try {
+ var_dump( vsprintf($format,$value) );
+ } catch (\ValueError $e) {
+ echo $e->getMessage(), "\n";
+ }
$counter++;
};
@@ -124,14 +128,10 @@ string(13) "1.07654321E-9"
string(3) "0.5"
-- Iteration 10 --
-
-Warning: vsprintf(): Too few arguments in %s on line %d
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 11 --
-
-Warning: vsprintf(): Too few arguments in %s on line %d
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 12 --
string(1) "1"
@@ -158,19 +158,13 @@ string(6) "string"
string(6) "string"
-- Iteration 20 --
-
-Warning: vsprintf(): Too few arguments in %s on line %d
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 21 --
-
-Warning: vsprintf(): Too few arguments in %s on line %d
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 22 --
-
-Warning: vsprintf(): Too few arguments in %s on line %d
-bool(false)
+The arguments array must contain 1 items, 0 given
-- Iteration 23 --
string(%d) "Resource id #%d"
diff --git a/ext/standard/tests/strings/vsprintf_variation8.phpt b/ext/standard/tests/strings/vsprintf_variation8.phpt
index 0efd8bb008..17eb80fa21 100644
--- a/ext/standard/tests/strings/vsprintf_variation8.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation8.phpt
@@ -12,8 +12,6 @@ Test vsprintf() function : usage variations - string formats with non-string val
* the '$format' and '$args' arguments of the function
*/
-error_reporting(E_ALL & ~E_NOTICE);
-
echo "*** Testing vsprintf() : string formats and non-string values ***\n";
// defining array of string formats
@@ -69,8 +67,7 @@ foreach($args_array as $args) {
}
?>
-===DONE===
---EXPECT--
+--EXPECTF--
*** Testing vsprintf() : string formats and non-string values ***
-- Iteration 1 --
@@ -88,6 +85,42 @@ string(130) "2 -2 2
2 123456 2 -2"
-- Iteration 3 --
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
+
+Warning: Array to string conversion in %s on line %d
string(129) "Array Array Array
Array Array Array
Arra Arra Array Arra
@@ -100,4 +133,3 @@ string(79) "1 1
1 0001 0000
#0 1 $1 _0
1 1 1"
-===DONE===
diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt
index 543c41fdd9..8c2b08f046 100644
--- a/ext/standard/tests/strings/wordwrap.phpt
+++ b/ext/standard/tests/strings/wordwrap.phpt
@@ -27,10 +27,17 @@ $tests = <<<TESTS
"123|==1234567890|==123" === wordwrap("123 1234567890 123", 10, "|==", 1)
-FALSE === @wordwrap(chr(0), 0, "")
-
TESTS;
include(__DIR__ . '/../../../../tests/quicktester.inc');
+
+echo "\n";
+
+try {
+ wordwrap(chr(0), 0, "");
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
--EXPECT--
OK
+Break string cannot be empty
diff --git a/ext/standard/tests/strings/wordwrap_error.phpt b/ext/standard/tests/strings/wordwrap_error.phpt
index 41c5cbdb69..f0fa80f63d 100644
--- a/ext/standard/tests/strings/wordwrap_error.phpt
+++ b/ext/standard/tests/strings/wordwrap_error.phpt
@@ -9,19 +9,10 @@ Test wordwrap() function : error conditions
echo "*** Testing wordwrap() : error conditions ***\n";
-// Zero argument
-echo "\n-- Testing wordwrap() function with Zero arguments --\n";
-var_dump( wordwrap() );
-
-// More than expected number of arguments
-echo "\n-- Testing wordwrap() function with more than expected no. of arguments --\n";
$str = 'testing wordwrap function';
$width = 10;
$break = '<br />\n';
$cut = true;
-$extra_arg = "extra_arg";
-
-var_dump( wordwrap($str, $width, $break, $cut, $extra_arg) );
// $width arg as negative value
echo "\n-- Testing wordwrap() function with negative/zero value for width argument --\n";
@@ -35,7 +26,12 @@ echo "-- width = 0 & cut = true --\n";
// width as zero and cut as true
$width = 0;
$cut = true;
-var_dump( wordwrap($str, $width, $break, $cut) );
+
+try {
+ wordwrap($str, $width, $break, $cut);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
echo "-- width = -10 & cut = false --\n";
// width as -ne and cut as false
@@ -54,23 +50,11 @@ echo "Done\n";
--EXPECTF--
*** Testing wordwrap() : error conditions ***
--- Testing wordwrap() function with Zero arguments --
-
-Warning: wordwrap() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing wordwrap() function with more than expected no. of arguments --
-
-Warning: wordwrap() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
-- Testing wordwrap() function with negative/zero value for width argument --
-- width = 0 & cut = false --
string(39) "testing<br />\nwordwrap<br />\nfunction"
-- width = 0 & cut = true --
-
-Warning: wordwrap(): Can't force cut when width is zero in %s on line %d
-bool(false)
+Can't force cut when width is zero
-- width = -10 & cut = false --
string(39) "testing<br />\nwordwrap<br />\nfunction"
-- width = -10 & cut = true --
diff --git a/ext/standard/tests/time/bug38524.phpt b/ext/standard/tests/time/bug38524.phpt
index 77d0f4f234..3def28e082 100644
--- a/ext/standard/tests/time/bug38524.phpt
+++ b/ext/standard/tests/time/bug38524.phpt
@@ -6,7 +6,6 @@ Bug #38524 (strptime() does not initialize the internal date storage structure)
<?php
var_dump(strptime('2006-08-20', '%Y-%m-%d'));
?>
-===DONE===
--EXPECTF--
array(9) {
["tm_sec"]=>
@@ -28,4 +27,3 @@ array(9) {
["unparsed"]=>
string(0) ""
}
-===DONE===
diff --git a/ext/standard/tests/time/bug60222.phpt b/ext/standard/tests/time/bug60222.phpt
index 8053a81dea..7ea65ce54c 100644
--- a/ext/standard/tests/time/bug60222.phpt
+++ b/ext/standard/tests/time/bug60222.phpt
@@ -2,14 +2,18 @@
Bug #60222 (time_nanosleep() does validate input params)
--FILE--
<?php
- var_dump(time_nanosleep(-1, 0));
- var_dump(time_nanosleep(0, -1));
+ try {
+ time_nanosleep(-1, 0);
+ } catch (ValueError $exception) {
+ echo $exception->getMessage() . "\n";
+ }
+
+ try {
+ time_nanosleep(0, -1);
+ } catch (ValueError $exception) {
+ echo $exception->getMessage() . "\n";
+ }
?>
-===DONE===
--EXPECTF--
-Warning: time_nanosleep(): The seconds value must be greater than 0 in %s on line %d
-bool(false)
-
-Warning: time_nanosleep(): The nanoseconds value must be greater than 0 in %s on line %d
-bool(false)
-===DONE===
+The seconds value must be greater than 0
+The nanoseconds value must be greater than 0
diff --git a/ext/standard/tests/time/strptime_basic.phpt b/ext/standard/tests/time/strptime_basic.phpt
index f352e9d06a..666cbcd0e3 100644
--- a/ext/standard/tests/time/strptime_basic.phpt
+++ b/ext/standard/tests/time/strptime_basic.phpt
@@ -33,7 +33,6 @@ var_dump(strptime($str, '%A %B %e %R'));
setlocale(LC_ALL, $orig);
?>
-===DONE===
--EXPECT--
*** Testing strptime() : basic functionality ***
array(9) {
@@ -96,4 +95,3 @@ array(9) {
["unparsed"]=>
string(0) ""
}
-===DONE===
diff --git a/ext/standard/tests/time/strptime_error.phpt b/ext/standard/tests/time/strptime_error.phpt
index f49025be44..d7eb11fc55 100644
--- a/ext/standard/tests/time/strptime_error.phpt
+++ b/ext/standard/tests/time/strptime_error.phpt
@@ -19,42 +19,13 @@ date_default_timezone_set("Europe/London");
echo "*** Testing strptime() : error conditions ***\n";
-echo "\n-- Testing strptime() function with Zero arguments --\n";
-var_dump( strptime() );
-
-echo "\n-- Testing strptime() function with less than expected no. of arguments --\n";
-$format = '%b %d %Y %H:%M:%S';
-$timestamp = mktime(8, 8, 8, 8, 8, 2008);
-$date = strftime($format, $timestamp);
-var_dump( strptime($date) );
-
-echo "\n-- Testing strptime() function with more than expected no. of arguments --\n";
-$extra_arg = 10;
-var_dump( strptime($date, $format, $extra_arg) );
-
echo "\n-- Testing strptime() function on failure --\n";
+$format = '%b %d %Y %H:%M:%S';
var_dump( strptime('foo', $format) );
?>
-===DONE===
--EXPECTF--
*** Testing strptime() : error conditions ***
--- Testing strptime() function with Zero arguments --
-
-Warning: strptime() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing strptime() function with less than expected no. of arguments --
-
-Warning: strptime() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
--- Testing strptime() function with more than expected no. of arguments --
-
-Warning: strptime() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
-- Testing strptime() function on failure --
bool(false)
-===DONE===
diff --git a/ext/standard/tests/time/strptime_parts.phpt b/ext/standard/tests/time/strptime_parts.phpt
index 085b0e600f..bf7b8310f3 100644
--- a/ext/standard/tests/time/strptime_parts.phpt
+++ b/ext/standard/tests/time/strptime_parts.phpt
@@ -51,7 +51,6 @@ var_dump($res["tm_year"]);
setlocale(LC_ALL, $orig);
?>
-===DONE===
--EXPECT--
*** Testing strptime() : basic functionality ***
int(20)
@@ -72,4 +71,3 @@ int(10)
int(2)
int(6)
int(0)
-===DONE===
diff --git a/ext/standard/tests/url/base64_encode_basic_002.phpt b/ext/standard/tests/url/base64_encode_basic_002.phpt
index 2bcb7519ab..15bd9380b1 100644
--- a/ext/standard/tests/url/base64_encode_basic_002.phpt
+++ b/ext/standard/tests/url/base64_encode_basic_002.phpt
@@ -41,7 +41,6 @@ foreach($values as $str) {
}
?>
-===Done===
--EXPECT--
*** Testing base64_encode() : basic functionality ***
@@ -56,4 +55,3 @@ TEST PASSED
TEST PASSED
-- Iteration 5 --
TEST PASSED
-===Done===